AGENTS.md Generator
Generate tailored AGENTS.md files that give AI coding agents the context they need to work effectively in a codebase.
Core principle: Every AGENTS.md must be grounded in the project's actual conventions — never fabricated. Inspect the codebase first, then populate the template.
When to Use
- Creating a new project and need AI-agent-friendly documentation
- Onboarding a repository that has no AGENTS.md
- Updating an existing AGENTS.md after a major stack change
- Standardizing conventions across multiple projects
When NOT to use:
- The project already has a comprehensive, up-to-date AGENTS.md
- The repository is a fork you don't maintain
Detection Heuristic
Inspect the project root and determine the type using this priority order:
| Check | Detected Type | Template |
|---|---|---|
app.json with expo field |
React Native / Expo | react-native-agents.md |
package.json with hono in dependencies |
Hono Backend | hono-agents.md |
package.json with next in dependencies |
Next.js | nextjs-agents.md |
pyproject.toml with fastapi in dependencies |
FastAPI | fastapi-agents.md |
| Multiple service directories with separate package configs | Multi-Service | multi-service-agents.md |
| No specific framework detected | Generic | generic-agents.md |
If the project type is ambiguous and doesn't match any framework above, use the generic template.
Workflow
- Detect — Read
package.json,pyproject.toml, orapp.jsonto identify the framework - Inspect — Scan the project structure (
src/,app/,components/,services/, etc.) and config files (tsconfig.json,biome.json,eslint.config.*,ruffconfig) to discover actual conventions - Select template — Load the matching template from this skill's reference files
- Populate — Fill in the template with project-specific details:
- Exact framework/library versions from the manifest
- Actual directory structure from the filesystem
- Real commands from
scriptsin package.json or pyproject.toml - Detected linter/formatter from config files
- Package manager (npm/bun/pnpm/uv) from lockfile presence
- Write — Create
AGENTS.mdat the project root (or enhance the existing one) - Verify — Confirm every stated convention matches the actual codebase
Template Reference Files
| Template | File | For |
|---|---|---|
| Next.js / React | nextjs-agents.md |
Next.js App Router projects with React |
| Hono Backend | hono-agents.md |
Hono + Bun + Drizzle API servers |
| FastAPI Backend | fastapi-agents.md |
FastAPI + Python async backends |
| React Native | react-native-agents.md |
Expo + React Native mobile apps |
| Multi-Service | multi-service-agents.md |
Monorepos or multi-repo service orchestrations |
| Generic | generic-agents.md |
Plain HTML, vanilla JS, Go, Rust, or any stack without a dedicated template |
Common Mistakes
| Mistake | Fix |
|---|---|
| Listing conventions not actually used in the project | Always inspect first, template second |
| Copying another project's AGENTS.md verbatim | Each project has unique versions, structure, and tools |
| Including aspirational conventions instead of actual ones | Document what IS, not what SHOULD BE |
| Making the file too long (300+ lines) | Keep it 50-150 lines; link to docs for deep dives |
| Forgetting to list the package manager | Agents will default to npm and break bun/pnpm projects |
| Omitting the lint/format command | This is the #1 command agents need to run before committing |