Agent skill

Minimal Code Discipline

by Yeachan-Heo in Yeachan-Heo/oh-my-claudecode

A YAGNI-style checklist for planning and writing code changes: skip what is not needed, reuse what exists and ship the shortest correct diff.

MITAuto-check passedDevelopment

Install Minimal Code Discipline

skills CLI
$ npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Yeachan-Heo/oh-my-claudecode minimal-code-discipline --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Yeachan-Heo/oh-my-claudecode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/minimal-code-discipline .claude/skills/minimal-code-discipline && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
minimal-code-discipline
GitHub stars
40k
Token cost
~746 tokens
SKILL.md length
397 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

A YAGNI-style checklist for planning and writing code changes: skip what is not needed, reuse what exists and ship the shortest correct diff.

  • You ask for a lean, minimal or smallest-possible-diff implementation
  • SKILL.md covers When to Use, When Not to Use, The Discipline and Non-Negotiables, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • A plan or in-flight change is growing past what was requested

What it does

The skill works as a ladder of questions asked before and during a change. Ask whether the change needs to exist at all, search for an existing helper or pattern before writing one, prefer the standard library, then platform features, then an already installed dependency, and write hand-made code last. The agent reads the affected code first, favors boring code over clever code, marks deliberate simplifications with a comment naming the accepted limit, and fixes root causes instead of patching each reported symptom.

It is paired with ai-slop-cleaner, which cleans up slop after it lands while this skill prevents it. Some things are never minimized away: validation at trust boundaries, error handling that guards against data loss, security controls, accessibility basics and any scope you explicitly asked for. It does not apply when you want a broad or future-proofed build, or when the work is marked as throwaway scaffolding.

When your agent uses it

  • You ask for a lean, minimal or smallest-possible-diff implementation
  • A plan or in-flight change is growing past what was requested
  • Reviewing a proposed diff for size before implementing it

Example prompts

  • “Add CSV export to the reports page with the smallest diff that works.”
  • “This change keeps growing, so trim it back to what I originally asked for.”
  • “Before writing a new date helper, check whether the repo already has one.”

What it can do on your machine

Read from SKILL.md and the folder at commit 454bae0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Minimal Code Discipline loads about 746 tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 397 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~746

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Yeachan-Heo/oh-my-claudecode at commit 454bae0, republished under its MIT licence (© Yeachan-Heo). 397 words, ~746 tokens.

