Create AGENTS.md

Create AGENTS.md

Has a coding agent write a complete AGENTS.md for a repository, covering overview, setup commands, workflow, testing and conventions so other agents can work in it.

Skill files1 file
SKILL.md250 lines
1
---
2
name: create-agentsmd
3
description: 'Prompt for generating an AGENTS.md file for a repository'
4
---
5
6
# Create high‑quality AGENTS.md file
7
8
You are a code agent. Your task is to create a complete, accurate AGENTS.md at the root of this repository that follows the public guidance at https://agents.md/.
9
10
AGENTS.md is an open format designed to provide coding agents with the context and instructions they need to work effectively on a project.
11
12
## What is AGENTS.md?
13
14
AGENTS.md is a Markdown file that serves as a "README for agents" - a dedicated, predictable place to provide context and instructions to help AI coding agents work on your project. It complements README.md by containing detailed technical context that coding agents need but might clutter a human-focused README.
15
16
## Key Principles
17
18
- **Agent-focused**: Contains detailed technical instructions for automated tools
19
- **Complements README.md**: Doesn't replace human documentation but adds agent-specific context
20
- **Standardized location**: Placed at repository root (or subproject roots for monorepos)
21
- **Open format**: Uses standard Markdown with flexible structure
22
- **Ecosystem compatibility**: Works across 20+ different AI coding tools and agents
23
24
## File Structure and Content Guidelines
25
26
### 1. Required Setup
27
28
- Create the file as `AGENTS.md` in the repository root
29
- Use standard Markdown formatting
30
- No required fields - flexible structure based on project needs
31
32
### 2. Essential Sections to Include
33
34
#### Project Overview
35
36
- Brief description of what the project does
37
- Architecture overview if complex
38
- Key technologies and frameworks used
39
40
#### Setup Commands
41
42
- Installation instructions
43
- Environment setup steps
44
- Dependency management commands
45
- Database setup if applicable
46
47
#### Development Workflow
48
49
- How to start development server
50
- Build commands
51
- Watch/hot-reload setup
52
- Package manager specifics (npm, pnpm, yarn, etc.)
53
54
#### Testing Instructions
55
56
- How to run tests (unit, integration, e2e)
57
- Test file locations and naming conventions
58
- Coverage requirements
59
- Specific test patterns or frameworks used
60
- How to run subset of tests or focus on specific areas
61
62
#### Code Style Guidelines
63
64
- Language-specific conventions
65
- Linting and formatting rules
66
- File organization patterns
67
- Naming conventions
68
- Import/export patterns
69
70
#### Build and Deployment
71
72
- Build commands and outputs
73
- Environment configurations
74
- Deployment steps and requirements
75
- CI/CD pipeline information
76
77
### 3. Optional but Recommended Sections
78
79
#### Security Considerations
80
81
- Security testing requirements
82
- Secrets management
83
- Authentication patterns
84
- Permission models
85
86
#### Monorepo Instructions (if applicable)
87
88
- How to work with multiple packages
89
- Cross-package dependencies
90
- Selective building/testing
91
- Package-specific commands
92
93
#### Pull Request Guidelines
94
95
- Title format requirements
96
- Required checks before submission
97
- Review process
98
- Commit message conventions
99
100
#### Debugging and Troubleshooting
101
102
- Common issues and solutions
103
- Logging patterns
104
- Debug configuration
105
- Performance considerations
106
107
## Example Template
108
109
Use this as a starting template and customize based on the specific project:
110
111
```markdown
112
# AGENTS.md
113
114
## Project Overview
115
116
[Brief description of the project, its purpose, and key technologies]
117
118
## Setup Commands
119
120
- Install dependencies: `[package manager] install`
121
- Start development server: `[command]`
122
- Build for production: `[command]`
123
124
## Development Workflow
125
126
- [Development server startup instructions]
127
- [Hot reload/watch mode information]
128
- [Environment variable setup]
129
130
## Testing Instructions
131
132
- Run all tests: `[command]`
133
- Run unit tests: `[command]`
134
- Run integration tests: `[command]`
135
- Test coverage: `[command]`
136
- [Specific testing patterns or requirements]
137
138
## Code Style
139
140
- [Language and framework conventions]
141
- [Linting rules and commands]
142
- [Formatting requirements]
143
- [File organization patterns]
144
145
## Build and Deployment
146
147
- [Build process details]
148
- [Output directories]
149
- [Environment-specific builds]
150
- [Deployment commands]
151
152
## Pull Request Guidelines
153
154
- Title format: [component] Brief description
155
- Required checks: `[lint command]`, `[test command]`
156
- [Review requirements]
157
158
## Additional Notes
159
160
- [Any project-specific context]
161
- [Common gotchas or troubleshooting tips]
162
- [Performance considerations]
163
```
164
165
## Working Example from agents.md
166
167
Here's a real example from the agents.md website:
168
169
```markdown
170
# Sample AGENTS.md file
171
172
## Dev environment tips
173
174
- Use `pnpm dlx turbo run where <project_name>` to jump to a package instead of scanning with `ls`.
175
- Run `pnpm install --filter <project_name>` to add the package to your workspace so Vite, ESLint, and TypeScript can see it.
176
- Use `pnpm create vite@latest <project_name> -- --template react-ts` to spin up a new React + Vite package with TypeScript checks ready.
177
- Check the name field inside each package's package.json to confirm the right name—skip the top-level one.
178
179
## Testing instructions
180
181
- Find the CI plan in the .github/workflows folder.
182
- Run `pnpm turbo run test --filter <project_name>` to run every check defined for that package.
183
- From the package root you can just call `pnpm test`. The commit should pass all tests before you merge.
184
- To focus on one step, add the Vitest pattern: `pnpm vitest run -t "<test name>"`.
185
- Fix any test or type errors until the whole suite is green.
186
- After moving files or changing imports, run `pnpm lint --filter <project_name>` to be sure ESLint and TypeScript rules still pass.
187
- Add or update tests for the code you change, even if nobody asked.
188
189
## PR instructions
190
191
- Title format: [<project_name>] <Title>
192
- Always run `pnpm lint` and `pnpm test` before committing.
193
```
194
195
## Implementation Steps
196
197
1. **Analyze the project structure** to understand:
198
199
- Programming languages and frameworks used
200
- Package managers and build tools
201
- Testing frameworks
202
- Project architecture (monorepo, single package, etc.)
203
204
2. **Identify key workflows** by examining:
205
206
- package.json scripts
207
- Makefile or other build files
208
- CI/CD configuration files
209
- Documentation files
210
211
3. **Create comprehensive sections** covering:
212
213
- All essential setup and development commands
214
- Testing strategies and commands
215
- Code style and conventions
216
- Build and deployment processes
217
218
4. **Include specific, actionable commands** that agents can execute directly
219
220
5. **Test the instructions** by ensuring all commands work as documented
221
222
6. **Keep it focused** on what agents need to know, not general project information
223
224
## Best Practices
225
226
- **Be specific**: Include exact commands, not vague descriptions
227
- **Use code blocks**: Wrap commands in backticks for clarity
228
- **Include context**: Explain why certain steps are needed
229
- **Stay current**: Update as the project evolves
230
- **Test commands**: Ensure all listed commands actually work
231
- **Consider nested files**: For monorepos, create AGENTS.md files in subprojects as needed
232
233
## Monorepo Considerations
234
235
For large monorepos:
236
237
- Place a main AGENTS.md at the repository root
238
- Create additional AGENTS.md files in subproject directories
239
- The closest AGENTS.md file takes precedence for any given location
240
- Include navigation tips between packages/projects
241
242
## Final Notes
243
244
- AGENTS.md works with 20+ AI coding tools including Cursor, Aider, Gemini CLI, and many others
245
- The format is intentionally flexible - adapt it to your project's needs
246
- Focus on actionable instructions that help agents understand and work with your codebase
247
- This is living documentation - update it as your project evolves
248
249
When creating the AGENTS.md file, prioritize clarity, completeness, and actionability. The goal is to give any coding agent enough context to effectively contribute to the project without requiring additional human guidance.
250

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,330 prompts

