agentleFS
YuzuruSYuzuruS/claude-skill-cleaner/SKILL.md

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.

5 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use frontend-design.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. steipete/agent-scripts★ 7.4ksame name
    2. joelhooks/joelclaw★ 65same name
    3. iurysza/agent-skills★ 5same name
    4. ilamanov/skills★ 1same name
    5. maro114510/skills★ 1same 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. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    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
  1. Distinctive:

    Read-only audit of the skills and subagents loaded into Claude Code.

    line 9
  2. Very specific:

    Run the analyzer (no dependencies.

    line 15
  3. Distinctive:

    Read the report top to bottom:

    line 30
  4. Very specific:

    Prefer removing outdated cache versions and marketplaces/ duplicates — the active copy stays loaded.

    line 41
  5. Distinctive:

    Read-only. Output is suggestions.

    line 67

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Run the analyzer (no dependencies; needs Node 22.6+ for --experimental-strip-types):
node --experimental-strip-types scripts/skill-cleaner.ts --months 3

Useful 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
  1. 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.
  2. 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/skills are hand-placed — confirm before removing.

How it works

  • Active vs discovered — many SKILL.md files on disk are duplicates (marketplace catalog + cache, multiple versions, upstream/ copies). The loaded copy is the one under an installPath in ~/.claude/plugins/installed_plugins.json; everything else is treated as inactive.
  • Token cost is relative — ceil(utf8_bytes / 4) of the rendered - name: description line. Claude Code's real budgeting formula is not public, so this is for relative comparison, not an absolute verdict. --show-budget prints an optional reference figure.
  • Usage — scans ~/.claude/projects/**/*.jsonl for Skill tool calls ("name":"Skill") and <command-name> slash commands. Weak mentions (skills/X/SKILL.md reads, "use X") are reported as refs but never decide unused status, because the session's own skill list pollutes them.

Options

OptionDefaultDescription
--months <n>3log scan window (months)
--no-logs—skip unused detection (faster)
--json—machine-readable output
--root <path>—extra root to scan (repeatable)
--top <n>20ranking length
--include-disabled—include inactive copies in sections
--no-agents—skip subagent tally
--show-budgetoffprint a reference budget (approx, not authoritative)
--max-log-mb <n>2000cap 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.