Code Style: Exist, Reuse, Mirror, Symmetry
A prioritized ruleset that makes Claude write minimal new code that blends seamlessly into your existing codebase.
Dev & CodingIntermediate★ 403⑂ 31AI score 7/10Last updated: Sep 24, 2026
What it does
- Gives Claude seven ordered principles; when two conflict, the earlier one wins.
- ① Prove the code needs to exist: drop one-implementation abstractions, single-caller config points, unreachable branches, and speculative scaffolding. Trust-boundary validation, data-loss-preventing error handling, security controls, and accessibility always outrank this rule.
- ② ③ Reuse code and patterns: check for a reusable or generalizable method before writing a helper; replicate the closest analogous feature's decomposition, control flow, and guard clauses instead of inventing a new pattern.
- ④ Mirror surroundings exactly: match brace style, comment style, naming, blank-line spacing, code density, and level of detail after reading nearby code.
- ⑤ Maintain symmetry: when adding
fooB()next tofooA(), align naming, parameter order, and structure — extending to route paths, config keys, event names, env vars, CLI flags, and file naming. Renaming the old name is the default unless it's a published contract you can't update. - ⑥ ⑦ Ordering and comments: insert methods, switch cases, and fields where the existing grouping or business lifecycle says they belong, and default to no comment unless a load-bearing constraint can't be expressed in code.
Who it's for
- Engineers shipping AI-written changes into large or legacy codebases where style drift creates review noise
- Anyone tired of AI-generated over-abstraction, unnecessary options, and chatty comments
- Tech leads who want their review standards applied to AI output too
Examples
- Adding
POST /teamsnext to an existingPOST /usershandler — the new handler copies the old one's guard clauses, error handling, and naming. - "Make this configurable" when there's only one caller — the skill pushes toward inlining rather than adding a config point.
- Adding
exportXlsx()besideexportCsv()— function names, parameter order, file naming, and CLI flags are brought into symmetry, renaming the older name when it isn't a public contract.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/tobihagemann/turbo/HEAD/claude/skills/code-style/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the claude/skills/code-style folder from the GitHub repo tobihagemann/turbo into my ~/.claude/skills/code-style/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/tobihagemann/turbo.git && mkdir -p ~/.claude/skills && cp -r turbo/claude/skills/code-style ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/tobihagemann/turbo.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r turbo/claude/skills/code-style ~/.claude/skills/ - Verify that
~/.claude/skills/code-style/SKILL.mdexists. - Restart Claude Code. The skill triggers automatically when you ask for new features, edits, or refactors in an existing codebase.
- To scope it to a single project, copy the folder into that project's
.claude/skills/instead of your home directory.
View source on GitHub ↗License: MIT