Code Standards

Code Standards is a skill for Claude Code from hculap/better-code. It costs 83 tokens per session (1,353 once invoked), scanned A, original, MIT.

A practical guide to software code-quality rules and common size limits. It explains principles such as keeping code simple, avoiding unnecessary duplication, and separating responsibilities.

In plain words
What is it for?
Use it when reviewing or refactoring code, or when deciding whether files, functions, or responsibilities should be split.
Why use it?
It gives developers concrete checks for deciding when code is too complex, repetitive, or large. This makes code-quality reviews more consistent.

Skill for Claude Code

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

Part of the code-standards plugin — 1 skill, 5 commands, 1 agent shipped together

Good fit Use it when reviewing or refactoring code, or when deciding whether files, functions, or responsibilities should be split.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hculap/better-code/code-standards
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 hculap/better-code --skill code-standards
Clone the repo
git clone --depth 1 https://github.com/hculap/better-code

Made for: Claude Code.

Or install code-standards, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 1 agent.

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 Code Standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/hculap/better-code/code-standards/github.svg)](https://agentmods.dev/skills/hculap/better-code/code-standards)
Your own site
<a href="https://agentmods.dev/skills/hculap/better-code/code-standards"><img src="https://agentmods.dev/badge/skills/hculap/better-code/code-standards/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 Code Standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/hculap/better-code/code-standards"><img src="https://agentmods.dev/badge/skills/hculap/better-code/code-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 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.00083 $0.01353
Opus 5.5 $0.00033 $0.00541
Sonnet 5.5 $0.00017 $0.00271
Haiku 4.5 $0.00008 $0.00135

Measured 1mo ago against content hash 4239e5d0867c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Code Standards 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 1mo 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.

plugins/code-standards/skills/code-standards/SKILL.md · 182 lines

How it starts

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

Code Standards

Practical code quality standards with concrete "rules of thumb" - actionable thresholds rather than philosophy.

Core Principles

KISS (Keep It Simple, Stupid)

Prefer the simplest solution that works. Avoid "clever" code, magic, and over-engineering.

DRY (Don't Repeat Yourself)

Remove duplication when it's real duplication. Avoid premature abstraction.

YAGNI (You Aren't Gonna Need It)

Build features/abstractions only for real, current needs - not hypothetical future ones.

SRP (Single Responsibility Principle)

One module/class/function should have one reason to change.

Separation of Concerns

Keep UI, domain logic, persistence, integration, and config separated.

Principle of Least Surprise

Code should behave as a reader expects.

Fail Fast, Loudly

Validate inputs early; crash with clear errors rather than silently continuing.

Size Limits

File Size (Lines of Code)

Level LOC Action
Target 100-300 Ideal
Soft limit 400 Consider splitting (warning)
Hard limit 800 Must refactor (critical)

When a file grows too large, ask what responsibilities got mixed (SRP), then split by domain or feature.

Function/Method Size

Level LOC Action
Target 10-30 Ideal
Soft limit 50 Review (warning)
Hard limit 80 Must refactor (critical)

If a function cannot be named clearly, it's doing too much.

Cyclomatic Complexity

Score Action
>10 Review required
>15 Refactor strongly
>20 Almost always too complex

Language-Specific Thresholds

Different languages have different conventions. See references/language-thresholds.md for complete per-language limits.

Naming & Readability

  • Prefer clear names over comments
  • Use consistent vocabulary (e.g., "user" everywhere, not sometimes "customer")
  • Avoid abbreviations unless universally known
  • Boolean names: isEnabled, hasAccess, shouldRetry

Read the full file on GitHub · 182 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 182 lines · 83 tokens per session scan A 4239e5d0867c

Subscribe to this mod's changes

Code Standards is a skill published in the GitHub repository hculap/better-code (2 stars, last pushed 8d ago), licensed MIT. It adds 83 tokens to every session and 1,353 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-08-31.

Related

Other skills, from other repositories

audit-comment-residue

Read-only classifier that flags residue in code comments: history narration, plan or session references, conversational asides, ticket or PR back-references, origin notes, and workarounds with no link or removal condition. Use when asked to 'audit code comments' or report which comments only make sense with the chat…

melodic-software/claude-code-plugins · 96 tokens

improve

Codebase scan for module-level friction (shallow modules, seam leaks, locality gaps): an HTML candidate report, then a Design-It-Twice interview on the chosen one. Use when 'improve architecture', 'find deepening opportunities', 'shallow modules', 'design it twice', 'compare alternative interfaces', 'make code more…

melodic-software/claude-code-plugins · 118 tokens

review-pr

Multi-agent PR review with four modes (review, re-review, self-review, address-feedback) - spawns parallel subagents, saves diff to /tmp for context efficiency, supports file exclusion patterns.

hoblin/claude-ruby-marketplace · 39 tokens

code-review

CI code-review lane for a GitHub pull request. High-signal correctness and maintainability findings only, scoped out of security when a security lane exists. Use when: 'CI code review', 'claude-review lane', '/review:code-review', or a reusable workflow invokes the org code-review plugin command.

melodic-software/claude-code-plugins · 63 tokens

code-review-assistant

Automated code review with PR analysis, change summaries, quality checks, and code smell detection. Use this skill when reviewing pull requests, generating review comments, checking against best practices, identifying code smells, or providing refactoring guidance — even if they just say "review this" or "look at this…

d-o-hub/github-template-ai-agents · 78 tokens

semantic-validation

GenAI-powered semantic validation - detects outdated docs, version mismatches, and architectural drift.

akaszubski/autonomous-dev · 20 tokens