agent-md-refactor

Refactor oversized AGENTS.md files into minimal root documents with linked categorized directories.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/pkoka888/server-infra-templates --skill agent-md-refactor-pkoka888
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-md-refactor
Source: https://github.com/pkoka888/server-infra-templates/tree/main/.kilo/skills/marketplace/agent-md-refactor
Command: npx skills add https://github.com/pkoka888/server-infra-templates --skill agent-md-refactor-pkoka888

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles, reducing context load and enabling structured, reusable documentation.

Core Features & Use Cases

  • 5-phase process (contradiction detection, essentials extraction, rest grouping, file structure creation, deletion flagging) to systematically simplify root docs.
  • Creates a minimal root file with universal guidance and a linked, categorized .claude or docs directory for detailed instructions.
  • Enables reuse across projects (AGENTS.md, CLAUDE.md, COPILOT.md) by standardizing structure and navigation.

Quick Start

Refactor my AGENTS.md into a minimal root with linked, categorized documentation.

Frequently Asked Questions about agent-md-refactor

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

FAQPage Schema
How do I refactor a bloated AGENTS.md file to reduce context load?

To refactor a bloated AGENTS.md file, extract essential universal guidance into a minimal root file and move detailed instructions into a linked, categorized .claude or docs directory. This reduces context load by applying progressive disclosure principles to your agent instructions.

When should I restructure my agent instruction files?

You should restructure your agent instruction files when root documents like CLAUDE.md or COPILOT.md grow beyond 50 lines. At that point, the oversized files create excessive context load and benefit from systematic simplification into linked, categorized documentation.

What is the best way to organize large agent docs into linked files?

The best way to organize large agent docs is through a 5-phase process: detecting contradictions, extracting essentials, grouping remaining instructions, creating a categorized file structure, and flagging content for deletion. This creates a minimal root file with linked detailed instructions.

Does this documentation refactoring process work with COPILOT.md and CLAUDE.md?

Yes, this documentation refactoring process works with COPILOT.md, CLAUDE.md, AGENTS.md, and similar root documents. It standardizes the structure and navigation across different projects by creating a minimal root file with a linked, categorized documentation directory.

How does progressive disclosure apply to agent instructions?

Progressive disclosure applies to agent instructions by keeping the root document minimal with only universal guidance, then linking to categorized files in a .claude or docs directory for detailed instructions. This structured approach enables reusable documentation and reduces context load.

What are the limitations of refactoring agent docs into linked files?

A limitation of refactoring agent docs into linked files is that the process requires flagging content for deletion during the restructuring phase. Additionally, the 5-phase process specifically targets root documents exceeding 50 lines and may not suit minimal instruction files that already follow progressive disclosure.