agent-md-refactor

Refactor oversized agent instruction files into a minimal root and linked topic documents.

Updated Aug 31, 2023
One-click install
npx skills add https://github.com/tbqh511/dalatbds_broker_backend --skill agent-md-refactor-tbqh511
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-md-refactor
Source: https://github.com/tbqh511/dalatbds_broker_backend/tree/main/.kilo/skills/agent-md-refactor
Command: npx skills add https://github.com/tbqh511/dalatbds_broker_backend --skill agent-md-refactor-tbqh511

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long, monolithic agent instruction files (CLAUDE.md, AGENTS.md, COPILOT.md) become noisy, contradictory, and expensive to load into agent contexts; this skill reduces context waste and maintenance overhead by extracting only universally applicable rules into a minimal root and moving the rest into focused, linked documents.

Core Features & Use Cases

  • Contradiction detection: Finds conflicting instructions and surfaces questions for resolution before refactoring.
  • Essentials extraction: Identifies universal rules that must remain in the root file and separates language- or task-specific details.
  • Intelligent grouping and templating: Organizes remaining content into 3–8 clear topic files with consistent templates and verifies cross-file links.
  • Pruning recommendations: Flags vague, redundant, or outdated instructions for deletion to minimize token usage.
  • Use case: Transform an oversized CLAUDE.md into a one-page root with links to .claude/testing.md, .claude/code-style.md, and other focused docs.

Quick Start

Refactor my AGENTS.md into a minimal root file and a set of linked topic files using progressive disclosure.

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 CLAUDE.md file to reduce context waste?

You can refactor a bloated CLAUDE.md by extracting universally applicable rules into a minimal root file and moving task-specific details into linked topic files. This progressive disclosure approach reduces context waste and maintenance overhead.

What is progressive disclosure for agent instruction files?

Progressive disclosure for agent instruction files is an md-organization strategy that separates universal root instructions from themed markdown documents. It replaces monolithic files with a minimal root linking to focused docs, minimizing context loading costs.

When should I split my AGENTS.md into linked topic files?

Split your AGENTS.md into linked topic files when it exceeds recommended length, mixes unrelated topics, or contains conflicting guidelines. These issues create noise, cause contradictions, and increase token usage during agent operations.

Can I detect contradictions in my COPILOT.md before reorganizing it?

Yes, you can detect contradictions in your COPILOT.md before reorganizing it by scanning for conflicting instructions. The refactoring process surfaces contradictions as questions for resolution before extracting universal root instructions and grouping remaining content.

How do I organize remaining content into themed markdown files after extracting root instructions?

Organize remaining content into themed markdown files by grouping related details into 3 to 8 clear topic files with consistent templates. The process also verifies cross-file links and recommends deleting vague, redundant, or outdated instructions.

What are the limitations of progressive disclosure for agent docs?

A limitation of progressive disclosure for agent docs is the potential for broken cross-file links if templates are not properly verified. Additionally, automated pruning recommendations might flag vague or outdated instructions for deletion that still hold niche relevance.