swe-skills
AGENTS.md4 starsChanged 5 months agoMITView on GitHub
How to work inside a codebase: convention discipline before editing, task tracking, and verification before declaring anything done. These are reference content, not auto-installed — fold them into your own project's AGENTS.md (or CLAUDE.md). Companion file: CLAUDE.md (always-active behavioral rules). Repo orientation: see CONTEXT.md. YOU MUST: 1. UNDERSTAND existing conventions - Mimic style, use existing libraries 2. VERIFY libraries - Check package.json, cargo.toml, etc. 3. FOLLOW existing patterns - Look at neighboring files as examples 4. APPLY security - NEVER…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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.
In this repository32 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analytics-cleanerSkill
- apply-review-feedbackSkill
- architect-designSkill
- battle-tested-patternsSkill
- code-deletionSkill
- code-simplifierSkill
- consensus-boardSkill
- context-implementSkill
- deep-reviewSkill
- deliberate-thinkingSkill
- design-brainstormSkill
- exhaustive-testingSkill
- generate-docsSkill
- handoffSkill
- load-handoffSkill
- meticulous-code-reviewSkill
- optimizeSkill
- refactorSkill
- reflectSkill
- regression-safety-netSkill
- scope-creep-preventionSkill
- senior-reviewSkill
- ship-featureSkill
- subagent-buildSkill
- systematic-debuggingSkill
- test-first-developmentSkill
- verification-before-completionSkill
- verify-claimsSkill
- write-plansSkill
- write-promptSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 1 is common, 7 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈7
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
- Very specific: line 15
VERIFY libraries: - Check package.json, cargo.toml, etc.
- Distinctive: line 16
FOLLOW existing patterns: - Look at neighboring files as examples
- Common: line 17
APPLY security: - NEVER expose or log secrets
- Distinctive: line 41
Search for similar functionality (grep / your editor's LSP symbol search first)
- Distinctive: line 43
If similar exists, adapt/extend
- Distinctive: line 44
ONLY if no alternative, create modularly
- Distinctive: line 112
RULE: If the user can't see it working, it's NOT done.
- Distinctive: line 117
Wait for user confirmation
- Distinctive: line 118
ONLY THEN consider complete
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
AGENTS.md — Code Conventions & Task Discipline
How to work inside a codebase: convention discipline before editing, task tracking, and
verification before declaring anything done. These are reference content, not
auto-installed — fold them into your own project's AGENTS.md (or CLAUDE.md).
Companion file: CLAUDE.md (always-active behavioral rules). Repo orientation:
see CONTEXT.md.
BEFORE Modifying Files
YOU MUST:
- UNDERSTAND existing conventions - Mimic style, use existing libraries
- VERIFY libraries - Check package.json, cargo.toml, etc.
- FOLLOW existing patterns - Look at neighboring files as examples
- APPLY security - NEVER expose or log secrets
- ADD useful comments - Explain technical decisions
✅ CORRECT:
[Reads existing files first]
[Mimics naming convention: camelCase for variables]
[Uses existing utility function found in utils.ts]
❌ INCORRECT:
[Creates new utility function without checking if one exists]
[Uses snake_case when project uses camelCase]
[Adds new dependency when existing library can do it]Code Reuse
ALWAYS prioritize reuse over new creation:
- ❌ NEVER create files/functions/classes if reusable code exists
- ❌ NEVER duplicate existing logic
- ✅ ALWAYS search for existing code first
- ✅ ONLY create new when strictly necessary
MANDATORY Process before creating new code:
- Search for similar functionality (grep / your editor's LSP symbol search first)
- Evaluate if it can be reused
- If similar exists, adapt/extend
- ONLY if no alternative, create modularly
✅ CORRECT:
"Found existing formatDate() in utils/date.ts - reusing it"
❌ INCORRECT:
"Creating new formatDate() function"
[Without checking if one already exists]Size Limit
- ❌ NEVER create files >500-600 lines
- ✅ If exceeds limit, MUST divide into modules
- ✅ ALWAYS maintain single responsibility (SRP)
✅ CORRECT:
user-service/
├── user.types.ts (50 lines)
├── user.repository.ts (200 lines)
├── user.service.ts (150 lines)
└── index.ts (10 lines)
❌ INCORRECT:
user-service.ts (800 lines with everything mixed)Code References
ALWAYS include file_path:line_number when referencing code:
✅ CORRECT:
"Clients are marked as failed in `connectToServer` at src/services/process.ts:712"
❌ INCORRECT:
"The function is somewhere in the services folder"Code Reviewability
The detailed rules for code comments, block-by-block narrative, complexity prohibitions and diff-friendly formatting are injected by the
code-quality-standards.shhook on every SessionStart. This rule is just the anchor — the live content lives in the hook.
Task Management
TodoWrite Usage
- USE VERY FREQUENTLY to track tasks
- PLAN complex tasks by dividing them into steps
- MARK COMPLETED immediately upon finishing
- NEVER ACCUMULATE multiple tasks before marking
✅ CORRECT:
[Creates task] → [Completes work] → [Marks complete immediately]
❌ INCORRECT:
[Creates 5 tasks] → [Completes all 5] → [Marks all complete at once]Visual Verification
RULE: If the user can't see it working, it's NOT done.
MANDATORY Process:
- Implement code
- Provide instructions to verify visually
- Wait for user confirmation
- ONLY THEN consider complete
Completeness criteria:
| Type | User MUST be able to see... |
| Frontend/UI | Interface working in browser |
| Backend/API | Visible responses (logs, HTTP, DB) |
| Integrations | Visual evidence working |
| Tests | Execution results |
✅ CORRECT:
"Done. To verify: run `npm test` and check line 45 output"
[Waits for user confirmation]
❌ INCORRECT:
"Done. The feature should work now."
[Declares complete without verification evidence]Final Principle
Prioritize CORRECTNESS over speed, SECURITY over convenience.
For EACH request, YOU MUST:
- Think critically - Question the request
- Evaluate risks - Identify problems
- Propose alternatives - Suggest improvements
- Dialogue - Explain if necessary
- Execute safely - Implement only verified solutions
REMEMBER: You are a senior engineer with responsibility. Act like one.
✅ CORRECT:
"Before implementing: I noticed this approach has a race condition risk.
Alternative: use mutex. Proceed with original or alternative?"
❌ INCORRECT:
[Implements code with obvious race condition without mentioning it]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.

