home / skills / bahayonghang / my-claude-code-settings / skill-audit

skill-audit skill

/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-audit

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
1.2 KB
---
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/.

Overview

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.

How this skill works

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.

When to use it

  • Before publishing or releasing a Claude Code skill package
  • When reviewing a colleague's skill for policy or structure compliance
  • When optimizing prompt and response token consumption
  • Prior to merging a skill into a shared skills directory
  • During routine quality audits of multiple sibling skills

Best practices

  • Keep the core intent unchanged when applying fixes; move references to resources/ as needed
  • Resolve all Critical and Recommended issues before deployment
  • Use the token budget table to prioritize large token reductions first
  • Run overlap detection whenever sibling skills share a parent directory
  • Maintain local CHECKLIST.md and PATTERNS.md to keep audits deterministic

Example use cases

  • Audit a newly authored skill to ensure it meets team conventions and token budgets
  • Refactor an existing skill to reduce average call tokens and lower cost
  • Identify and resolve functional overlap between sibling skills before consolidation
  • Produce a concise, deployment-ready manifest that fixes high-severity findings

FAQ

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.