minimal-code-discipline

minimal-code-discipline is a skill for Claude Code from RobinNorberg/oh-my-copilot. It costs 41 tokens per session (608 once invoked), scanned A, a copy of minimal-code-discipline, MIT.

A coding discipline for making the smallest correct change: check whether the change is needed, reuse existing code, and avoid speculative features or dependencies. It also preserves checks and behaviour that protect users.

In plain words
What is it for?
Use it when implementing or reviewing a request that should stay lean, especially when a change is growing beyond its stated scope. It is not meant to constrain explicitly broad builds or temporary exploratory scaffolding.
Why use it?
It reduces scope creep, unnecessary abstractions, invented helpers, and oversized diffs. A diff is the set of code changes being proposed or made.

Skill for Claude Code

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

Part of the oh-my-copilot plugin — 51 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server shipped together

Good fit Use it when implementing or reviewing a request that should stay lean, especially when a change is growing beyond its stated scope. It is not meant to constrain explicitly broad builds or temporary exploratory scaffolding.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robinnorberg/oh-my-copilot/minimal-code-discipline
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 RobinNorberg/oh-my-copilot --skill minimal-code-discipline
Clone the repo
git clone --depth 1 https://github.com/RobinNorberg/oh-my-copilot

Made for: Claude Code.

Or install oh-my-copilot, the plugin that ships this one along with the rest of its 51 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server.

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 minimal-code-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/minimal-code-discipline/github.svg)](https://agentmods.dev/skills/robinnorberg/oh-my-copilot/minimal-code-discipline)
Your own site
<a href="https://agentmods.dev/skills/robinnorberg/oh-my-copilot/minimal-code-discipline"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/minimal-code-discipline/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 minimal-code-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/robinnorberg/oh-my-copilot/minimal-code-discipline"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/minimal-code-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 608 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 100% copy Near-identical to another mod 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.00041 $0.00608
Opus 5 $0.00020 $0.00304
Sonnet 5 $0.00008 $0.00122
Haiku 4.5 $0.00004 $0.00061

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

Security

Grade A, and why

minimal-code-discipline 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.

Origin

This is a copy

100% identical to minimal-code-discipline — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/minimal-code-discipline/SKILL.md · 60 lines

How it starts

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

Minimal Code Discipline

Use this skill to apply a minimal-code (YAGNI-ladder) discipline while planning and writing code changes. It keeps diffs small and obviously correct without sacrificing the checks that keep users safe.

This skill complements ai-slop-cleaner: that skill cleans slop after it lands; this one keeps it from being written.

When to Use

Use this skill when:

  • the user asks for a minimal, lean, YAGNI, or smallest-possible-diff implementation
  • a plan or in-flight change is growing beyond the stated request
  • writing new code where scope creep, reinvented helpers, or speculative generality are likely
  • reviewing a proposed diff for size before implementation

When Not to Use

Do not use this skill when:

  • the user explicitly asks for a broad, feature-rich, or future-proofed build (their explicit scope wins)
  • the task is exploratory scaffolding the user has marked as throwaway
  • minimization pressure would touch protected behavior (see Non-Negotiables)

The Discipline

Existence first. Ask whether the change needs to exist at all; skip work that serves only a speculative future need.

Reuse before writing. Search the codebase for an existing helper, type, or pattern before writing anything new. Never copy a helper that already lives a few files away — reuse it or extract it to one shared location.

Dependency ladder. Reach for the standard library first, then platform-native capability, then an already-installed dependency. Hand-written code is the last resort. Do not introduce a new dependency when a few lines of code suffice, unless the user explicitly requested or approved it.

Understand before minimizing. Read the affected code and follow its execution path first. Ship the shortest correct diff once the problem is understood — code you never write never breaks.

Boring over clever. Prefer boring, obviously-correct code over clever code.

Mark the ceiling. Record deliberate simplifications with a short comment naming the accepted limit and what would justify replacing it.

Read the full file on GitHub · 60 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 · 60 lines · 41 tokens per session scan A 4e013df3913c

Subscribe to this mod's changes

minimal-code-discipline is a skill published in the GitHub repository RobinNorberg/oh-my-copilot (5 stars, last pushed 4d ago), licensed MIT. It adds 41 tokens to every session and 608 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to minimal-code-discipline, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

pr-review

Multi-dimensional review of a PR or feature branch in microsoft/win-dev-skills. Activate on "review my PR / changes / branch", "vet before pushing", "PR review", "is this ready to merge". Fans out parallel sub-agents over skill content, the skill-vs-tool boundary (solution hierarchy), tool correctness…

microsoft/win-dev-skills · 98 tokens

winui-code-review

Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch issues that the compiler and UI tests won't find.

microsoft/win-dev-skills · 49 tokens

verify

Answer "is this shippable / done?" with evidence before a commit or PR — fires on "verify", "is this done", "ready to ship?", pre-commit or pre-PR. Part of the Agentsmith harness; runs the project's verify phases and never claims "passing" without showing the output (R5).

PromptPartner/agentsmith · 69 tokens

karpathy-guidelines

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code. Derived from Andrej Karpathy's LLM coding pitfalls.

VKirill/claude-lane-stack · 39 tokens

verify-readme-features

Verifies that features listed in a README (or similar documentation) are actually implemented in the codebase. Use when user mentions verify features, check feature list, confirm README, validate documentation claims, or audit feature accuracy. Helps catch stale, missing, or inaccurate feature descriptions.

rlespinasse/agent-skills · 61 tokens

lead-review

Autonomous comprehensive review. Once-through pipeline over /review-health, /review-arch, /review-security, /review-perf, /review-a11y, /review-test, /review-release. Operator-configurable ticket creation at startup — when ON, auto-approves sub-skill ticket proposals per the orchestrator-family contract; when OFF…

chrisallenlane/claude-swe-workflows · 115 tokens