agents-progressive-disclosure
NewRefactor bloated AGENTS.md/CLAUDE.md-style instruction files into a compact router plus focused on-demand docs. Use when users ask to apply progressive disclosure, split agent rules into docs, reduce instruction bloat, or turn one large rule file into an entrypoint.
Summary
md instruction files into a compact router that delegates to focused on-demand docs.
- It reduces always-loaded context while preserving all rules, making agent interactions faster and more maintainable.
Overview
Agents Progressive Disclosure
Use this skill to convert a long agent instruction file into a high-signal entrypoint that routes to focused documentation files. The goal is to preserve rules while reducing always-loaded context.
Core Model
Treat the root instruction file as a router, not a rule warehouse.
- •The entry file keeps only high-frequency, long-lived, must-always-apply rules.
- •Detailed task-specific rules move into
docs/files. - •The entry file includes a clear “read this doc when...” index.
- •The agent should load only the docs relevant to the current task.
Workflow
- Identify the target instruction file.
- Prefer the current directory's AGENTS.md unless the user names another file. - Also support CLAUDE.md, GEMINI.md, or project-specific equivalents. - If multiple candidates exist and the user did not specify one, report the candidates and choose the file most broadly used by the current agent setup; ask only when that choice is unclear or risky.
- Inspect existing structure.
- Read the target file fully. - List existing docs/ files, if any. - Check for backups before editing.
- Detect contradictions before classification.
- Scan for conflicting style rules, package-manager choices, test commands, safety boundaries, precedence statements, or duplicated rules with different wording. - Resolve contradictions from explicit user instructions, nearest instruction-file priority, or clear local evidence when possible. - Ask the user only when a contradiction affects the refactor and cannot be resolved from available evidence.
- Classify rules into buckets.
- Keep in entrypoint: language defaults, safety boundaries, tool priority, conflict priority, and critical must-always-follow rules. - Move to docs: command catalogs, search strategies, framework-specific instructions, package-manager rules, environment setup, Git workflow, deployment, testing, document style, domain terminology, long examples.
- Design the docs map.
- Prefer the project's existing agent-doc convention; otherwise default to docs/ for cross-agent portability. - Existing conventions may include .claude/, .claude/rules/, .cursor/rules/, or another agent-doc directory. - Use existing document names when they already fit; otherwise derive focused names from the source rule clusters. - Preserve platform-specific file formats, required frontmatter, imports, path globs, and file extensions. - Create docs/README.md only when it helps navigate multiple docs.
- Edit conservatively.
- Create a same-directory backup with a non-overwriting name before replacing the target file. - Rewrite the entrypoint as a compact router with: - scope statement; - core principles; - on-demand docs index; - always-on safety/tool rules; - precedence rules. - Move detailed rules into docs without changing their intent. - Avoid duplicating the same long rule in multiple places.
- Validate preservation.
- Create a short preservation checklist that maps each original rule category to its new location, one verification keyword or heading, and a pass/fail result. - Treat the checklist as temporary validation work; do not write it into the repo unless the user asks or the project already has a migration-note convention. - Compare line counts before and after. - Search for checklist keywords from the original file across the new entrypoint and routed docs or rules files. - Verify the entrypoint tells future agents when to read each doc. - Check that no doc contradicts the entrypoint.
Suggested Entrypoint Shape
# Agent Instructions
> Scope: This file is the entrypoint. It keeps only always-on rules; task details live in docs/.
## Core Principles
- [language/default behavior]
- [safety boundary]
- [primary tool or evidence policy]
- [this file is a router, not a warehouse]
## Read-On-Demand Index
| Task type | Read first | Trigger |
| --- | --- | --- |
| [rule cluster] | `[focused-doc]` | [when to read it] |
| [rule cluster] | `[focused-doc]` | [when to read it] |
## Always-On Rules
- [short critical rules]
## Priority
1. User's current explicit instruction.
2. Nearest project instruction file.
3. This file.
4. Routed docs details.Validation Commands
Use commands compatible with the current environment, replacing placeholders with the actual target file, routed docs/rules files, and preservation-checklist keywords. The examples below use POSIX-style shell commands; adapt them for Windows or other shells when needed.
find <docs-dir> -maxdepth 1 -type f -print | sort
wc -l <target-file> <routed-docs...>
rg -n '<checklist-keyword>|<another-checklist-keyword>' <target-file> <routed-docs...>
sed -n '1,180p' <target-file>Choose checklist keywords from the source file, not from this template.
Guardrails
- •Do not delete rules merely because they are verbose; move them to the right doc.
- •Do not bury safety-critical rules only in a routed doc.
- •Do not create many tiny docs with overlapping responsibilities.
- •Do not add project-specific opinions that were not in the source file unless the user asks.
- •Do not claim installation into Codex unless you actually copy or install the skill into the active skills directory and verify it.
Install & Usage
mkdir -p .claude/agentsAdd the configuration to .claude/agents/agents-progressive-disclosure.md
@agents-progressive-disclosureUse Cases
Usage Examples
/agents-progressive-disclosure
Refactor my AGENTS.md into a router with docs/ folder for detailed rules.
Split CLAUDE.md into an entrypoint and focused docs to reduce context load.
Security Audits
Frequently Asked Questions
What is agents-progressive-disclosure?
This skill refactors bloated AGENTS.md or CLAUDE.md instruction files into a compact router that delegates to focused on-demand docs. It reduces always-loaded context while preserving all rules, making agent interactions faster and more maintainable.
How to install agents-progressive-disclosure?
To install agents-progressive-disclosure: create the agents directory (mkdir -p .claude/agents), then add the config to .claude/agents/agents-progressive-disclosure.md. Finally, @agents-progressive-disclosure in Claude Code.
What is agents-progressive-disclosure best for?
agents-progressive-disclosure is a agent categorized under General. It is designed for: refactoring, agent. Created by Caph-dev.
What can I use agents-progressive-disclosure for?
agents-progressive-disclosure is useful for: When your AGENTS.md has grown too long and you want to split it into a router plus task-specific docs.; When you need to reduce context overhead for Claude Code by moving detailed rules into on-demand documentation files.; When you want to enforce progressive disclosure in your agent instructions to improve response quality.; When you have multiple instruction files (AGENTS.md, CLAUDE.md) and need to consolidate them into a single entrypoint.; When you detect contradictions in your instruction files and need to resolve them before refactoring.; When you want to create a clean, maintainable documentation structure for your agent's rules..