Sandbox
@mkanat/skills

Code-quality skills for Claude Code and Codex

This repository packages the `cleanup` skill, which helps an agent find code smells such as duplication, extra defensive code, and unnecessary complexity. It can be added through skills.sh, installed as a Claude Code plugin, or installed as a Codex plugin, with the skill content living in `skills/cleanup/` and the example walkthrough in `examples/minibuild/`.

69 stars6 forksUpdated 24d ago
Who it's for

Builders who want their coding agent to clean up existing code instead of only writing new code.

What it delivers

You can hand your agent a codebase and get targeted refactors that make it simpler, faster, and easier to read.

What it does

Cleanup skill

`skills/cleanup/SKILL.md` defines the `cleanup` skill for finding duplicated information, repeated work, unnecessary defensive code, and accidental complexity.

Skills.sh install path

The repository supports installation through `npx skills add mkanat/skills`, including non-interactive `--skill cleanup` installs.

Claude Code plugin bundle

`.claude-plugin/` contains the plugin metadata used to install and invoke the skill in Claude Code.

Codex plugin bundle

`.codex-plugin/` contains the plugin metadata used to install and invoke the skill in Codex.

Example refactor walkthrough

`examples/minibuild/` shows the before, after, diff, and performance results from running the skill on a real example codebase.

How to get it

  1. 1The skills CLI supports Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI,…
    npx skills add mkanat/skills
  2. 2The CLI lets you choose the skill and target agents interactively. To install cleanup…
    npx skills add mkanat/skills --skill cleanup
  3. 3Run
    claude plugin marketplace add mkanat/skills
    claude plugin install mkanat-skills@mkanat
  4. 4Run
    codex plugin marketplace add mkanat/skills
    codex plugin add mkanat-skills@mkanat

README

Skills for Developers Who Care About Quality

skills.sh

Make code simpler, faster, and easier to read.

cleanup repeatedly finds duplicated information, repeated work, unnecessary defensive code, and accidental complexity. In a fully tested example, it found 32 significant cleanups and made the codebase 1.34× faster while using less memory.

npx skills add mkanat/skills --skill cleanup

Example

You can see a report of all the cleanups the cleanup skill did on an example codebase, with short diffs showing many of the improvements.

Here's the full story:

I had Codex build a fully-tested, working incremental build system using GPT-5.6 Sol, called minibuild. I had it run a type checker (basedpyright in strict mode), run a full linter (ruff with ALL checks enabled), and do auto-formatting. I also had it check code coverage and add missing tests, so it has 100% coverage without any mocking. I did not otherwise review or modify its code.

You can see the before version in examples/minibuild/before/.

I then ran cleanup on that codebase. It ran by itself five times in a row and did 9 significant refactorings. I then manually triggered cleanup five more times. It ran itself in loops a bunch of times and made 23 more cleanups.

The after version is in examples/minibuild/after/.

You can see the full diff between before and after, if you want.

The cleanup dramatically improved the code structure, but it also made real functional improvements to the system. It removed repeated work, stopped keeping multiple copies of the same information, and avoided redoing work when the final result had not actually changed. On a 10,001-task benchmark, the cleaned-up version actually ran 1.34× faster while using less memory. (You can see the full performance-testing harness and results in examples/minibuild/performance/.)

Install

Any agent supported by skills.sh

The skills CLI supports Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode, and many other agents:

npx skills add mkanat/skills

The CLI lets you choose the skill and target agents interactively. To install cleanup non-interactively:

npx skills add mkanat/skills --skill cleanup

Claude Code plugin

claude plugin marketplace add mkanat/skills
claude plugin install mkanat-skills@mkanat

Invoke the installed skill as /mkanat-skills:cleanup.

Codex plugin

codex plugin marketplace add mkanat/skills
codex plugin add mkanat-skills@mkanat

Invoke the installed skill as $cleanup.

Manual installation

Copy skills/cleanup into an agent's skills directory. The common cross-agent location is ~/.agents/skills/cleanup; project-local locations include .agents/skills/cleanup, .claude/skills/cleanup, and .github/skills/cleanup.

License

To maximize reuse, this repository is dedicated to the public domain under CC0 1.0 Universal. You may copy, modify, and distribute it for any purpose without asking permission.

Files in the repo

Repository payload10 top-level entries
  • .agents
  • .claude-plugin
  • .codex-plugin
  • examples
  • plugins
  • skills
  • .gitattributes
  • .pre-commit-config.yaml
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k