
Agent Md Refactor
If your AGENTS.md or CLAUDE.md has ballooned into a 500-line monolith, this walks you through splitting it into a minimal root file plus organized, linked documentation. It's built around progressive disclosure: keep only universal info at the top (commands, project basics), then move language-specific rules, testing patterns, and style guides into separate files like typescript.md or code-style.md. The process flags contradictions first, then helps you prune vague instructions like "write clean code" that just waste tokens. The checklist aims for a root file under 50 lines. Solid if you're drowning in agent instructions and need a structured cleanup.
- skills.sh installs
- 446
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill agent-md-refactor --agent claude-codeInstalls into .claude/skills of the current project.
Files
Agent MD Refactor
Refactor bloated agent instruction files (AGENTS.md, CLAUDE.md, COPILOT.md, etc.) to follow progressive disclosure principles - keeping essentials at root and organizing the rest into linked, categorized files.
Triggers
Use this skill when:
- "refactor my AGENTS.md" / "refactor my CLAUDE.md"
- "split my agent instructions"
- "organize my CLAUDE.md file"
- "my AGENTS.md is too long"
- "progressive disclosure for my instructions"
- "clean up my agent config"
Quick Reference
| Phase | Action | Output |
|---|---|---|
| 1. Analyze | Find contradictions | List of conflicts to resolve |
| 2. Extract | Identify essentials | Core instructions for root file |
| 3. Categorize | Group remaining instructions | Logical categories |
| 4. Structure | Create file hierarchy | Root + linked files |
| 5. Prune | Flag for deletion | Redundant/vague instructions |
Process
Phase 1: Find Contradictions
Identify any instructions that conflict with each other.
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Documentation, Code Review & Quality, AI & Agent Building
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Autonomous Agent Patterns446
- D3 Viz445
- Manim444
- Marketing Psychology443
- Requirements Clarity442
- Frontend To Backend Requirements441
- Canvas Design439
- Nowait Reasoning Optimizer438
- Code Review Checklist437
- Prompt Caching437
- Commit435
- Vercel Deployment433
- C4 Architecture430
- Information Security Manager Iso27001428
- Mlflow427
- Statsmodels426
- Prompt Library423
- Chroma421
- Telegram Mini App420
- Pricing Strategy419
- Seo419
- Evaluating Llms Harness418
- Ml Paper Writing416
- Openalex Database416