| 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 โ TAOM 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, and security-vet the source first with
python tools/audit_claude_config.py --root <foreign-skill> --external (per external-skill-ports.md)
- 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) plus SkillSpector-derived skill-threat categories (excessive-agency, memory-poisoning, prompt-leakage, tool-misuse, rogue-agent, output-handling) + Python-AST + clean-room YARA. Stocktake is quality; security-scan is safety. Run it (self-audit) during a full stocktake; run it with --root <dir> --external to vet a FOREIGN skill at full severity BEFORE adoption.
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.