New advertisers: 50% off your first month with code FIRSTMONTHSee slots
softaworks avatar

Agent Md Refactor

Restructures bloated agent instruction files into a minimal root plus categorized, linked documents.

skills.sh installs
4.3K
GitHub stars
2.7K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Runs a five-phase process: find contradictions, extract essentials, group the rest, create the file hierarchy, and flag redundant instructions
  • Includes root and linked-file templates, plus a before-and-after example of a bloated CLAUDE.md split into progressive disclosure
  • Enforces a root file under 50 lines and a 3 to 8 file limit for topic groups, with each linked file self-contained
  • Designed for projects whose AGENTS.md or CLAUDE.md has grown long and needs its instructions reorganized

Install

$ npx -y skills add softaworks/agent-toolkit --skill agent-md-refactor -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

PhaseActionOutput
1. AnalyzeFind contradictionsList of conflicts to resolve
2. ExtractIdentify essentialsCore instructions for root file
3. CategorizeGroup remaining instructionsLogical categories
4. StructureCreate file hierarchyRoot + linked files
5. PruneFlag for deletionRedundant/vague instructions

Process

Phase 1: Find Contradictions

Identify any instructions that conflict with each other.

Details

Repository
github.com/softaworks/agent-toolkit
Categories
Memory & Context, Agent Workflow & Planning

More from softaworks/agent-toolkit

All 40

Similar to Agent Md Refactor

More Memory & Context