skill-cleaner
Skill5 starsChanged 6 months agoMITView on GitHub
Audit Claude Code skills and subagents — token cost, duplicates, outdated plugin versions, unused skills, and overly long descriptions. Use when trimming skill prompt budget, finding duplicate or unused skills, auditing plugin versions, or deciding which skills or plugins to remove.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- jesse-merhi/skillstheir own version, first seen Oct 4, 2026
- steipete/agent-scriptstheir own version, first seen Sep 30, 2026
- iurysza/agent-skillstheir own version, first seen Sep 14, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- steipete/agent-scripts★ 7.2ksame name
- iurysza/agent-skills★ 4same name
- jesse-merhi/skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Read-only audit of the skills and subagents loaded into Claude Code.
- Very specific: line 15
Run the analyzer (no dependencies.
- Distinctive: line 30
Read the report top to bottom:
- Very specific: line 41
Prefer removing outdated cache versions and marketplaces/ duplicates — the active copy stays loaded.
- Distinctive: line 67
Read-only. Output is suggestions.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill Cleaner (Claude Code)
Read-only audit of the skills and subagents loaded into Claude Code. Surfaces what is costing prompt budget, what is duplicated or outdated, and what is never invoked — so you can decide what to trim. Suggests only; never deletes.
Workflow
- Run the analyzer (no dependencies; needs Node 22.6+ for
--experimental-strip-types):
node --experimental-strip-types scripts/skill-cleaner.ts --months 3Useful variants:
node --experimental-strip-types scripts/skill-cleaner.ts --no-logs # fast: skip usage scan
node --experimental-strip-types scripts/skill-cleaner.ts --top 40 # longer ranking
node --experimental-strip-types scripts/skill-cleaner.ts --root ~/code/myapp # also scan a project's .claude/skills
node --experimental-strip-types scripts/skill-cleaner.ts --json # machine-readable- Read the report top to bottom:
- Summary — discovered vs active (loaded) counts and approximate token totals.
- Token Cost Ranking — heaviest active skills by approximate tokens.
- Description Candidates — long descriptions, each with a "keep first sentence" suggestion.
- Outdated Plugin Versions — older cached plugin versions when an active one exists.
- Duplicate Names / Bodies — the same skill reachable from multiple roots.
- Unused Candidates — no explicit invocation (Skill tool / slash command) in the window.
[refs N]are weak mentions; high refs may mean it still auto-triggers. - Subagents — token tally for
~/.claude/agents(reference). - Root Summary — where skills come from and how many are active.
- Before deleting anything:
- Prefer removing outdated cache versions and
marketplaces/duplicates — the active copy stays loaded. - For unused candidates, check
[refs N]: low refs = safe to remove; high refs = may auto-trigger, keep. - Personal skills in
~/.claude/skillsare hand-placed — confirm before removing.
- Prefer removing outdated cache versions and
How it works
- Active vs discovered — many
SKILL.mdfiles on disk are duplicates (marketplace catalog + cache, multiple versions,upstream/copies). The loaded copy is the one under aninstallPathin~/.claude/plugins/installed_plugins.json; everything else is treated as inactive. - Token cost is relative —
ceil(utf8_bytes / 4)of the rendered- name: descriptionline. Claude Code's real budgeting formula is not public, so this is for relative comparison, not an absolute verdict.--show-budgetprints an optional reference figure. - Usage — scans
~/.claude/projects/**/*.jsonlfor Skill tool calls ("name":"Skill") and<command-name>slash commands. Weak mentions (skills/X/SKILL.mdreads, "use X") are reported asrefsbut never decide unused status, because the session's own skill list pollutes them.
Options
| Option | Default | Description |
--months <n> | 3 | log scan window (months) |
--no-logs | — | skip unused detection (faster) |
--json | — | machine-readable output |
--root <path> | — | extra root to scan (repeatable) |
--top <n> | 20 | ranking length |
--include-disabled | — | include inactive copies in sections |
--no-agents | — | skip subagent tally |
--show-budget | off | print a reference budget (approx, not authoritative) |
--max-log-mb <n> | 2000 | cap total log bytes read |
Safety
Read-only. Output is suggestions; you decide what to delete. Cache copies regenerate on plugin reinstall.
Port of steipete/agent-scripts skill-cleaner (Codex/OpenClaw) to Claude Code.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

