One-click install
npx skills add https://github.com/compozy/agh --skill agent-md-refactor-compozy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-md-refactor
Source: https://github.com/compozy/agh/tree/main/.agents/skills/agent-md-refactor
Command: npx skills add https://github.com/compozy/agh --skill agent-md-refactor-compozy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes bloated, contradictory, and hard-to-maintain agent instruction files by minimizing the root document and moving focused guidance into linked sub-documents to reduce context waste.

Core Features & Use Cases

  • Contradiction detection: Finds conflicting instructions and asks you to resolve precedence before restructuring.
  • Progressive disclosure refactor: Extracts only universal essentials into the root and relocates everything else into categorized files.
  • Structure generation + pruning: Produces a consistent hierarchy of linked markdown files and flags redundant, vague, default, or outdated instructions for deletion.
  • Use case: Turn an AGENTS.md or CLAUDE.md that has grown to hundreds of lines into a small root with a handful of topic-specific guides (e.g., code style, testing, architecture).

Quick Start

Tell the agent to refactor your AGENTS.md by applying progressive disclosure so the root becomes minimal and the rest is split into linked topic files.

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 large CLAUDE.md or AGENTS.md file into smaller linked markdown files?

Refactoring a large CLAUDE.md or AGENTS.md file involves applying progressive disclosure to extract universal essentials into a minimal root document, then relocating remaining categorized guidance into self-contained, linked markdown files to reduce context token waste.

What is progressive disclosure for agent instructions and when should I use it?

Progressive disclosure for agent instructions is a structuring technique that minimizes the root document and moves focused guidance into linked sub-documents. Use it when monolithic instruction files become too long, mix unrelated topics, or waste context tokens.

How do I find and resolve contradictions in monolithic agent instruction documents?

Finding and resolving contradictions in agent instruction documents requires scanning the monolithic file for conflicting directives. You must resolve instruction precedence first before restructuring the document into progressively disclosed, linked markdown files.

Can I prune redundant and vague directives while restructuring markdown documentation?

Yes, you can prune redundant, vague, default, or outdated directives while restructuring markdown documentation. During the progressive disclosure refactor, the process flags these unnecessary instructions for deletion and verifies link consistency across the generated files.

What is the best way to split a bloated agent instruction file into topic-specific guides?

The best way to split a bloated agent instruction file is to extract only universal essentials to the root, categorize remaining guidance into self-contained files like code style or testing, and verify link consistency to ensure a maintainable hierarchy.