Agent skill

Code Style

by tobihagemann in tobihagemann/turbo

Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code.

MITAuto-check passedDevelopment

Install Code Style

skills CLI
$ npx skills add tobihagemann/turbo --skill code-style -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tobihagemann/turbo code-style --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/codex/skills/code-style .claude/skills/code-style && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-style
GitHub stars
407
Token cost
~829 tokens
SKILL.md length
469 words
Files
1
Skills in repo
81
Repo updated
First seen
Licence
MIT

At a glance

Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code.

  • Works in 7 steps: Establish that the code needs to exist:… → Reuse existing code: Before writing a… → Reuse existing patterns: Find the… → …
  • Writing new code in an existing codebase
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Adding new features

What it does

Code Style is an agent skill from tobihagemann/turbo. Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. The repository describes itself as: Reusable workflows for planning, building, reviewing, and shipping with Claude Code and Codex. The licence is MIT.

When your agent uses it

  • Writing new code in an existing codebase
  • Adding new features
  • Making any code changes

Example prompts

  • “/code-style”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Establish that the code needs to exist: Drop work the request does not need — an abstraction with one implementation, a configuration…
  2. Reuse existing code: Before writing a new helper, check if an existing method can be reused or generalized. If a new helper is needed…
  3. Reuse existing patterns: Find the closest analogous feature and replicate its structure (method decomposition, control flow, annotations…
  4. Mirror the surrounding code exactly: Match brace style, comment style, naming conventions, blank line spacing, code density, and level of…
  5. Maintain symmetry: If adding fooB() parallel to fooA(), match naming, parameter order, and structure. Symmetry covers every name the new…
  6. Logical ordering: Place new methods, switch cases, and fields in the order that mirrors the existing grouping or business lifecycle…
  7. Default to no comment: Write code that self-explains through naming, extraction, and structure. When you reach for a comment, first try…

What it can do on your machine

Read from SKILL.md and the folder at commit 4b9f4cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Style loads about 829 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 469 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~829

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tobihagemann/turbo at commit 4b9f4cf, republished under its MIT licence (© tobihagemann). 469 words, ~829 tokens.

Download SKILL.mdSave it as .claude/skills/code-style/SKILL.md (or your agent's skills folder).
name
code-style
description
Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.

Code Style: Exist, Reuse, Mirror, Symmetry

When writing new code in an existing codebase, work through these in order. When two pull in different directions, the earlier one wins.

  1. Establish that the code needs to exist: Drop work the request does not need — an abstraction with one implementation, a configuration point with one caller, a branch for a state the callers cannot reach, scaffolding for an anticipated requirement. Deleting or narrowing beats adding. Before removing code that already exists, trace its callers and confirm nothing depends on the behavior. A new test must earn its place too: before adding one, name the behavior it protects and the credible regression that makes it fail, and confirm no existing test already fails on that regression. When an existing test covers the same contract, extend its cases instead. Drive the test through a boundary production code already uses rather than adding an export, flag, or hook that only the test calls. Input validation at trust boundaries, error handling that prevents data loss, security controls, accessibility affordances, and anything explicitly requested outrank this rule.
  2. Reuse existing code: Before writing a new helper, check if an existing method can be reused or generalized. If a new helper is needed, model it after its closest sibling.
  3. Reuse existing patterns: Find the closest analogous feature and replicate its structure (method decomposition, control flow, annotations, guard clauses). When an existing pattern fits, use it rather than introducing a new one. When following it would force materially more code or indirection than a different approach, take the different approach and apply it across the whole change.
  4. Mirror the surrounding code exactly: Match brace style, comment style, naming conventions, blank line spacing, code density, and level of detail by reading nearby code first.
  5. Maintain symmetry: If adding fooB() parallel to fooA(), match naming, parameter order, and structure. Symmetry covers every name the new sibling makes asymmetric: identifiers, route paths, config keys, event names, environment variables, CLI flags, and file naming schemes. Rename the existing name by default; keep it as it stands only when it is a published contract whose consumers you cannot update, or cannot update in step with the rename. Treat deployment and registration as costs the change absorbs: updating every place the name is referenced or registered is part of the change.
  6. Logical ordering: Place new methods, switch cases, and fields in the order that mirrors the existing grouping or business lifecycle, rather than appending at the end.
  7. Default to no comment: Write code that self-explains through naming, extraction, and structure. When you reach for a comment, first try refactoring so it becomes unnecessary. Add one only for a load-bearing constraint the code cannot express (a hidden invariant, a workaround, a non-obvious performance characteristic). When in doubt, omit it.

© tobihagemann, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in codex/skills/code-style of tobihagemann/turbo.

Open the folder on GitHubat commit 4b9f4cf

Compare with similar skills

Code Style next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Style this skilltobihagemann/turbo407—~829Automated safety check: PassMIT
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed

More from tobihagemann/turbo

All 81 skills in this repo
  • Consult Oracle

    tobihagemann/turbo

    Consult ChatGPT Pro via ChatGPT browser automation for problems that resist standard approaches.

    407 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Fetch PR Comments

    tobihagemann/turbo

    Fetch and summarize review feedback and conversation from a GitHub PR (unresolved review threads, review bodies, and PR conversation comments) without making changes.

    407 GitHub starsUsed in 1 repo~967 tokens
    Auto-check passed
  • Recall Rationale

    tobihagemann/turbo

    Recall why a past change was made by locating the Claude Code transcript that produced it.

    407 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Codex Exec

    tobihagemann/turbo

    Run autonomous task execution using the codex CLI. An agent skill from tobihagemann/turbo.

    407 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Resolve PR Comments

    tobihagemann/turbo

    Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments.

    407 GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Investigate

    tobihagemann/turbo

    Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps.

    407 GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed

Categories

Questions about Code Style

What does Code Style do?

Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code. Code Style is an agent skill from tobihagemann/turbo. Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code.

When should I use Code Style?

Code Style fits situations like: writing new code in an existing codebase; adding new features; making any code changes.

How do I install Code Style in Claude Code?

Run `npx skills add tobihagemann/turbo --skill code-style -a claude-code`. Or copy the skill folder (codex/skills/code-style in tobihagemann/turbo) into .claude/skills/code-style in your project. Claude Code loads it when a task matches its description.

How do I install Code Style in Codex?

Run `npx skills add tobihagemann/turbo --skill code-style -a codex`. Or copy the skill folder (codex/skills/code-style in tobihagemann/turbo) into .agents/skills/code-style in your project. Codex loads it when a task matches its description.

Can I use Code Style in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tobihagemann/turbo --skill code-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-style, .gemini/skills/code-style, .github/skills/code-style and .opencode/skills/code-style in your project.

What does Code Style need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Style is instructions for the agent only.

Does Code Style access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Style safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Style use?

Code Style is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Style use?

About 829 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Style?

Skills that share tags, products or a category with Code Style: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 156k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Systematic Code Refactoring (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Style?

tobihagemann (a GitHub user) maintains it in tobihagemann/turbo, which has 407 GitHub stars. The repository holds 81 skills in this directory. The repository was last updated on October 7, 2026.

Source: tobihagemann/turbo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.