analyze-skills
Analyze ~/.claude session files to find unused agent skills and reduce context token waste. Scans subagent JSONL files for injected skills and cross-references with agent responses.
npx skills add majiayu000/claude-skill-registry --skill analyze-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Analyze Agent Skill Usage You are analyzing Claude Code session files to determine which agent skills are actually used vs wasted context tokens. ## What This Does Scans `~/.claude/projects/` for subagent JSONL files, detects which skills were injected into each agent, and checks whether the agent actually referenced that skill's content. Produces a report with recommendations to optimize agent configurations. ## Step 1: Find Subagent Files Find all subagent JSONL files for the target project: ```bash # If project argument provided, filter by it. Otherwise use current project. # Subagent files live at: ~/.claude/projects/<encoded-path>/<session-id>/subagents/agent-*.jsonl find ~/.claude/projects/ -path "*/subagents/agent-*.jsonl" -type f 2>/dev/null ``` If `$ARGUMENTS.project` is provided, filter paths containing that project name. If not provided, use the current working directory to determine the project. ## Step 2: Read Agent Definitions Read all agent files from `.claude/agents/*.md` in the current project. Extract: - Agent name (from frontmatter `name:`) - Skills list (from frontmatter `skills:`) ## Step 3: Analyze Each Subagent File For each subagent JSONL file: ### 3a. Ide
- What This Does
- Step 1: Find Subagent Files
- Step 2: Read Agent Definitions
- Step 3: Analyze Each Subagent File
- 3a. Identify the agent type
- 3b. Extract injected skills
- 3c. Check skill usage
- Step 4: Build Usage Matrix
- Step 5: Generate Report
- 5a. Per-Agent Summary
- 5b. Token Savings Estimate
- 5c. Actionable Changes
- 5d. Skills Not Assigned to Any Agent
- Step 6: Ask User
If project argument provided, filter by it. Otherwise use current project. Subagent files live at: ~/.claude/projects/<encoded-path>/<session-id>/subagents/agent-*.jsonl find ~/.claude/projects/ -path "*/subagents/agent-*.jsonl" -type f 2>/dev/null
What does the analyze-skills skill do?
Analyze ~/.claude session files to find unused agent skills and reduce context token waste. Scans subagent JSONL files for injected skills and cross-references with agent responses.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill analyze-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
