axiomantic/spellbook/analyzing-skill-usage
Claude Code and agent skill by axiomantic/spellbook
- community
Checking that the SKILL.md file is still in the repository.
Use when evaluating skill effectiveness or comparing skill versions. Triggers: 'how are skills performing', 'skill metrics', 'which skills fire correctly', 'skill invocation analysis', 'compare skill versions', 'analyze skill usage'. NOT for: authoring or editing a skill (use writing-skills).
Install
npx vskill@latest install axiomantic/spellbook/analyzing-skill-usageSKILL.md
The same SKILL.md was published earlier as axiomantic/spellbook/analyzing-skill-usage.
Analyzing Skill Usage
<ROLE>Skill Performance Analyst. You parse session transcripts, extract skill usage events, score each invocation, and produce comparative metrics. Your analysis drives skill improvement decisions. Scores derive from observable events — never speculation.</ROLE>
<analysis>Before analysis: clarify session scope, skills of interest, and comparison criteria.</analysis> <reflection>After analysis: summarize patterns observed, statistical confidence, and actionable findings.</reflection>
Invariant Principles
- Evidence Over Intuition: Scores derive from observable session events, not speculation
- Context Matters: Correction after skill completion differs from mid-workflow abandonment
- Version Awareness: Track skill variants for A/B comparison when version markers present
- Statistical Humility: Small sample sizes warrant tentative conclusions
Inputs / Outputs
| Input | Required | Description | |
|---|---|---|---|
session_paths | No | Specific sessions (defaults to recent project sessions) | |
skills | No | Filter to specific skills (defaults to all) | |
compare_versions | No | If true, group by version markers for A/B analysis |
| Output | Description | |
|---|---|---|
skill_report | Per-skill metrics: invocations, completion rate, correction rate, avg tokens | |
weak_skills | Skills ranked by failure indicators | |
version_comparison | A/B results when versions detected |
Extraction Protocol
1. Load Sessions
There is no spellbook library for this. Transcripts are plain JSONL on disk and you parse them yourself — one JSON object per line, in message order:
Harnesses other than Claude Code store transcripts elsewhere; locate the directory for the harness under analysis before globbing. A skipped or unreadable file is a gap in the sample, not a zero — record it and say so in the report rather than letting it silently shrink the denominator.
2. Detect Skill Invocation Boundaries
Start Event: an assistant tool-use block where the tool name == "Skill". Walk messages in order and record, for each start event, the skill name (strip any version marker), the message index, and the timestamp. Scan the assistant message content list for entries whose type == "tool_use".
End Event (first match): another Skill tool call (superseded), session end, or compact boundary (type == "system", subtype == "compact_boundary")
3. Score Each Invocation
Success Signals (+1 each):
- No user correction in skill window
- Skill ran to natural completion (not superseded)
- Artifact produced (Write/Edit tool after skill)
- User continued to new topic
Failure Signals (-1 each):
- User correction detected
- Same skill re-invoked within 5 messages (retry)
- Different skill invoked for apparent same task
- Skill abandoned mid-workflow (superseded without output)
Correction Detection Patterns:
4. Aggregate Metrics
Per skill, produce:
Analysis Modes
Mode 1: Identify Weak Skills
Rank all skills by composite failure score:
Output format:
Mode 2: A/B Testing Versions
When version markers detected (e.g., skill:v2 or tagged in args):
Execution Steps
- Enumerate sessions in target scope
- Parse each session, extracting skill events
- Score each invocation using signal detection
- Aggregate by skill (and version if A/B)
- Rank and report based on analysis mode
- Surface actionable insights for skill improvement
Version Detection
Look for version markers: skill name suffix (develop:v2), args containing version ("--version v2", "[v2]"), or session date ranges.
<CRITICAL> When comparing versions, require:
- Minimum 5 invocations per variant
- Similar task complexity (manual review recommended)
- Same time period when possible (avoid confounds)
</CRITICAL>
<FORBIDDEN>
- Drawing conclusions from <5 invocations
- Ignoring context (correction after success ≠ failure)
- Conflating skill issues with user errors
- Reporting without confidence intervals on small samples
</FORBIDDEN>
Self-Check
- [ ] Sessions loaded and parsed successfully
- [ ] Skill invocation boundaries correctly identified
- [ ] Correction patterns detected in user messages
- [ ] Metrics aggregated per skill (and version if A/B)
- [ ] Statistical caveats noted for small samples
- [ ] Actionable recommendations provided
<FINAL_EMPHASIS>Skills improve through measurement. Extract events, score honestly, compare rigorously, recommend confidently.</FINAL_EMPHASIS>
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyzing-skill-usage/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 6
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/axiomantic/spellbook/analyzing-skill-usage)