SKILL 34 / PKM · DEEP DIVE

Skill Library Hygiene

Consistent naming · dedup · deprecation · retiring by usage, and when to fold a skill back into the prompt

2026-10-05 · BigCat

Last issue showed how to grow skills out of repeated work. This is the other half: skills don't die on their own, and the ones nobody uses keep charging you context on every turn. Below are 9 real tools you can install or run today (six official commands and settings, three community tools): first how to run a checkup, then how to prune.

Series → Skill 33 Growing a Skill From Repetition · Skill 6 Official Authoring Guide · Skill 30 How Risky Are Other People's Skills

// WHY THIS MATTERS

The Claude Code docs put it bluntly in "Find unused skills": Every skill in the skill listing adds to your context on every turn, whether or not Claude ever uses it. Codebases have linters and dead-code detection; skill libraries only recently got the equivalent. The good news is that it exists now. The catch is that it only tells you who isn't being used. Whether to prune, and how, is still your call.

// 01

What it does for you · install · a first command that runs

Claim: a checkup takes two built-in commands: /skill-doctor to see what's dead weight, then /skills to dim it with the space bar.

What it replaces is pruning from memory. You remember which skills feel useful, but not what each one costs in tokens or when it last ran.

# 1. Official checkup (Claude Code v2.1.252+, run in the terminal)
/skill-doctor
# Interactive: opens in the /plugin manager's Stats tab; with -p it prints text

# 2. Official switch: highlight a skill, press Space to cycle states, Esc to save
/skills
# Written to .claude/settings.local.json, equivalent to:
{ "skillOverrides": { "legacy-context": "name-only", "deploy": "off" } }

# 3. Plugin skills ignore skillOverrides, so check them separately
claude plugin details <name>   # Always-on line = tokens added to every session

The /skill-doctor report lists each skill's context cost and invocation count, flags the ones that have never run, and tells you where to turn them off. The docs say to start with the most expensive ones. It also lists plugins you haven't used recently, and the Installed tab in /plugin has a Not used recently group plus a Last used line on each plugin.

When it won't help: bundled skills and enterprise skills are left out of the report. Run it over Remote Control from your phone or browser and you get "Skill usage reports are not available on this connection". Run it in the terminal on the machine where the session lives.
// 02

Mechanism: what actually breaks when skills pile up

Claim: the count itself isn't the problem. Three things are: the listing budget squeezes out descriptions, same-name skills shadow each other silently, and loaded bodies never leave.

1. The listing budget: least-used skills go quiet first

Per the docs, the listing's character budget is 1% of the model's context window. When it overflows, Claude Code drops descriptions starting with the skills you invoke least. The name stays, but the keywords vanish, so Claude rarely matches the skill on its own. The Skills row in /context shows the size after trimming, and /doctor estimates the listing cost and its biggest contributors. You can raise skillListingBudgetFraction (for example 0.02), but that delays the problem. It doesn't fix it.

2. Name shadowing: no error

For same-name skills the order is enterprise > personal > project. With both ~/.claude/skills/deploy and the repo's .claude/skills/deploy, /deploy runs your personal copy. A teammate updates the project version, you keep running the old one, and nothing warns you. Plugin skills are namespaced as /plugin-name:skill-name, so they don't collide on names, but two similar entries can end up competing for the same requests.

3. Bodies stay resident: invoke once, it stays

Once a skill runs, its body stays in the conversation as a message, and later turns don't re-read the file. During auto-compaction each skill keeps only its first 5,000 tokens, all skills share 25,000 tokens, and the budget fills from the most recently invoked skill. Invoke too many in one session and the earlier ones can drop out entirely after compaction.

// 03

Real usage and limits: naming, dedup, deprecation, folding back

Claim: each of the four jobs already has a tool. The criteria come last and decide which path a given skill takes.

Consistent naming: let a machine find the mistakes

The Agent Skills spec allows only lowercase letters, digits and hyphens in name, caps it at 64 characters, and requires it to match the parent directory. Check with skills-ref: skills-ref validate ./my-skill. The official "Skill authoring best practices" suggests gerund names (processing-pdfs) and names what to avoid: vague names like helper, utils and tools, and inconsistent patterns within your collection.

Dedup: two layers of detection

Deprecation: walk the state ladder instead of deleting outright

