MCPInstall

minimal-code-discipline

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

Installs
243
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill minimal-code-discipline
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads minimal-code-discipline automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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.

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

FAQ

What does the minimal-code-discipline skill do?

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

How do I install minimal-code-discipline?

Run npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill minimal-code-discipline in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/minimal-code-discipline/ (personal) or .claude/skills/minimal-code-discipline/ (project).

Which AI agents can use minimal-code-discipline?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is minimal-code-discipline safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains minimal-code-discipline?

It is published by yeachan-heo in yeachan-heo/oh-my-claudecode. It has 243 recorded installs.

More from yeachan-heo/oh-my-claudecode

View all →

ai-slop-cleaner

yeachan-heo/oh-my-claudecode

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

Testing & QA1.6K installs

ralplan

yeachan-heo/oh-my-claudecode

Consensus planning entrypoint that auto-gates vague ralph/autopilot/team requests before execution

hud

yeachan-heo/oh-my-claudecode

Configure HUD display options (layout, presets, display elements)

Frontend & Design1.1K installs

deepinit

yeachan-heo/oh-my-claudecode

Deep codebase initialization with hierarchical AGENTS.md documentation

autopilot

yeachan-heo/oh-my-claudecode

Full autonomous execution from idea to working code

1K installs

deep-interview

yeachan-heo/oh-my-claudecode

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

1K installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs