1---2name: create-agentsmd-23description: Create a high-quality AGENTS.md file for a repository by inspecting project structure, workflows, commands, tests, and conventions. Use this skill when the user asks to create, update, or improve AGENTS.md, add coding-agent instructions, document repo setup for agents, or follow the agents.md format.4---56# Create AGENTS.md78Create a complete root `AGENTS.md` that gives coding agents accurate setup, workflow, testing, style, and repository-context instructions without cluttering the human-facing README.910## When to invoke1112- "Create an AGENTS.md for this repository."13- "Generate coding agent instructions for my project."14- "Update our AGENTS.md using the current repo structure."15- "Make this repo follow https://agents.md/."16- "Document setup and test commands for agents."1718## Prerequisites and context1920- The target file is `AGENTS.md` at the repository root unless a monorepo subproject needs a closer nested `AGENTS.md`.21- Follow the open AGENTS.md format at `https://agents.md/.`.22- Use standard Markdown. There are no required fields; include sections only when they help agents work safely and correctly.2324## AGENTS.md purpose2526| Principle | Rule |27| --- | --- |28| Agent-focused | Include detailed technical instructions automated tools need. |29| Complements `README.md` | Do not duplicate human marketing or onboarding prose. |30| Predictable location | Put root guidance at `AGENTS.md`; use nested files for monorepos when scope differs. |31| Flexible Markdown | Adapt section names to the project instead of forcing irrelevant headings. |32| Ecosystem compatibility | Write portable guidance that works across GitHub Copilot, Cursor, Aider, Gemini CLI, and other coding agents. |3334## Procedure35361. Analyze the project structure: languages, frameworks, package managers, build tools, tests, and architecture shape.372. Inspect source-of-truth files: `package.json`, `.csproj`, `pom.xml`, Gradle files, `Makefile`, CI workflows, existing docs, lint configs, test config, Dockerfiles, and deployment manifests.383. Extract exact commands for install, development, build, lint, test, coverage, and deployment. Prefer commands already used in CI.394. Identify code style: naming, file organization, import/export patterns, formatting, linting, and language/framework conventions.405. Draft `AGENTS.md` with actionable bullets and command snippets.416. Validate commands when practical; mark unverified commands explicitly instead of inventing success.427. For monorepos, document package navigation and precedence: the closest `AGENTS.md` governs a given path.4344## Recommended content4546| Section | Include |47| --- | --- |48| Project Overview | Brief purpose, architecture overview, key technologies and frameworks. |49| Setup Commands | Installation, environment setup, dependency management, database setup. |50| Development Workflow | Dev server, watch/hot reload, package manager specifics. |51| Testing Instructions | Unit, integration, e2e, coverage, file locations, naming conventions, focused test commands. |52| Code Style | Language conventions, linting, formatting, file organization, naming, imports and exports. |53| Build and Deployment | Build outputs, environment configurations, deployment commands, CI/CD requirements. |54| Security Considerations | Secrets management, auth patterns, permissions, security tests. |55| Monorepo Instructions | Package navigation, selective builds/tests, cross-package dependencies. |56| Pull Request Guidelines | Title format, required checks, review process, commit conventions. |57| Debugging and Troubleshooting | Common issues, logging, debug configuration, performance notes. |5859## Command discovery targets6061| Ecosystem | Files to inspect | Commands to look for |62| --- | --- | --- |63| Node/TypeScript | `package.json`, lockfiles, `turbo.json`, `vite.config.*`, `tsconfig.json` | `npm`, `pnpm`, `yarn`, `pnpm turbo run test --filter <project_name>`, `pnpm vitest run -t "<test name>"` |64| .NET | `*.sln`, `*.csproj`, `Directory.Build.props`, `.config/dotnet-tools.json` | `dotnet restore`, `dotnet build`, `dotnet test` |65| Java | `pom.xml`, `build.gradle`, `settings.gradle` | `mvn test`, `mvn verify`, `gradle test`, `./gradlew build` |66| Python | `pyproject.toml`, `requirements*.txt`, `tox.ini`, `noxfile.py` | `python -m pytest`, `ruff check`, `mypy`, environment setup commands |67| CI/CD | `.github/workflows/*`, pipeline YAML | Required checks and exact CI command names. |6869## Template for the generated file7071```markdown72# AGENTS.md7374## Project Overview7576<Brief description of the project, its purpose, and key technologies.>7778## Setup Commands7980- Install dependencies: `<package manager> install`81- Start development server: `<command>`82- Build for production: `<command>`8384## Development Workflow8586- <Development server startup instructions>87- <Hot reload/watch mode information>88- <Environment variable setup>8990## Testing Instructions9192- Run all tests: `<command>`93- Run unit tests: `<command>`94- Run integration tests: `<command>`95- Test coverage: `<command>`96- <Specific testing patterns or requirements>9798## Code Style99100- <Language and framework conventions>101- <Linting rules and commands>102- <Formatting requirements>103- <File organization patterns>104105## Build and Deployment106107- <Build process details>108- <Output directories>109- <Environment-specific builds>110- <Deployment commands>111112## Pull Request Guidelines113114- Title format: <component> Brief description115- Required checks: `<lint command>`, `<test command>`116- <Review requirements>117118## Additional Notes119120- <Project-specific context>121- <Common gotchas or troubleshooting tips>122- <Performance considerations>123```124125## Examples126127### Good128129- `Use pnpm dlx turbo run where <project_name> to jump to a package instead of scanning with ls.`130- `Run pnpm install --filter <project_name> to add the package to your workspace so Vite, ESLint, and TypeScript can see it.`131- `Run pnpm turbo run test --filter <project_name> for every check defined for that package.`132- `After moving files or changing imports, run pnpm lint --filter <project_name>.`133134### Bad135136- `Run the tests.` without naming the command.137- `Follow our usual style.` without linking it to files or examples.138- Copying the full README instead of agent-specific instructions.139- Stating commands that are not present in project files and were not verified.140141## Gotchas142143- **Closest file wins in monorepos**: root `AGENTS.md` should explain global rules; nested files should contain package-specific overrides.144- **Do not over-document human context**: agents need commands, conventions, and boundaries more than product narrative.145- **Do not invent workflows**: if CI is the only source of truth, derive commands from `.github/workflows` and label anything unverified.146147## AGENTS.md terminology148149Preserve project guidance terms that agents search for: `Import/export`, `Watch/hot-reload`, `[command]`, `[lint command]`, `[package manager] install`, `[test command]`, `building/testing`, `hot-reload`, `human-focused`, `packages/projects`, `pnpm dlx turbo run where <project_name>`, `pnpm install --filter <project_name>`, `pnpm lint`, `pnpm lint --filter <project_name>`, `pnpm test`, `project-specific`, `react-ts`, and `top-level`.150151## Output template152153```markdown154## AGENTS.md result155156**Status:** created | updated | blocked157**Path:** `AGENTS.md`158**Scope:** root | monorepo package `<path>`159160### Sources inspected161- `<file>`: <facts used>162163### Sections included164- Project Overview165- Setup Commands166- Development Workflow167- Testing Instructions168- Code Style169- Build and Deployment170- Pull Request Guidelines171- Additional Notes172173### Validation174- `<command>`: pass | fail | not run (<reason>)175```176177## Quality gate178179- [ ] `AGENTS.md` is at the repository root or the correct monorepo subproject root.180- [ ] Setup, build, test, lint, and deployment commands come from repository sources or are marked unverified.181- [ ] The file includes agent-focused technical guidance, not duplicated README prose.182- [ ] Monorepo precedence and package-specific commands are documented when applicable.183- [ ] Markdown is clear, portable, and uses exact commands in backticks.184- [ ] The final response lists the sources inspected and any commands not validated.185186## References187188- [AGENTS.md](https://agents.md/.)