More by @OpenSourceBuffGuy

See all
Valentine's newspaper editorial portrait from your photo prompt image

Valentine's newspaper editorial portrait from your photo

Turns an uploaded face photo into a top-down Valentine's fashion editorial: red blazer, roses, heart balloons and a newspaper headline.

image-prompt, nano-banana, reference-image, face-reference, photo-editing, portrait, woman, fashion-shoot, editorial, valentines-day, photorealistic, studio-lighting, close-up, high-angle, film-grain, vibrant-colors, flowers, text-rendering, placeholders, fashion, holiday, soft-lighting, bokeh, vertical-format

Woman leaps into leaf pile revealing pool prompt image

Woman leaps into leaf pile revealing pool

Generates a one-shot autumn gag where someone announces the first day of fall and leaps into a leaf pile that hides a tiny blue kiddie pool.

video-prompt, comedy, autumn, single-take, wide-shot, golden-hour, vibrant-colors, humorous, timed-beats, lip-sync, natural-light, short-form-video, quick, cinematic, action, transformation

Seaside morning vlog from bedroom to terrace prompt image

Seaside morning vlog from bedroom to terrace

Generates a 15-second vertical seaside vlog of a woman waking up, stepping onto a terrace and speaking to camera, with a beat for every second and written dialogue.

video-prompt, vlog, timed-beats, multi-shot, lip-sync, short-form-video, vertical-format, selfie, ocean, travel, natural-light, golden-hour, character-consistency, handheld, camera-movement, cinematic, photorealistic, woman, hailuo, for-content-creators, long-form, structured-output, bokeh, summer, text-to-video

Reviews

Loading reviews…

Discussion

Loading comments…