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, guiding improvements to optimize performance and reliability.
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.
metadata:
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 skill packages for compliance and token efficiency, producing actionable fixes and an optimized skill manifest. It automates static checks, pattern matching, overlap detection with sibling skills, and outputs prioritized issues plus a token budget comparison. The goal is a concise, deployable skill package that preserves intent while reducing tokens and policy risks.
The auditor runs automated scripts to analyze the target skill package and reads local checklist and pattern files to validate structure and conventions. It cross-references findings with defined patterns and checklist items, optionally detects overlap with sibling skills in the parent directory, and classifies issues by severity. Final outputs include a prioritized issue list (Critical → Recommended → Optional), a token budget table (Before/After/Δ), an overlap report if relevant, and an optimized skill manifest that resolves critical and recommended items.
What outputs will I get from an audit?
A severity-ranked issue list (Critical → Recommended → Optional), a token budget table showing Before/After/Δ, an overlap report if siblings exist, and an optimized skill manifest that implements critical and recommended fixes.
Will this tool change skill intent or add educational content?
No. Fixes preserve the original intent and use imperative voice; reference material is moved to resources/ to keep the manifest concise.