Minimal Code Discipline

SkillAI & models

minimal-code-discipline is a skill that gives an AI agent a set of coding rules for making the smallest possible code changes without adding unneeded complexity. It follows a YAGNI-ladder discipline: existence-first thinking, reuse before writing, a dependency ladder, and the shortest correct diff, with non-negotiables that must never be minimized away.

Use Minimal Code Discipline in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Minimal Code Discipline and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Minimal Code Discipline skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have an AI agent setup that can load skills.

Minimal Code DisciplineStart free

What your AI can do with it

  • Applies a YAGNI-ladder discipline when writing code changes
  • Uses existence-first thinking before adding new code
  • Favors reuse of existing code before writing new code
  • Follows a dependency ladder when structuring changes
  • Produces the shortest correct diff for a change
  • Enforces non-negotiables that must never be minimized away

Getting started

  1. Have an AI agent setup that can load skills.
  2. Add the minimal-code-discipline skill to the agent.
  3. Ask the agent to write or modify code; it will apply the discipline to its changes.

What this skill tells your AI

The instructions your AI receives, as published by yeachan-heo/oh-my-claudecode in skills/minimal-code-discipline/SKILL.md and read by ahel’s review.

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.

Root cause, not symptoms. Fix bugs at the root cause shared by every caller, not with a separate patch for each reported symptom.

Non-Negotiables

Never minimize away:

  • validation wherever a trust boundary is crossed
  • error handling that guards against data loss
  • security controls
  • accessibility fundamentals
  • scope the user explicitly requested

Verification

Before reporting completion, confirm:

  • every added line earns its place (no speculative generality, no duplicate helpers)
  • the diff is the shortest one that correctly solves the stated problem
  • non-negotiables are intact
  • tests still pass and behavior is unchanged except as requested

Signals

GitHub stars
39k
Forks
4k
Last commit
Oct 2026

Questions

What does this skill do?
It gives your agent a set of coding rules to make the smallest possible code changes without adding unneeded complexity, using a YAGNI-ladder discipline with non-negotiables that must never be minimized away.
When should the agent use it?
Whenever the agent is writing code changes, so it keeps diffs short, reuses existing code, and avoids adding unneeded complexity.
Advanced
Item type
skill
Key
minimal-code-discipline
Source
github.com/yeachan-heo/oh-my-claudecode