config-audit

Audit Claude Code configuration files against actual codebase patterns and flag stale rules.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/hpark0011/mirror --skill config-audit-hpark0011
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: config-audit
Source: https://github.com/hpark0011/mirror/tree/main/.agents/skills/audit-context
Command: npx skills add https://github.com/hpark0011/mirror --skill config-audit-hpark0011

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding assistant configuration files like CLAUDE.md and AGENTS.md drift out of sync with the codebase over time, accumulating stale rules, contradictions, and bloated instructions that waste context budget on every turn. ## Core Features & Use Cases - Stale Rule Detection: Compares rules in AGENTS.md, CLAUDE.md, .claude/rules/, and .claude/skills/ against actual codebase patterns found via grep and git history. - Placement Analysis: Applies a placement test to decide whether content belongs in a rule, a doc, or the lean AGENTS.md index, flagging duplication and missing single sources of truth. - Budget Auditing: Identifies untargeted rules missing paths: scoping and generic best-practice rules that tax every turn without adding value. - Use Case: After months of accumulated instructions, run the audit to receive a concrete diff proposing which rules to remove, merge, extract, or rescope. ## Quick Start Ask the assistant to audit my CLAUDE.md and rules against the current codebase and propose a cleanup diff.

Frequently Asked Questions about config-audit

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

FAQPage Schema
How do I audit my CLAUDE.md file for stale rules?▼

Run the config audit to read CLAUDE.md, AGENTS.md, and .claude/rules/ files, then compare each rule against actual codebase patterns found via grep. Rules referencing patterns no longer in the code are flagged for removal in a proposed diff.

What should go in AGENTS.md versus rules or docs?▼

AGENTS.md should be a lean index holding only what needs active context every turn. Action-guiding content belongs in rules with paths scoping, descriptive content belongs in docs, and everything else is referenced by one-line pointers.

How long should an AGENTS.md file be?▼

AGENTS.md over roughly 200 lines is almost always a container rather than an index. Long files are a smell indicating content should be extracted to rules or docs and replaced with pointers.

Does the config audit apply changes automatically?▼

No, the audit proposes changes as a concrete diff and does not apply anything without explicit confirmation. You review the flagged removals, merges, and extractions before any file is modified.

When should I use paths scoping on Claude Code rules?▼

Use paths scoping whenever a rule only applies to specific files or directories. Untargeted rules tax context on every turn, so the audit flags rules missing paths targeting that should have it.