finding-unused-customizations
Skill0 starsChanged 32 days agoMITView on GitHub
List the custom skills and subagents defined for Claude Code (user-level ~/.claude and the current project's .claude), count how often each was used in recent Claude Code transcripts, and report the ones not used in the last N days (default 14) as a table with a one-line description of each. Use when the user asks which custom skills or agents have gone unused, are stale, or are candidates for cleanup. Claude Code only. Not for unused code, plugins, MCP servers, hooks, or other tools' logs, and it never deletes or disables anything.
In this repository13 other files it gives its agents.
- ai-credit-efficient-reviewSkill
- branch-tldrSkill
- drafting-tweet-from-todaySkill
- hacker-news-digest-jaSkill
- japanese-tech-writingSkill
- natural-japaneseSkill
- pr-branch-composition-checkSkill
- prompt-feedback-skillSkill
- resume-improverSkill
- semantic-commit-helperSkill
- session-stockerSkill
- syncing-forked-skillsSkill
- tf-destroy-plan-inverterSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 22
If the value is not a positive integer, say so in one line and stop.
- Very specific: line 25
If the user mentions running Claude Code in another environment too, ask whether to include that environment's projects directory and pass …
- Very specific: line 34
Use python -I instead where python3 does not exist.
- Distinctive: line 45
If the script fails, show the error as-is and stop.
- Distinctive: line 61
If the issue says the file is unreadable, try reading it once more with Read.
- Distinctive: line 63
If nothing is unused, say so in one line instead of the table.
- Distinctive: line 67
After the table, add only the items below that apply, one line each:
- Distinctive: line 82
Use outside Claude Code transcripts is not counted: other tools such as Codex or Copilot CLI, Claude Code on other machines, and cloud …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Finding Unused Customizations
Find the custom skills and subagents that were not used recently. The only deliverable is the report in chat. Do not delete, move, disable, or edit any definition.
Arguments
$ARGUMENTS takes the form [<days>] [--projects-dir <dir> ...].
<days>: length of the period in days.- Defaults to 14.
- The period starts at local midnight
<days>days before today. - If the value is not a positive integer, say so in one line and stop.
--projects-dir <dir>: an extra directory of Claude Code transcripts to scan, repeatable.~/.claude/projectsis always scanned.
If the user mentions running Claude Code in another environment too, ask whether to include that environment's projects directory and pass it with --projects-dir.
Examples of such an environment: Windows and WSL, or a second home directory.
1. Run the script
python3 -I ~/.claude/skills/finding-unused-customizations/scripts/find_unused.py --days <days> [--projects-dir <dir> ...]Use python -I instead where python3 does not exist. Run it from the project root, because project-level definitions are read from ./.claude.
The script prints one JSON document:
definitions: every agent (*.mdinagents/) and skill (each directory inskills/) at theuserandprojectscope, withdescription,uses, andissuesunmatched_invocations: names that were invoked in the period but match no definition. Plugin-qualified names (plugin:name) are left outperiod_utc,projects_dirs,missing_projects_dirs,transcript_files: what was scanned
Usage is counted from three kinds of records in the period: Skill tool calls, Agent tool calls by subagent_type, and slash commands the user typed.
A skill matches by its directory name or its frontmatter name.
If the script fails, show the error as-is and stop. Do not fall back to grepping the transcripts by hand.
2. Build the table
List every definition whose uses is 0, agents first, then skills, each in alphabetical order. Use these columns, with headers in the user's language:
| Column | Content |
| Kind | agent or skill |
| Name | the directory name for a skill, the file name without .md for an agent |
| Scope | user or project |
| Description | what it does, in one short phrase in the user's language, written from the frontmatter description |
For a definition whose description is null, read the issues instead and say what is wrong in the Description cell, for example:
- that the directory has no
SKILL.mdand is probably not a skill.
If the issue says the file is unreadable, try reading it once more with Read; if that also fails, say it could not be read.
If nothing is unused, say so in one line instead of the table.
3. Report what else was found
After the table, add only the items below that apply, one line each:
- Definitions with
issues, whether used or not:- unreadable files or broken links
- a missing
SKILL.md - a frontmatter that is not closed or whose closing
---is indented - a frontmatter
namethat differs from the directory name
unmatched_invocationsthat look like custom skills or agents that were renamed or removed.- Ignore built-in slash commands (
compact,model, and so on) and built-in agents (Explore,general-purpose, and so on).
- Ignore built-in slash commands (
missing_projects_dirs, if any
4. State the coverage
End with the period and the transcript directories that were scanned, then the blind spots, so the user does not delete something that is in use:
- Use outside Claude Code transcripts is not counted: other tools such as Codex or Copilot CLI, Claude Code on other machines, and cloud sessions
- A skill followed by reading its
SKILL.mddirectly, without the Skill tool or a slash command, is not counted - Claude Code deletes transcripts older than
cleanupPeriodDays(30 days by default). If<days>is longer than that setting, older use may already be gone
What to avoid
- Deciding for the user that something should be deleted. Report the facts; the user decides
- Listing used definitions in the table, or listing built-in agents and plugin skills as custom ones
- Saying a definition is unused when its file could not be read and the reason is unclear. Say it could not be checked
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.

