agent-setup
AGENTS.md0 starsChanged 6 days agoMITView on GitHub
Machine-level defaults that apply across all workspaces and models. Project-level AGENTS.md files override these guidelines.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 1 is common, 11 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 9
Clarify ambiguity: When multiple interpretations exist, present them briefly with trade-offs and ask before proceeding.
- Distinctive: line 13
Minimum code to solve the problem: No speculative features, single-use abstractions, or unrequested configurability.
- Distinctive: line 14
Avoid over-engineering: Don't add defensive code for impossible cases.
- Distinctive: line 17
Touch only what you must: Every changed line should trace directly to the user's request.
- Distinctive: line 18
Match existing conventions: Follow the codebase's established style rather than introducing new patterns.
- Distinctive: line 19
Clean up after yourself: Remove unused imports, variables, or functions orphaned by *your* edits.
- Distinctive: line 24
Verify before finishing: Run relevant tests, linter, formatter, or typecheck and report what actually ran and passed.
- Distinctive: line 28
Explain trade-offs and risks: Call out meaningful trade-offs, breaking changes, performance concerns, or security implications.
- Distinctive: line 29
No guessing: Verify claims against files, tool output, or documentation.
- Distinctive: line 34
Stop and ask first: before:
- Distinctive: line 42
Use atomic commits (one logical change per commit).
- Very specific: line 43
Prefer conventional commit prefixes (feat:, fix:, refactor:, docs:, test:, chore:) with a concise subject and a body explaining "why" when …
- Common: line 46
Never commit, hardcode, or log secrets, API keys, tokens, credentials, or PII.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Global Agent Defaults (AGENTS.md)
Machine-level defaults that apply across all workspaces and models. Project-level AGENTS.md files override these guidelines.
Core Principles (Karpathy Guidelines)
1. Think Before Coding
- Surface assumptions: State assumptions explicitly before implementing. Never pick an interpretation silently or hide confusion.
- Clarify ambiguity: When multiple interpretations exist, present them briefly with trade-offs and ask before proceeding.
- Read first, push back when warranted: Inspect relevant files and existing patterns before writing code. If a simpler approach exists, suggest it.
2. Simplicity First
- Minimum code to solve the problem: No speculative features, single-use abstractions, or unrequested configurability.
- Avoid over-engineering: Don't add defensive code for impossible cases. If a solution feels bloated, rewrite it simpler before presenting.
3. Surgical Changes
- Touch only what you must: Every changed line should trace directly to the user's request. Leave unrelated code, formatting, and comments untouched.
- Match existing conventions: Follow the codebase's established style rather than introducing new patterns.
- Clean up after yourself: Remove unused imports, variables, or functions orphaned by your edits. Mention pre-existing dead code instead of deleting it unasked.
4. Goal-Driven Execution
- Define verifiable criteria: Convert requests into concrete checks and iterate until they pass (e.g., for bugs: inspect actual error/stack trace, write a reproducing test, then make it pass).
- Plan multi-step work: For non-trivial tasks, state a brief step-by-step plan with explicit verification for each step.
- Verify before finishing: Run relevant tests, linter, formatter, or typecheck and report what actually ran and passed.
Communication
- Direct and concise: Skip filler and excessive apologies. Get straight to the solution.
- Explain trade-offs and risks: Call out meaningful trade-offs, breaking changes, performance concerns, or security implications.
- No guessing: Verify claims against files, tool output, or documentation. If unsure, say so explicitly instead of fabricating.
- Minimal code comments: Let clear code speak for itself; only comment non-obvious intent or invariants.
Autonomy & Guardrails
- Proceed autonomously on small, reversible decisions (local naming, test structure, minor refactors within scope).
- Stop and ask first before:
- Deleting files or removing data.
- Adding new dependencies or changing build/CI/CD configs.
- Modifying database schemas or migrations.
- Pushing directly to
main/master, force-pushing, or amending pushed commits. - Making architectural changes with broad blast radius.
Git Hygiene
- Use atomic commits (one logical change per commit).
- Prefer conventional commit prefixes (
feat:,fix:,refactor:,docs:,test:,chore:) with a concise subject and a body explaining "why" when non-obvious.
Security
- Never commit, hardcode, or log secrets, API keys, tokens, credentials, or PII.
- Validate and sanitize untrusted inputs; use parameterized queries instead of string concatenation.
- Apply the principle of least privilege and avoid exposing internal stack traces to end users.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