The four skillOverrides states already form a deprecation path: on → name-only (name only, frees description budget) → user-invocable-only (Claude can't see it, you can still type /name) → off (hidden everywhere). Once a while has passed and nobody missed it, delete the folder. For plugins, use /plugin disable or /plugin uninstall. For outdated sections inside a skill, the official guide suggests a collapsed "Old patterns" section instead of leaving them mixed into the body.

Libraries shared across tools: keep one source

If you use several agents, the classic failure is three copies with only one of them updated. Vercel's skills CLI (about 33.1k stars on its GitHub repo page, read 2026-10) symlinks every agent directory to one canonical copy by default. npx skills list shows what's installed, npx skills update upgrades, and npx skills remove <name> uninstalls. When to skip it: if you only use Claude Code, the built-in /skills and /plugin are enough.

Criteria: keep it, demote it, or fold it back into the prompt

// 04

Costs and alternatives

Claim: cleanup costs something too. The cheapest hygiene is installing less.

1. "Never invoked" doesn't mean useless

Some skills run once a quarter, and that one run matters, like a release checklist. /skill-doctor counts invocations. It doesn't measure value. For skills like that, demoting to user-invocable-only is safer than deleting.

2. Demotion changes behavior

At name-only the description is gone, so anything that relied on keyword auto-triggering stops working. Verify after the change. The official method is to pick a few realistic prompts and run each in a fresh session with the skill on and again with it off. For plugin skills, claude plugin eval adds a no-plugin baseline automatically.

3. The tooling needs hygiene too

Community dedup tools and cross-agent managers are new dependencies. They register hooks, create their own directories and need updating. Before you install two tools to clean up ten skills, do the math.

Alternatives, cheapest first: install nothing and run /skill-doctor once a month → adjust states by hand in /skills → once names are consistent, run skills-ref validate over them → when skills overlap, use skill-creator's trigger evals → move to npx skills only when several agents share one library → install a community conflict scanner only when the library is too big to review by eye.
Sources: Claude Code · Extend Claude with skills (1% budget, same-name precedence, the four skillOverrides states, /skill-doctor, 5,000 / 25,000 tokens on compaction) · Discover plugins (Not used recently, claude plugin details) (both read 2026-10)

// One-page buyer's card

Start with these three: 1. /skill-doctor. Once a month, read the never-invoked list from most to least expensive. 2. /skills. Press Space to demote suspects to name-only or user-only, wait two weeks, then switch them off. 3. claude plugin details <name> plus Not used recently in /plugin. Skills inside plugins ignore skillOverrides, so prune them here.

Add as needed: skills-ref validate (batch-check names after standardizing) · skill-creator's Description Optimization (retune the description after merging two overlapping skills) · npx skills (one library across several agents) · MindiveLabs/skill-doctor (when the library needs semantic conflict scanning and you have read its hooks).

Don't: raise skillListingBudgetFraction to hide the bloat · keep a same-name skill in both your personal and project directories · demote without verifying · stretch one or two rules into a whole skill.

// Glossary

skill listing
Every skill's name and description, resident in context on every turn, budgeted at about 1% of the context window.
skillOverrides
A setting that puts a skill, by name, into one of four states (on / name-only / user-invocable-only / off) without editing its SKILL.md.
name shadow
When two skills share a name, only the higher-priority one runs and the other silently stops working, with no error.
near-miss
A request that shares keywords with a skill but shouldn't trigger it. These are the most valuable negatives in a trigger eval.
symlink
A filesystem shortcut that points to another file, letting several agent directories share one copy of a skill.

// Three open questions

The official /skill-doctor and the community skill-doctor share a name. What happens if I install the community one?
It depends on how you install it. Installed as a plugin, its skill is namespaced and coexists with the official command. Installed with the git clone in its README, it lands in ~/.claude/skills/skill-doctor as a personal skill named skill-doctor. Under the official rules, in a terminal session a personal skill replaces a built-in command of the same name, so typing /skill-doctor no longer shows the official usage report, and nothing tells you. That little episode is the whole point of this issue: even a conflict-detection tool can walk into a naming conflict.
How many skills is "too many"?
The docs don't give a count, only a budget: the listing gets 1% of the context window, and past that, descriptions get dropped. So the real ceiling depends on how long your descriptions are and how big the model's window is. Rather than counting, check the Skills row in /context and look for an over-budget warning in the --debug log. If the warning is there, you have too many.
Should I merge my common skills into one big skill to save listing space?
No. Merging saves a few description lines in the listing. In exchange, every invocation drags the whole body into context, and triggering gets fuzzier. The official authoring guide suggests keeping the body under 500 lines and using progressive disclosure across separate files. The reason to merge is overlapping triggers, not the count.

// Further reading