| name | skill-stocktake |
| description | Periodic quality audit of installed skills + agents. Quick scan (recently changed only) or full audit. Catches decay (broken cross-references, stale paths, bloated descriptions) before sessions silently degrade. |
| allowed-tools | ["Bash","Read","Grep","Glob","AskUserQuestion"] |
/skill-stocktake — Quality Audit of Skills + Agents
Adapted from affaan-m/everything-claude-code/skills/skill-stocktake — DOTS version drops the multi-subagent batch evaluation and uses a leaner deterministic-scan + LLM-judgment two-pass.
When to use
- Quarterly audit (or after a major harness change)
- After porting skills from external suites — confirm none silently broken
- When
/context-budget flags bloat or staleness in any component
- When a skill's behavior surprised you and you suspect decay
Modes
| Mode | Trigger | What it does |
|---|
| Quick scan | /skill-stocktake (default) | Audit only skills/agents modified in last 30 days |
| Full audit | /skill-stocktake full | Audit every skill + agent in the repo |
| Specific | /skill-stocktake <name> | Audit one skill or agent by name |
Audit checklist
For each skill/agent under audit, check:
Frontmatter
Authoring discipline (new or revised skills — per external-skill-ports.md)
Hook integrity (PreToolUse(Bash) hooks specifically)
Documentation labeling (per harness-facts.md rule 5)
Cross-references
Workflow coverage (the "workflow → skill" convention)
Behavior consistency
Hardcoded values
How to run
Phase 1 — Deterministic scan
if [[ "$1" == "full" ]]; then
SKILLS=$(find .claude/skills -mindepth 1 -maxdepth 1 -type d -printf '%f\n')
AGENTS=$(find .claude/agents -maxdepth 1 -name '*.md' -printf '%f\n' | sed 's/\.md$//')
elif [[ -n "$1" ]]; then
SKILLS=$(find .claude/skills -mindepth 1 -maxdepth 1 -type d -name "$1" -printf '%f\n')
AGENTS=$(find .claude/agents -maxdepth 1 -name "$1.md" -printf '%f\n' | sed 's/\.md$//')
else
SKILLS=$(find .claude/skills -mindepth 1 -maxdepth 1 -type d -mtime -30 -printf '%f\n')
AGENTS=$(find .claude/agents -maxdepth 1 -name '*.md' -mtime -30 -printf '%f\n' | sed 's/\.md$//')
fi
echo "Skills to audit:"; echo "$SKILLS"
echo "Agents to audit:"; echo "$AGENTS"
For each skill/agent, mechanically check what can be checked deterministically:
- frontmatter parses as YAML (use
python3 -c "import yaml; yaml.safe_load(...)")
name field matches dir/file name
- description word count
- presence of
triggers: field (flag — undocumented in Claude Code)
- hook command paths exist and are tracked + executable
- paths to
.claude/rules/*, feedback_*.md, docs/, ADR-* resolve
Phase 2 — LLM judgment (the audit checklist)
For each skill/agent, read the SKILL.md / agent.md and judge the remaining items in the checklist that aren't deterministic — promise vs behavior consistency, EXACT-tagged-value freshness, allowed-tools matching actual usage.
This is the model's job, not a script's. Output one verdict per skill/agent:
## /<skill-name>
Status: PASS | NEEDS FIXES | WARN
Findings (if any):
- [SEVERITY] What's wrong — file:line — concrete fix
Phase 3 — Summary report
Aggregate into a single audit report:
SKILL STOCKTAKE — <date>
========================
Mode: <quick scan / full / specific>
Skills audited: N
Agents audited: M
Total findings: X (Y HIGH, Z MEDIUM, W LOW)
Top findings (sorted by severity):
1. [HIGH] <skill> — <issue>
2. ...
PASS: skill-a, skill-b, skill-c
NEEDS FIXES: skill-d (3 findings), skill-e (1 finding)
WARN: skill-f (cross-ref to deprecated path)
If full-audit and findings exist, suggest creating GitHub issues for HIGH/MEDIUM (one issue per skill, not per finding, to keep tracking clean).
Pair with
/context-budget — token-cost audit. Stocktake is correctness/quality; context-budget is cost. Run both quarterly.
/deep-review — applies to one feature/diff; stocktake applies to the harness as a whole.
/security-scan — tools/audit_claude_config.py audits the SAME surface for security (committed secrets, over-broad permissions, hook exfiltration, MCP risk). Stocktake is quality; security-scan is safety. Run it during a full stocktake.
external-skill-ports.md — when fixing findings on a ported skill, re-check the port-drift checklist there.
Notes
- Read-only by default. Suggested fixes are NOT applied automatically.
- Quick scan keeps the audit cheap (5-10 min). Full audit is heavier (~20-30 min depending on skill count) and should be a deliberate sit-down.
- Findings rarely need to block other work — log them and address in a dedicated harness-cleanup commit.