minimal-code

A set of coding guidelines for keeping changes small and simple.

In plain words
What is it for?
Use it while building features to choose the simplest workable solution, reuse existing code, and add abstractions only when repetition or shared behavior is real.
Why use it?
It helps prevent speculative features, unnecessary layers, and extra dependencies that make code harder to maintain.

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/lantisprime/claude-sdlc/minimal-code
Any agent
npx skills add lantisprime/claude-sdlc --skill minimal-code
Clone the repo
git clone --depth 1 https://github.com/lantisprime/claude-sdlc

Made for: Claude Code, Codex.

Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 685 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.00124 $0.00685
Opus 5 $0.00062 $0.00342
Sonnet 5 $0.00025 $0.00137
Haiku 4.5 $0.00012 $0.00068

Measured 2d ago against content hash 4316e2ec0295, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

minimal-code 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 2d 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/minimal-code/SKILL.md · 56 lines

How it starts

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

Minimal Code

Resist the urge to write more than necessary.

Principles

  • YAGNI. You aren't gonna need it. No speculative parameters, no "for future extensibility" hooks, no configuration for cases that don't exist.
  • KISS. The simplest thing that could possibly work. If there's a one-line solution and a three-class solution, the one-liner wins until there's a concrete reason it doesn't.
  • DRY when it actually repeats. Three occurrences before you extract a helper. Two might be coincidence. One is always coincidence.
  • Flat over nested. Shallow call graphs, few layers, fewer indirections. Each extra layer is a place a future reader has to stop and look up.
  • Delete more than you add, when you can. Touching a function is a chance to remove dead code that the function actually owns. (But not code it doesn't own — see surgical-edit.)

Heuristics

Dependencies

  • Can the standard library do this? Use it.
  • Is a dependency already present that covers this? Use it.
  • A new dependency needs: justification in the plan, license check, maintenance check, bundle/runtime impact.

Abstractions

  • New class? Only if there's state and behavior and multiple call sites.
  • New interface/protocol? Only if there are or will soon be multiple implementations — not "might be someday."
  • New module? Only if the code doesn't fit the theme of an existing one.

Configuration

  • Hardcode first, extract to config when a second value appears.
  • Feature flags for actual rollouts, not for "maybe someday."

Indirection

  • Don't wrap a library call in a function that does nothing but call it.
  • Don't add a factory when a constructor works.
  • Don't add a service layer when the call site is the only caller.

The "one-function rule"

Before adding a new class, ask: would a single function do? Before adding a new module, ask: would a single function in an existing module do? Before adding a new file, ask: would three lines in an existing file do?

Lines-of-code signal

Read the full file on GitHub · 56 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. 2d ago First seen · 56 lines · 124 tokens per session scan A 4316e2ec0295

Subscribe to this mod's changes

minimal-code is a skill published in the GitHub repository lantisprime/claude-sdlc (3 stars, last pushed 4mo ago), licensed MIT. It adds 124 tokens to every session and 685 once invoked, about $0.0006 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.