code-like-a-local
Skill0 starsChanged 4 months agoMITView on GitHub
How to write code that blends into an existing codebase — matching idiom, naming, and comment discipline. Use before writing or editing any code in a project you didn't create this session.
In this repository32 other files it gives its agents.
- architect-modeSkill
- architecture-bundleSkill
- decision-making-guardrailsSkill
- decision-recordsSkill
- delivery-bundleSkill
- fable-modeSkill
- finish-the-turnSkill
- incident-response-playbookSkill
- launch-readiness-gateSkill
- lead-developer-modeSkill
- lead-with-outcomeSkill
- lean-tool-useSkill
- migration-refactor-safetySkill
- plan-before-implementationSkill
- pr-and-commit-hygieneSkill
- product-delivery-bundleSkill
- product-minded-engineer-modeSkill
- reliability-bundleSkill
- reliability-incident-modeSkill
- review-quality-gateSkill
- run-guardrails-on-code-changesSkill
- security-bundleSkill
- security-minded-engineer-modeSkill
- senior-operating-systemSkill
- staff-engineering-bundleSkill
- staff-engineer-modeSkill
- stakeholder-communicationSkill
- surgical-questionsSkill
- systematic-debuggingSkill
- test-disciplineSkill
- truthful-reportingSkill
- verify-by-exercisingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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 12
Before writing, read enough neighboring code to absorb:
- Distinctive: line 15
Idiom: if the file uses early returns, don't introduce nested conditionals.
- Distinctive: line 17
Structure: put new code where analogous code lives, not where it's convenient.
- Distinctive: line 18
Dependencies: use the libraries already in the project.
- Distinctive: line 20
When your instinct conflicts with the codebase's convention, the codebase wins — flag the concern in your message to the user if it …
- Distinctive: line 24
Write a comment only to state a constraint the code itself cannot show — a non-obvious invariant, an external requirement, a deliberate …
- Distinctive: line 26
Never write comments that:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Write code that reads like the surrounding code
The goal of a change is that a reviewer can't tell where the existing code ends and yours begins. Style consistency is correctness of a kind: it's what keeps a codebase navigable.
Match before you write
Before writing, read enough neighboring code to absorb:
- Naming:
getUservsfetchUservsuser()— use whichever this codebase uses. - Idiom: if the file uses early returns, don't introduce nested conditionals; if it uses a result type, don't throw.
- Comment density: a file with three comments in 400 lines should not gain twelve from your 40-line change.
- Structure: put new code where analogous code lives, not where it's convenient.
- Dependencies: use the libraries already in the project. Never add a dependency for something the existing ones do.
When your instinct conflicts with the codebase's convention, the codebase wins — flag the concern in your message to the user if it matters, don't fix it silently in passing.
Comment discipline
Write a comment only to state a constraint the code itself cannot show — a non-obvious invariant, an external requirement, a deliberate deviation ("intentionally not cached: upstream invalidation is unreliable").
Never write comments that:
- Narrate the next line (
// increment the counter) - Explain where the change came from (
// added per user request) - Justify the change to a reviewer (
// this fixes the race condition— that's the commit message's job) - Mark your edits (
// updated,// new code below)
That last category is you talking to the reviewer, not to the next reader — it's noise the moment the change merges.
Scope discipline
Change what the task requires and nothing else. No drive-by reformatting, no renaming things you didn't need to touch, no "while I was here" refactors — they bloat the diff and hide the real change. If you notice something worth fixing, say so in your report instead of fixing it silently.
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.

