Generate AGENTS.md for AI agent navigation. Covers build/test commands, coding conventions, task routing, and codebase structure. Use for /init workflow or when creating agent-readable repository documentation.
Examples:
- user: "/init" → full AI navigation AGENTS.md + skill recommendations
- user: "/init basic" → minimal AGENTS.md structure only
- user: "Create AGENTS.md for this repo" → assess complexity, generate navigation doc
- user: "Document codebase for AI agents" → structured AGENTS.md with task routing
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Generate AGENTS.md for AI agent navigation. Covers build/test commands, coding conventions, task routing, and codebase structure. Use for /init workflow or when creating agent-readable repository documentation.
Examples:
- user: "/init" → full AI navigation AGENTS.md + skill recommendations
- user: "/init basic" → minimal AGENTS.md structure only
- user: "Create AGENTS.md for this repo" → assess complexity, generate navigation doc
- user: "Document codebase for AI agents" → structured AGENTS.md with task routing
Standard operating procedure for generating AGENTS.md files optimized for AI agent consumption.
Phase 1: Complexity Assessment (MANDATORY)
MUST complete before any other action:
Directory scan: ls -la at root, count top-level directories
Monorepo check: Look for packages/, workspaces/, apps/, multiple package.json
## Repository Overview
[1-2 sentences: what this repo does]
<instructions>## Build & Test- Build: `exact command`- Test: `exact command`- Lint: `exact command`- Typecheck: `exact command`- Codegen: `exact command` (if applicable)
</instructions><rules>## Process Constraints- MUST NOT run long-running/blocking processes (dev servers, watch modes)
- Dev servers are USER's responsibility to run in background
- MUST use one-shot verification commands only
## Coding Conventions- [Pattern observed in codebase]
- [Naming conventions]
- [File organization rules]
</rules><routing>## Task Navigation
| Task | Entry Point | Key Files |
|------|-------------|-----------|
| Add feature | src/features/ | README in dir |
| Fix bug | src/ | Related test file |
</routing><context_hints>## Context Allocation-**Large/generated**: [files to skip or skim]
-**Legacy zones**: [directories with tech debt]
-**Critical configs**: [files that break everything]
</context_hints>
Phase 5: Skill Recommendations (Full Mode Only)
If running full workflow (not basic):
Identify repetitive tasks in the codebase
Suggest skills that would benefit agents working here
Offer to create skills using skill-creator
CRITICAL: Long-Running Processes
The generated AGENTS.md MUST include a rule forbidding agents from running blocking processes.
This is not just about what commands to document - the AGENTS.md MUST explicitly instruct agents:
<rules>## Process Constraints- MUST NOT run long-running/blocking processes (dev servers, watch modes)
- Dev servers (`npm run dev`, `bun dev`, `convex dev`, etc.) are USER's responsibility
- User will run these in background and make them available to the agent
- MUST use one-shot commands for verification (build, lint, test, typecheck)
</rules>