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.
</overview> <workflow> <phase name="complexity-assessment">MUST complete before any other action:
ls -la at root, count top-level directoriespackages/, workspaces/, apps/, multiple package.jsonpackage.json, pyproject.toml, go.mod, Cargo.tomlComplexity thresholds:
| Indicator | Simple | Complex | |-----------|--------|---------| | Top-level dirs | ≤10 | >10 | | Dependencies | ≤50 | >50 | | Languages | 1 | 2+ | | Monorepo patterns | None | Present |
</phase> <phase name="analysis-method">Based on complexity:
Task tool with subagent_type: "explore"
Prompt: "Analyze repository structure, build systems, test commands, coding conventions.
Return structured summary for AI navigation AGENTS.md.
Thoroughness: [quick|medium|very thorough]"
MUST collect from repo:
npm run build, make, cargo build, etc.)convex codegen, prisma generate).cursor/rules/ directory.cursorrules file.github/copilot-instructions.mdStructure using XML tags:
## 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>
<phase name="skill-recommendations">
If running full workflow (not basic):
skill-creatorThe 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>
Commands to document vs avoid:
| MUST NOT Document | Document Instead |
|-------------------|------------------|
| npm run dev | npm run build |
| bun run dev | npm run lint |
| npm start (if blocking) | npm run typecheck |
| convex dev | convex codegen |
| next dev | next build |
| vite / vite dev | vite build |
| tsc --watch | tsc --noEmit |
| jest --watch | jest / npm test |
Good commands for AGENTS.md:
npm run build, make, cargo buildnpm run lint, eslint ., oxlinttsc --noEmit, pyrightnpm test, pytest, go test ./...convex codegen, prisma generate, graphql-codegenprettier --check ., cargo fmt --checknpx skills add justinlevinedotme/agent-navigation-sop下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer