home / skills / bahayonghang / my-claude-code-settings / skill_audit
/content/skills/skill-meta-skills/skill_audit
This skill analyzes Claude Code skills for compliance and token efficiency, enabling rapid improvement through actionable recommendations.
npx playbooks add skill bahayonghang/my-claude-code-settings --skill skill_auditReview the files below or copy the command above to add this skill to your agents.
---
name: skill-audit
description: Analyze Claude Code skills for compliance and token efficiency. Use when reviewing skills.
category: skill-management
tags:
- optimization
- analysis
- skill-authoring
argument-hint: [skill-directory-path]
allowed-tools: Read, Glob, Grep, Bash(python *)
---
Audit the skill at `$ARGUMENTS`.
## Steps
1. If `$ARGUMENTS` empty or no SKILL.md found, report error.
2. Run: `python "$SKILL_DIR/scripts/analyze_skill.py" "$ARGUMENTS"`
3. Read `$SKILL_DIR/resources/CHECKLIST.md` and `$SKILL_DIR/resources/PATTERNS.md`.
4. Cross-reference JSON with CHECKLIST and PATTERNS.
5. If parent directory has sibling skills, run: `python "$SKILL_DIR/scripts/detect_overlap.py" "<parent>" --target "<name>"`
6. Present: **Critical → Recommended → Optional**, each with before/after fix.
7. Output optimized SKILL.md resolving Critical and Recommended issues.
## Output
Issues by severity, token budget table (Before/After/Δ), overlap report (if any), optimized SKILL.md.
## Rules
- Official frontmatter fields only.
- Body < 300 tokens, imperative voice, no educational content.
- Preserve intent. Move reference content to resources/.
This skill audits Claude Code skills for compliance, security patterns, and token efficiency. It produces actionable issue lists prioritized by severity and an optimized primary manifest that fixes critical and recommended problems while preserving original intent. The output includes token budget comparisons and any detected functional overlap with sibling skills.
The auditor runs a static analysis of the skill package, extracts the skill manifest and analysis JSON, and cross-references findings against checklist and pattern libraries. It detects overlapping behavior with sibling skills in the same parent directory and computes token usage before and after proposed fixes. Finally, it generates prioritized remediation items and an updated manifest that applies Critical and Recommended fixes.
What does the audit output include?
A prioritized list of issues (Critical → Recommended → Optional), a token budget table showing Before/After/Δ, an overlap report if siblings exist, and an optimized primary manifest applying Critical and Recommended fixes.
Will the audit change intent or behavior?
No. Fixes preserve the original intent; changes focus on compliance, security patterns, and token efficiency while moving reference material into resources/.