| name | init |
| description | Use when the user asks to initialize a repo, create AGENTS.md, generate contributor guidelines, or set up agent-oriented documentation for a codebase. |
| triggers | ["initialize repo","init repo","create AGENTS.md","contributor guidelines","set up project","repository setup","project initialization","new project setup"] |
| negatives | ["build tool","template","boilerplate","scaffold component","scaffold project"] |
| license | MIT |
| compatibility | opencode |
| disable-model-invocation | true |
| metadata | {"version":"1.3.0","workflow":"system","audience":"developers"} |
AGENTS.md Generator
Analyze a codebase and generate a concise, accurate AGENTS.md contributor guide.
Target: the current working directory, unless user provided another folder as input.
Gather Information
Collect facts about the repository. Only record what is actually found — never invent information.
These probes are independent — run them in parallel (e.g., dispatch subagents) when the tooling supports it.
Repository structure
Map the repo structure (3 levels deep, excluding .git, node_modules, dist, build, pycache, .venv and other autogenerated folders). This is analysis input — the output AGENTS.md should describe non-obvious architecture, not list directories. Focus on the "big picture" that requires reading multiple files to understand.
Build & dev commands
Extract actual command definitions from the project's build system: package.json scripts, Makefile targets, pyproject.toml scripts, Cargo.toml bins/workspace members, go.mod module path, docker-compose.yml services, etc.
Coding conventions
Check for and record key settings of:
- Linter configs
- Formatter configs
- Type checking (note strict mode if applicable)
- Agent rules:
.cursorrules, .cursor/rules/, .github/copilot-instructions.md
- Pre-commit hooks
If agent rules files exist, read and extract the important parts — focus on conventions that matter for code generation, not verbatim content.
Git history
Review the last 20 commits to identify commit message conventions and patterns. If this fails (not a git repo or shallow clone), note the limitation and skip.
Existing documentation
- If
README.md exists, read it for context about the repo's purpose and setup.
- If
AGENTS.md already exists, read it — you'll be improving it rather than starting fresh.
- If
CLAUDE.md exists, read it for additional context.
Generate AGENTS.md
Document requirements
- Title:
# Repository Guidelines
- 200-400 words (exceed only if complexity genuinely demands it)
- Direct, instructional tone
- No repetition across sections