audit-skills

Audits SKILL.md files for duplicates, bloat, and missing self-improvement sections.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/lfuuu/claude-rules --skill audit-skills-lfuuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-skills
Source: https://github.com/lfuuu/claude-rules/tree/main/global-skills/audit-skills
Command: npx skills add https://github.com/lfuuu/claude-rules --skill audit-skills-lfuuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? As a repository of AI agent skills grows, it accumulates duplicated rules, oversized SKILL.md files, stale TODO markers, and skills lacking self-improvement references. This Skill automates the audit of the entire skill corpus so quality regressions are detected instead of silently compounding. ## Core Features & Use Cases - Corpus-wide scanning: Runs the deterministic bash script tools/audit-skills.sh to collect LOC counts, normalized sha1 hashes, and n-gram similarity, then detects duplicates (Jaccard 5-gram >= 0.85), bloated skills, and stale markers. - Tiered apply modes: Generates a dated audit report with prioritized actions — P0 fixes applied automatically (add tier fields, create empty RUNBOOK/FINDINGS/LESSONS files), P1 with confirmation, P2 only by explicit action id. - Self-improvement command: The fix subcommand records an agent error into NEVER blocks, LESSONS.md, or FINDINGS.md with PROTECTED:RULE markers so the same mistake cannot recur. - Use Case: After a large refactor of your claude-rules repository, run the audit to find duplicated role skills across projects, skills missing a tier field, and any critical PROTECTED:RULE that was silently dropped. ## Quick Start Ask the agent to run an audit of all skills in the claude-rules repository and show the summary report with prioritized actions.

Frequently Asked Questions about audit-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Claude Code SKILL.md files for duplicates?

Run the audit-skills skill, which executes tools/audit-skills.sh to compute normalized sha1 hashes and Jaccard 5-gram similarity across all SKILL.md files. Pairs with similarity at or above 0.85 are reported as duplicates in a dated markdown report.

How to detect bloated or oversized agent skill files?

The audit classifies each skill by its tier frontmatter field and flags smart-executor skills over 500 lines and simple-helper skills over 200 lines. Skills missing a tier are flagged with needs_tier so you can classify them first.

Can I run a skill audit in CI or pre-commit hooks?

Yes, the --check mode exits with a nonzero status when any WARNING is present, making it suitable for CI pipelines or pre-commit hooks. It also verifies functional rules like the pre-flight memory check marker in autonomy-protocol.

What does the audit-skills fix command do?

The fix command records an agent error as a permanent rule: NEVER violations go into the SKILL.md NEVER block, procedural errors into references/LESSONS.md, and cognitive traps into references/FINDINGS.md. It only adds rules and never deletes or modifies existing PROTECTED:RULE blocks.

What changes does the audit apply automatically?

Only P0 actions are applied automatically: adding missing tier fields, creating empty RUNBOOK, FINDINGS, and LESSONS reference files, and replacing identical duplicate skills with links. P1 actions need confirmation and P2 actions require an explicit action id.