coding-agent-guidelines
Skill1 starsChanged 7 months agoMITView on GitHub
Apply disciplined coding-agent behavior in this project. Use this skill whenever the user asks Claude to write, modify, refactor, debug, or review code in a real codebase, especially for changes touching multiple files, schema/migration work, security-sensitive areas, or unfamiliar parts of the project. Enforces small scoped diffs, explicit assumptions, verifiable success criteria, context discipline, careful sub-agent and MCP usage, plan-mode for risky changes, and deliberate model selection.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/coding-agent-guidelines.mdcCursor rule
- coding-agent-guidelinesSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Before editing, identify the smallest set of files relevant to the task and read them.
- Distinctive: line 22
If the user is wrong about a fact, say so directly.
- Distinctive: line 26
Write the minimum code that satisfies the requirement and the tests.
- Distinctive: line 45
Use Grep and Glob to locate code.
- Distinctive: line 46
Don't paste large files into reasoning unless you're editing them.
- Distinctive: line 51
Search before reading. Batch independent reads in parallel.
- Distinctive: line 85
Use Haiku-class models for high-volume, simple, or read-heavy work (including the built-in Explore subagent).
- Distinctive: line 102
If any of those is missing, the task is not done.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
Coding Agent Guidelines (Skill Form)
These directives apply for the duration of any coding task in this project.
Reconnaissance first
Before editing, identify the smallest set of files relevant to the task and read them. State assumptions explicitly. If the request is ambiguous, ask one focused question or state the interpretation you'll use and proceed. If the user is wrong about a fact, say so directly.
Smallest sufficient change
Write the minimum code that satisfies the requirement and the tests. No speculative interfaces, no abstract base classes for one subclass, no configuration without a real second caller. Inline until duplication forces extraction. Comments explain why, not what.
Edits as diffs, not rewrites
Modify only what was asked. No drive-by reformatting, no renames outside scope, no deletion of code that "looks unused" without checking call sites. Match the surrounding style.
Define the finish line
State the verification command before writing code. Run it. Paste output. "Should work" is not acceptable. If you cannot run the check, say so and list what the user must run.
Context as a budget
Use Grep and Glob to locate code. Read targeted ranges, not whole files. Don't paste large files into reasoning unless you're editing them. Track durable lessons; promote them to project memory when appropriate.
Right tool, right moment
Search before reading. Batch independent reads in parallel. Prefer Edit over Write for existing files. After two failures of the same command, stop and read the error.
Delegation hygiene
Spawn a sub-agent (Task tool) when the work is read-heavy and would otherwise pollute the main context, when you need an independent review, or when there are independent parallel tasks. Do not spawn a sub-agent for a one-shot lookup. Sub-agents return only their final message; instruct them to summarize what you actually need.
Memory layers
Project CLAUDE.md for project conventions. User CLAUDE.md for personal
preferences across projects. Auto memory (/memory) for accumulated
notes — promote anything important into CLAUDE.md. Use #-prefixed
in-session rules to experiment, then promote.
Plan mode for risky changes
Switch to plan mode (Shift+Tab Shift+Tab) when the change touches three or more files, involves schema or auth, or is in unfamiliar territory. Plan mode is read-only; review the produced plan as a code review before exiting.
MCP discipline
Each connected MCP server costs context on every turn. Connect narrowly, disconnect what you haven't used in a week, prefer servers with specific tool names and clear single purposes.
Model selection
Use Haiku-class models for high-volume, simple, or read-heavy work
(including the built-in Explore subagent). Default to Sonnet-class for
day-to-day coding. Reach for Opus-class only with measured evidence the
task justifies the cost — typically planning, large refactors, or
unfamiliar architecture work. Inside Claude Code, the /model option
that runs Opus in plan mode and Sonnet in execution is a strong default
for hard work.
Stop conditions
Conclude a task only when:
- The verification command has been run and its output is included.
- The diff contains only the requested change.
- Any new assumptions, residual risks, or follow-ups are listed explicitly.
If any of those is missing, the task is not done.
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.

