clean-code-core

clean-code-core is a skill for Claude Code from CassetteTapeCrackle/claude-starters. It costs 70 tokens per session (791 once invoked), scanned A, original, MIT.

A language-independent set of rules for shaping readable code, covering names, function boundaries, types, comments, and error handling. Other language-specific rules can build on it.

In plain words
What is it for?
It helps write or review code by choosing clear names, keeping functions focused, handling errors explicitly, and passing dependencies through interfaces.
Why use it?
It helps prevent vague names, oversized functions, mixed levels of detail, and hidden dependencies that make code harder to understand or change.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-starters plugin — 10 skills, 1 command, 8 agents, 2 hooks shipped together

Good fit It helps write or review code by choosing clear names, keeping functions focused, handling errors explicitly, and passing dependencies through interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cassettetapecrackle/claude-starters/clean-code-core
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add CassetteTapeCrackle/claude-starters --skill clean-code-core
Clone the repo
git clone --depth 1 https://github.com/CassetteTapeCrackle/claude-starters

Made for: Claude Code.

Or install claude-starters, the plugin that ships this one along with the rest of its 10 skills, 1 command, 8 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clean-code-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-core/github.svg)](https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-core)
Your own site
<a href="https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-core"><img src="https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-core/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clean-code-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-core"><img src="https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00791
Opus 5.5 $0.00028 $0.00316
Sonnet 5.5 $0.00014 $0.00158
Haiku 4.5 $0.00007 $0.00079

Measured 4d ago against content hash 4828eec2c27a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clean-code-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clean-code-core/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clean code, core (any language)

The per-language clean-code-* skills add idioms on top. Scope decides how much to build; this decides its shape.

Names

  • Say what it is, in the domain's words: unpaid_invoices, not data2 or list.
  • Greppable and distinctive: a reader (or agent) finds every use with one search. Avoid handle, process, manager, util as whole names.
  • Booleans read as questions: is_ready, has_lock. Functions are verbs, values are nouns.
  • Length tracks scope: i in a 3-line loop, a full name at module level.
  • Maps read <values>_by_<key>: assets_by_name, users_by_id.

Functions

  • One job. If the honest name needs "and", split it.
  • One level of abstraction per body. Section comments inside a function ("find the asset", "check its type") are the tell: each section becomes a call.
  • Early returns for guards and errors; keep the happy path flat and last.
  • Honest signatures: everything a function reads or changes arrives through its parameters. Mutating an argument is fine when the signature says so (sort(items)).
  • Push I/O, clocks, randomness and globals to the top of the call tree and pass them down (the RNG, now, the file handle). The core stays testable and reproducible; one hidden global makes every caller depend on it too.
  • Ask for the least you need: the field, not the whole object; a view or iterable, not one specific container.
  • A boolean flag parameter that switches behavior is two functions. Many arguments of one type, or bare true/false at call sites: pass a named options struct.
  • Framework callbacks (main, update, processBlock, request handlers) stay thin: unpack the framework's arguments, then call your own testable functions.
  • Write top-down: call the function you wish existed, finish the current thought, then write it.
  • Extract a block that deserves its own name or its own test, even if it runs once.

Types

  • A property checked in many places (normalized, non-empty, validated) becomes a type that can only be built valid. Check once at construction; callees trust the type.
  • Data kept consistent by hand across several functions (lowercase the key, then binary-search, in every method) becomes its own type with its own operations.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 48 lines · 70 tokens per session scan A 4828eec2c27a

Subscribe to this mod's changes

clean-code-core is a skill published in the GitHub repository CassetteTapeCrackle/claude-starters (1 stars, last pushed 4d ago), licensed MIT. It adds 70 tokens to every session and 791 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-03.

Related

clean-code-core compared with skills from other repositories

clean-code-core next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clean-code-coreCassetteTapeCrackle/claude-startersSkill14d agoMITA70Claude Code
stack-prHigorAlves/orcSkill7yesterdayMITA52Claude Code, Codex
review-contractHigorAlves/orcSkill7yesterdayMITA27Claude Code
caveman-reviewHigorAlves/orcSkill7yesterdayMITA22Claude Code
improve-codebase-architectureHigorAlves/orcSkill7yesterdayMITA17Claude Code
inline-reviewHigorAlves/orcSkill7yesterdayMITA43Claude Code, Codex
caveman-prHigorAlves/orcSkill7yesterdayMITA14Claude Code