prune-skills
Skill13 starsChanged 10 days agoMITView on GitHub
Find skills that are redundant, superseded, or too heavy, with evidence, and propose merging or removing them. Counts how often each skill is actually used in recent transcripts, scores description overlap between skills, and lists the biggest context costs. Use when asked to "prune skills", "which skills overlap", "clean up my skills", or when the skill list feels crowded. Proposes only: it never deletes. Not for creating a skill from a session (/skillify) and not for turning session lessons into rules (/debrief).
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11ySkill
- articleSkill
- basic-reviewSkill
- cache-strategySkill
- clean-codeSkill
- cli-for-agentSkill
- content-writerSkill
- daily-qaSkill
- dbmap-auto-offSkill
- dbmapSkill
- db-optimizeSkill
- debriefSkill
- debugSkill
- deep-interviewSkill
- defenseSkill
- diff-walkthroughSkill
- evalSkill
- executing-plansSkill
- finish-branchSkill
- fuzzSkill
- handoffSkill
- humanizeSkill
- iac-scanSkill
- kb-advisorSkill
- minimalist-reviewSkill
- pentestSkill
- perf-profileSkill
- plan-eng-reviewSkill
- playwrightSkill
- pricingSkill
- qa-fullSkill
- quota-resilienceSkill
- skillifySkill
- subagent-driven-developmentSkill
- superskills-doctorSkill
- superskillsSkill
- superskills-upgradeSkill
- tapestrySkill
- tddSkill
- test-coverageSkill
- validate-ideaSkill
- verifySkill
- vet-skillSkill
- web-perfSkill
- worktreesSkill
- write-planSkill
- youtubeSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 69
If it prints CENSUS=missing, say the superskills install could not be found and stop.
- Distinctive: line 72
Read the output with these limits in mind:
- Very specific: line 108
Never delete a skill on one signal.
- Distinctive: line 127
Do not read overlap as proof.
- Distinctive: line 129
Do not quote transcript text anywhere.
- Very specific: line 130
If asked to prune something under vendor/, explain it is upstream-owned and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Prune skills
Fewer, sharper skills route better and cost less context. This skill gathers evidence and proposes. You decide.
Announce at start: "I'm using the prune-skills skill to look for redundant skills."
Step 1: Gather the three signals (scripts, not judgment)
The tools live in the superskills repo, not the working directory. Find the
repo the way /superskills-doctor does and run all three signals in a
single Bash call, since separate calls do not share shell variables.
NAME=prune-skills
WANT=scripts/skill-census/skill_overlap.py
SKILL_DIR="${SKILL_DIR:-}" # set to this skill's base directory when the host provides it
case "$SKILL_DIR" in /*) : ;; *) SKILL_DIR="" ;; esac # only an absolute path is trusted, never resolved against the cwd
ROOT=""
for cand in "${SKILL_DIR:+$SKILL_DIR/../..}" "${CLAUDE_PLUGIN_ROOT}"; do
[ -n "$cand" ] && [ -f "$cand/$WANT" ] && { ROOT="$(cd "$cand" && pwd -P)"; break; }
done
if [ -z "$ROOT" ]; then
# What ./setup creates: Claude Code and ZCode link SKILL.md, OpenCode links it under a
# superskills- prefix, Codex links the whole skill folder (so SKILL.md itself is no symlink).
for probe in "$HOME/.claude/skills/$NAME/SKILL.md" \
"$HOME/.codex/skills/$NAME/SKILL.md" \
"$HOME/.config/opencode/skills/superskills-$NAME/SKILL.md" \
"$HOME/.config/opencode/skills/$NAME/SKILL.md" \
"$HOME/.zcode/skills/$NAME/SKILL.md"; do
# Only a file that resolves to a real path counts; never fall back to the cwd.
[ -f "$probe" ] || continue
real="$(readlink -f "$probe" 2>/dev/null || perl -MCwd=realpath -e 'print realpath($ARGV[0])' "$probe")"
if [ -n "$real" ] && [ -f "$real" ]; then
ROOT="$(cd "$(dirname "$real")/../.." 2>/dev/null && pwd -P)"
[ -f "$ROOT/$WANT" ] && break
ROOT=""
fi
done
fi
if [ -z "$ROOT" ]; then echo "CENSUS=missing"; else
CENSUS="$ROOT/scripts/skill-census"
echo "ROOT=$ROOT"
python3 -I "$CENSUS/skill_overlap.py" pairs "$ROOT"
python3 -I "$CENSUS/skill_usage.py" "$HOME/.claude/projects" --days 90
bash "$ROOT/scripts/skill-context-budget.sh" "$ROOT"
fiThe locate block above is intentionally duplicated in /superskills-doctor, /debrief and /prune-skills (a skill needs the repo path before it can source anything); tests/locate-block.bats keeps the three identical.
If it prints CENSUS=missing, say the superskills install could not be found
and stop. Do not improvise the numbers.
Read the output with these limits in mind:
- Overlap has low recall. It is a coarse word-match score (Jaccard on
descriptions and triggers, default threshold 0.15). Real neighbours such as
qa-fullandbasic-reviewscore only about 0.09 and do not appear. An empty or short candidate list does NOT mean there are no overlaps. Also read the skill descriptions yourself (nameanddescriptionlines underskills/anddesign-skills/) and use your own judgment to spot pairs the score missed. Conversely, a listed pair can be noise. - Usage is Claude Code only.
skill_usage.pyprints# sessions=N subagent_files=M(sessions are top-level transcripts only; subagent transcripts are counted separately, and skill calls inside them still count) and thenskill<TAB>count: counts only, never message content. Use of a skill from Codex or Cursor is invisible, so say so in the report. - Overlap and usage cover the flat trees
skills/anddesign-skills/. The context-cost script only walksskills/, so design skills get no context-cost figures: say so plainly instead of guessing them.vendor/,marketing-skills/and generated shims are upstream-owned or generated and are never candidates. - Ignore built-in slash commands in the usage output (
compact,clear,model,login,effort,resume): they are not skills. The counter already strips aplugin:prefix, soplug:reviewcounts asreview.
Step 2: Judge each candidate pair
For each pair from the script, and each pair you spotted yourself, read both SKILL.md files and decide which of three things is true:
- Duplicate: same job, same trigger. Propose folding the weaker into the stronger and keeping both names as trigger phrases in the survivor.
- Neighbours: similar words, different jobs. Leave both, and check that each description names the other as a boundary.
- Superseded: one covers everything the other does and more.
Step 3: Apply the deletion gate
Never delete a skill on one signal. A removal proposal needs both: overlap
with a named survivor, and a usage window of at least 30 sessions (the
# sessions=N line) showing the candidate is not carrying its own weight. A
skill with zero uses is not redundant if its job is unique: rare and unique
stays. With fewer than 30 sessions in the window, report "insufficient data"
instead of a verdict.
Step 4: Propose, then stop
This skill proposes only. It never deletes or edits a skill on its own. Reply
with a short list, in plain words, per candidate: what overlaps with what, the
usage numbers, your recommendation and the cost of being wrong. Wait for a yes
per item. On a yes: do the change on a branch with git rm or an edit, run
./scripts/lint-skills.sh and ./tests/run.sh, and run ./setup so dangling
links are cleaned. A merge changes a skill's description or body, which is a
behaviour change: tell the user to run /eval before pushing.
Gotchas
- Do not read overlap as proof. Two skills can share most words and do different jobs.
- Do not quote transcript text anywhere. Only names and counts leave the tools.
- If asked to prune something under
vendor/, explain it is upstream-owned and stop.
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.