Download SKILL.mdSave it as .claude/skills/minimal-code-discipline/SKILL.md (or your agent's skills folder).
name
minimal-code-discipline
description
YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away
level
3

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.

Show full SKILL.md (151 more words)Show less

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

© Yeachan-Heo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/minimal-code-discipline of Yeachan-Heo/oh-my-claudecode.

Open the folder on GitHubat commit 454bae0

Compare with similar skills

Minimal Code Discipline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Minimal Code Discipline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Minimal Code Discipline this skillYeachan-Heo/oh-my-claudecode40k—~746Automated safety check: PassMIT
Ponytail Lazy Developer ModeDietrichGebert/ponytail159k—~873Automated safety check: PassMIT
Codebase Health Refactoringkucherenko/jscpd6.4k—~2.5kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.4k—~2.1kAutomated safety check: PassMIT
Code Simplifierkeep-starknet-strange/starkzap1081 repos~2.1kAutomated safety check: WarnNone
Code SimplifierTwiTech-LAB/devchain101—~2kAutomated safety check: PassCustom licence

Similar skills

  • Ponytail Lazy Developer Mode

    DietrichGebert/ponytail

    Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.

    159k GitHub stars~873 tokensUpdated today
    DevelopmentAuto-check passed
  • A three-part cleanup guided by jscpd: measure health, then fix duplicated code, remove dead code and simplify the most complex files, finishing by re-measuring the score.

    6.4k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.4k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Simplifier

    keep-starknet-strange/starkzap

    Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.

    108 GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check: warnings
  • Code Simplifier

    TwiTech-LAB/devchain

    Review a change set for reuse, simplification, efficiency, and altitude problems, then apply the fixes while preserving exact behavior.

    101 GitHub stars~2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Simplify Recent Changes

    QwenLM/qwen-code

    Reviews your uncommitted diff with three parallel passes for reuse, quality and efficiency, then applies the straightforward cleanups before a pull request.

    28k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed

More from Yeachan-Heo/oh-my-claudecode

All 47 skills in this repo
  • Ask Advisor Routing

    Yeachan-Heo/oh-my-claudecode

    Sends a question or task to another locally installed agent CLI, such as Codex or Gemini, through omc ask and saves the answer as a file.

    40k GitHub stars~572 tokensUpdated today
    Auto-check passed
  • Ask Navigator

    Yeachan-Heo/oh-my-claudecode

    Charts a foggy effort into a map of decision tickets on the repo's issue tracker and works through them one per session, producing decisions rather than deliverables.

    40k GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Self-Improve Evolutionary Loop

    Yeachan-Heo/oh-my-claudecode

    Runs an autonomous improvement loop on a repository: agents propose and execute plans, a tournament picks the winner by benchmark, and each round is recorded and plotted.

    40k GitHub stars~5.3k tokensUpdated today
    Auto-check: warnings
  • Autopilot

    Yeachan-Heo/oh-my-claudecode

    Takes a short product idea through requirements, design, planning, parallel implementation, QA cycles and multi-reviewer validation to produce working code.

    40k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • OMC Mode Cancellation

    Yeachan-Heo/oh-my-claudecode

    Detects and gracefully cancels whichever OMC mode, autopilot, ralph, swarm, pipeline, or team, is currently active, then clears its state.

    40k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Hierarchical AGENTS.md Generator

    Yeachan-Heo/oh-my-claudecode

    Maps a codebase directory by directory and writes linked AGENTS.md files, each pointing to its parent, to document what each area contains.

    40k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Minimal Code Discipline

What does Minimal Code Discipline do?

A YAGNI-style checklist for planning and writing code changes: skip what is not needed, reuse what exists and ship the shortest correct diff. The skill works as a ladder of questions asked before and during a change. Ask whether the change needs to exist at all, search for an existing helper or pattern before writing one, prefer the standard library, then platform features, then an already installed dependency, and write hand-made code last.

When should I use Minimal Code Discipline?

Minimal Code Discipline fits situations like: you ask for a lean, minimal or smallest-possible-diff implementation; A plan or in-flight change is growing past what was requested; reviewing a proposed diff for size before implementing it.

How do I install Minimal Code Discipline in Claude Code?

Run `npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a claude-code`. Or copy the skill folder (skills/minimal-code-discipline in Yeachan-Heo/oh-my-claudecode) into .claude/skills/minimal-code-discipline in your project. Claude Code loads it when a task matches its description.

How do I install Minimal Code Discipline in Codex?

Run `npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a codex`. Or copy the skill folder (skills/minimal-code-discipline in Yeachan-Heo/oh-my-claudecode) into .agents/skills/minimal-code-discipline in your project. Codex loads it when a task matches its description.

Can I use Minimal Code Discipline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/minimal-code-discipline, .gemini/skills/minimal-code-discipline, .github/skills/minimal-code-discipline and .opencode/skills/minimal-code-discipline in your project.

What does Minimal Code Discipline need to run?

SKILL.md names no scripts, command-line tools or credentials: Minimal Code Discipline is instructions for the agent only.

Does Minimal Code Discipline access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Minimal Code Discipline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Minimal Code Discipline use?

Minimal Code Discipline is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Minimal Code Discipline use?

About 746 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Minimal Code Discipline?

Skills that share tags, products or a category with Minimal Code Discipline: Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 159k stars), Codebase Health Refactoring (kucherenko/jscpd, 6.4k stars), DRY Refactoring With jscpd (kucherenko/jscpd, 6.4k stars) and Code Simplifier (keep-starknet-strange/starkzap, 108 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Minimal Code Discipline?

Yeachan-Heo (a GitHub user) maintains it in Yeachan-Heo/oh-my-claudecode, which has 39,720 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 8, 2026.

Source: Yeachan-Heo/oh-my-claudecode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.