Agents.md Generator
This skill enables the core "Progressive Disclosure" strategy required for Agent-First development environments. Feeding monolithic documentation to AI coding agents results in context window exhaustion and hallucination. Instead, you must generate a lightweight AGENTS.md file (maximum ~100 lines) at the root of the repository. This file serves strictly as a Table of Contents (TOC) mapping directories to domains, teaching agents where to look next without giving them all knowledge up front.
Input
- A complete scan of the
docs/,.agent/, andsrc/directories. - Any top-level structural files like
ARCHITECTURE.mdorPRODUCT_VISION.md.
Output
- A single
AGENTS.mdfile placed at the root of the project repository.
Process
Phase 1: Repository Discovery
- Call
list_dirondocs/,docs/design,docs/exec-plans, and any.agentdirectories. - Identify core domain boundaries (e.g., API boundaries, UI boundaries).
- Identify where key development plans and issue trackers live.
Phase 2: Index Generation
- Map out the
AGENTS.mdstructure in a hierarchical bullet-point tree. - For each key component, list the absolute or relative path to its source-of-truth markdown document.
- Group paths logically (e.g., "Architecture", "Current Plans", "Frontend Guidelines").
Phase 3: File Creation
- Write the content to
./AGENTS.md. - Ensure the top of the file explicitly instructs other reading agents: "Do not guess architecture. Read this TOC to find the correct deep-dive
.mdfile, and use tools to read it before coding."
Rules
- NEVER exceed 150 lines in
AGENTS.md. It must remain lightweight. - NEVER summarize the actual rules or architectural choices inside this file. You must only provide the path to the file containing those choices.
- ALWAYS use clear absolute paths or precise relative paths from root.
- ALWAYS run this skill if the directory structure of the project's documentation changes significantly.