Skip to main content
skill

agent-md-refactor — Claude Code skill: what it does, how to install

Splits oversized CLAUDE.md or AGENTS.md files into modular docs. It leaves only universal directives in root and links out to detailed subtopics.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill development/agent-md-refactor
Open on GitHub

What agent-md-refactor does

The skill breaks monolithic agent instruction files into a lean root file and linked documents inside .claude/. The main document retains only context relevant to every single task: a brief project summary, package manager nuances, and custom build scripts. Specific areas like TypeScript rules, testing practices, and architecture patterns migrate into standalone guides.

Execution moves across five distinct steps: flagging contradictions, extracting essential defaults, sorting guidelines into topical files, generating markdown links, and pruning dead weight. It targets vague phrasing, obvious programming basics, and redundant settings for deletion.

If your current instructions contain opposing rules, the skill pauses immediately during analysis and demands a manual resolution.

What it helps with

  • shrink bloated root CLAUDE.md files
  • uncover conflicting guidelines inside agent documentation
  • strip vague rules and generic advice from instructions
  • split coding conventions into focused topic files

Example prompts for the agent

  • Refactor my CLAUDE.md using progressive disclosure
  • Split this long AGENTS.md into separate topic files
  • Check agent instructions for conflicts and eliminate fluff

How to install agent-md-refactor

1claude-code-templates

npx claude-code-templates@latest --skill development/agent-md-refactor

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill agent-md-refactor -a claude-code

3Manually: put the files in place

~/.claude/skills/agent-md-refactor/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agent-md-refactor/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about agent-md-refactor

How to install agent-md-refactor in Claude Code?

Run npx claude-code-templates@latest --skill development/agent-md-refactor in your terminal.

What is agent-md-refactor?

It is an agent skill that restructures monolithic instruction files into a clean root index linked to specific guideline documents.

What content stays in the root instruction file?

The root retains only project-wide essentials: a single-sentence overview, non-standard package managers, custom test or build commands, and universal requirements.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor