Agent skill · AI & Agents

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill analyze-skills --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/analysis/analyze-skills/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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's inside
Steps it walks through
  1. What This Does
  2. Step 1: Find Subagent Files
  3. Step 2: Read Agent Definitions
  4. Step 3: Analyze Each Subagent File
  5. 3a. Identify the agent type
  6. 3b. Extract injected skills
  7. 3c. Check skill usage
  8. Step 4: Build Usage Matrix
  9. Step 5: Generate Report
  10. 5a. Per-Agent Summary
  11. 5b. Token Savings Estimate
  12. 5c. Actionable Changes
  13. 5d. Skills Not Assigned to Any Agent
  14. Step 6: Ask User
Ships with 1 file
  • metadata.json
Commands it runs
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
More from claude-skill-registry
All skills →
About this skill
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.

Keep going