How to write a great agents.md

GitHub studied 2,500+ repos to find what makes a good agents.md. Three things mattered most: persona, commands, and clear boundaries.

How to write a great agents.md - Step 1

1. Define a Specific Persona (e.g. 'Expert QA Engineer') 2. Provide Executable Commands early in the file 3. Specify the Tech Stack and Project Structure 4. Offer concrete Code Examples instead of abstract rules 5. Set Clear Boundaries using a 'Always/Ask/Never' system