code-standards

A general set of rules for writing, changing, and reviewing code across programming languages. It covers modular design, functional patterns, error handling, security, documentation, and testing.

In plain words
What is it for?
Use it for new code, refactoring, code reviews, prototypes, and small fixes in any programming language.
Why use it?
It provides consistent standards for code that is easier to maintain and verify. It also helps prevent duplicated facts, unclear behavior, and changes that are difficult to test.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/johanthoren/jeff/code-standards
Any agent
npx skills add johanthoren/jeff --skill code-standards
Clone the repo
git clone --depth 1 https://github.com/johanthoren/jeff

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00084 $0.01551
Opus 5 $0.00042 $0.00776
Sonnet 5 $0.00017 $0.00310
Haiku 4.5 $0.00008 $0.00155

Measured yesterday against content hash 35269f8a6dd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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/code-standards/SKILL.md · 85 lines

How it starts

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

Code Standards

Language-agnostic defaults. Language-specific skills override where they conflict. These are the Chef's taste stated as directives: apply them as written, and do not substitute your own or your provider's defaults where they differ.

Core Philosophy

  • Modular: small, focused, reusable components.
  • Functional first: pure functions, immutability, composition. A house choice, not a suggestion.
  • Maintainable: self-documenting, testable, predictable.
  • Single source of truth: one authoritative owner per fact; no drifting duplicates.
  • Separate by rate of change: don't weld a fast-changing concern into a slow-changing one; couple the layers loosely so each moves at its own pace.
  • Docs are part of the system: incorrect documentation is a bug. When a change alters docs that describe the system's behavior, verify them against the code as it stands, not just for prose. (OpenBSD.)

Golden Rule: If you can't easily test it, refactor it.

Laziness (the YAGNI ladder)

The best code is the code you never wrote. Before writing any, stop at the first rung that holds:

  1. Does this need to exist? Speculative need = skip it, say so in one line.
  2. Stdlib does it? Use it.
  3. Native platform feature covers it? (<input type="date"> over a picker lib; a DB constraint over app code.) Use it.
  4. An already-installed dependency solves it? Use it. Never add one for what a few lines do.
  5. One line? One line.
  6. Only then: the minimum code that works.
  • Order speed after subtraction: Accelerate only after the design is validated as minimal or to remove an observed bottleneck; automate only a stable, understood process with understood failure modes and deterministic verification signals. Neither may trade away safety, accessibility, data protection, rollback, or verification.

  • Question every addition, including your own and the system's own docs and process: "do you need X, or does Y already cover it?" The lazy lens applies hardest to your own work, not just to feature code; ceremony, prose, and citations are over-build too.

  • Lazy means less code, not the flimsier choice: when two correct approaches are the same size, take the more edge-case-correct one.

  • No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.

  • Deletion over addition. Boring over clever. Fewest files, shortest working diff.

  • Mark a deliberate shortcut with a kiss: comment naming its ceiling and upgrade path (# kiss: O(n^2) scan, index it if the list grows). Simple should read as intent, not ignorance.

  • Laziness governs the process too, but selectively; this is the harder cut. Separate the function a step protects from the ceremony that only resembles it. To drop a step, name the outcome it protects and show that outcome is covered elsewhere or no longer at risk. If you can't name it, it's load-bearing: keep it. (See skills/code-standards/reference/load-bearing-vs-liturgy.md for the test and worked examples.)

  • Never cut the steering or the safety carve-outs. Validation at trust boundaries, error handling that prevents data loss, and security; plus the verification that stops you declaring done when it isn't: tests with meaningful coverage (they steer you and catch a premature "done"), independent review, the done-gate. For an agent this is asymmetric: completion bias pushes you to cut the steering and keep the ritual, so weight against both.

Read the full file on GitHub · 85 lines

Files

What ships with it

1 file 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. yesterday First seen · 85 lines · 84 tokens per session scan A 35269f8a6dd5

Subscribe to this mod's changes

code-standards is a skill published in the GitHub repository johanthoren/jeff (4 stars, last pushed 5d ago), licensed Apache-2.0. It adds 84 tokens to every session and 1,551 once invoked, about $0.0004 per session on Opus 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.