AGENTS.md Generator Skill
Overview
Generate and maintain AGENTS.md files following the agents.md convention. AGENTS.md is FOR AGENTS, not humans.
When to Use
- Creating a new project and establishing baseline AGENTS.md
- Standardizing existing projects with consistent agent documentation
- Ensuring multi-repo consistency across repositories
- Checking if AGENTS.md files are current with recent code changes
- Onboarding AI agents to an unfamiliar codebase
Quick Reference
| Script |
Purpose |
scripts/generate-agents.sh PATH |
Generate AGENTS.md files |
scripts/validate-structure.sh PATH |
Validate structure compliance |
scripts/check-freshness.sh PATH |
Check if files are outdated vs git commits |
scripts/verify-content.sh PATH |
Verify documented files/commands match codebase |
scripts/verify-commands.sh PATH |
Verify documented commands execute |
scripts/detect-project.sh PATH |
Detect language, version, build tools |
scripts/detect-scopes.sh PATH |
Identify directories needing scoped files |
scripts/extract-commands.sh PATH |
Extract commands from build configs |
See references/scripts-guide.md for full options and validation checklist.
Core Principles
- Structured over Prose -- tables and maps parse faster than paragraphs
- Verified Commands -- commands that don't work waste 500+ tokens debugging
- Pointer Principle -- point to files, don't duplicate content
- Golden Samples -- one example file beats pages of explanation
- Audit Before Generating -- discover existing docs and pain points before running scripts
Language Choice
Default to English. Exception: match your code's naming language to prevent agents mixing languages.
Prerequisites
| Requirement |
Version |
Notes |
| Bash |
4.3+ |
Nameref variables (local -n). macOS: brew install bash |
| jq |
1.5+ |
JSON processing |
| git |
2.0+ |
For git history analysis |
References
Detailed documentation in references/:
| File |
Contents |
verification-guide.md |
Verification steps, name matching, command verification, design principles |
scripts-guide.md |
Script options, post-generation validation checklist |
ai-tool-compatibility.md |
Claude Code shim, Codex stacking, Copilot integration |
output-structure.md |
Root/scoped sections, auto-generate vs manual curation |
analysis.md |
Analysis of 21 real-world AGENTS.md files |
directory-coverage.md |
Coverage guidance for PHP/TYPO3, Go, TypeScript |
examples/ |
Complete examples (coding-agent-cli, ldap-selfservice, simple-ldap-go, t3x-rte-ckeditor-image) |
Asset Templates
Root templates in assets/: root-thin.md (30 lines, default), root-verbose.md (100 lines).
Scoped templates in assets/scoped/: backend-go.md, backend-php.md, typo3.md, oro.md, cli.md, frontend-typescript.md.
Supported Project Types
| Language |
Project Types |
| Go |
Libraries, web apps (Fiber/Echo/Gin), CLI (Cobra/urfave) |
| PHP |
Composer packages, Laravel/Symfony |
| PHP/TYPO3 |
TYPO3 extensions (auto-detected via ext_emconf.php) |
| PHP/Oro |
OroCommerce, OroPlatform, OroCRM bundles |
| TypeScript |
React, Next.js, Vue, Node.js |
| Python |
pip, poetry, Django, Flask, FastAPI |
| Hybrid |
Multi-language projects (auto-creates scoped files per stack) |
1---2name: agent-rules3description: AGENTS.md Generator Skill4---5# AGENTS.md Generator Skill67## Overview89Generate and maintain AGENTS.md files following the [agents.md convention](https://agents.md/). AGENTS.md is FOR AGENTS, not humans.1011## When to Use1213- Creating a new project and establishing baseline AGENTS.md14- Standardizing existing projects with consistent agent documentation15- Ensuring multi-repo consistency across repositories16- Checking if AGENTS.md files are current with recent code changes17- Onboarding AI agents to an unfamiliar codebase1819## Quick Reference2021| Script | Purpose |22|--------|---------|23| `scripts/generate-agents.sh PATH` | Generate AGENTS.md files |24| `scripts/validate-structure.sh PATH` | Validate structure compliance |25| `scripts/check-freshness.sh PATH` | Check if files are outdated vs git commits |26| `scripts/verify-content.sh PATH` | Verify documented files/commands match codebase |27| `scripts/verify-commands.sh PATH` | Verify documented commands execute |28| `scripts/detect-project.sh PATH` | Detect language, version, build tools |29| `scripts/detect-scopes.sh PATH` | Identify directories needing scoped files |30| `scripts/extract-commands.sh PATH` | Extract commands from build configs |3132See `references/scripts-guide.md` for full options and validation checklist.3334## Core Principles3536- **Structured over Prose** -- tables and maps parse faster than paragraphs37- **Verified Commands** -- commands that don't work waste 500+ tokens debugging38- **Pointer Principle** -- point to files, don't duplicate content39- **Golden Samples** -- one example file beats pages of explanation40- **Audit Before Generating** -- discover existing docs and pain points before running scripts4142## Language Choice4344Default to English. Exception: match your code's naming language to prevent agents mixing languages.4546## Prerequisites4748| Requirement | Version | Notes |49|-------------|---------|-------|50| Bash | 4.3+ | Nameref variables (`local -n`). macOS: `brew install bash` |51| jq | 1.5+ | JSON processing |52| git | 2.0+ | For git history analysis |5354## References5556Detailed documentation in `references/`:5758| File | Contents |59|------|----------|60| [`verification-guide.md`](references/verification-guide.md) | Verification steps, name matching, command verification, design principles |61| [`scripts-guide.md`](references/scripts-guide.md) | Script options, post-generation validation checklist |62| [`ai-tool-compatibility.md`](references/ai-tool-compatibility.md) | Claude Code shim, Codex stacking, Copilot integration |63| [`output-structure.md`](references/output-structure.md) | Root/scoped sections, auto-generate vs manual curation |64| [`analysis.md`](references/analysis.md) | Analysis of 21 real-world AGENTS.md files |65| [`directory-coverage.md`](references/directory-coverage.md) | Coverage guidance for PHP/TYPO3, Go, TypeScript |66| [`examples/`](references/examples/) | Complete examples (coding-agent-cli, ldap-selfservice, simple-ldap-go, t3x-rte-ckeditor-image) |6768## Asset Templates6970Root templates in `assets/`: `root-thin.md` (~30 lines, default), `root-verbose.md` (~100 lines).7172Scoped templates in `assets/scoped/`: `backend-go.md`, `backend-php.md`, `typo3.md`, `oro.md`, `cli.md`, `frontend-typescript.md`.7374## Supported Project Types7576| Language | Project Types |77|----------|---------------|78| Go | Libraries, web apps (Fiber/Echo/Gin), CLI (Cobra/urfave) |79| PHP | Composer packages, Laravel/Symfony |80| PHP/TYPO3 | TYPO3 extensions (auto-detected via `ext_emconf.php`) |81| PHP/Oro | OroCommerce, OroPlatform, OroCRM bundles |82| TypeScript | React, Next.js, Vue, Node.js |83| Python | pip, poetry, Django, Flask, FastAPI |84| Hybrid | Multi-language projects (auto-creates scoped files per stack) |