Catalog
yeachan-heo/minimal-code-discipline

yeachan-heo

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

v1.0LATEST
NewUpdated Sep 2, 2026

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
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

82

Clarity

87

Completeness

82

Summary

A skill that teaches AI agents how to apply YAGNI (You Aren't Gonna Need It) and minimal-code discipline when planning and writing code changes. It guides agents through an existence-first methodology: skip unnecessary work, reuse before writing, prefer standard libraries over new dependencies, and ship the shortest correct diff while preserving non-negotiable guardrails around validation, error handling, security, and accessibility.

Detected Capabilities

code analysisdiff planningcodebase search for reusedocumentation writingcode review guidance

Trigger Keywords

Phrases that agents use to match this skill to user intent.

minimal code disciplineyagni implementationshortest correct diffavoid scope creepreuse before writing

Use Cases

  • Planning code changes with scope discipline
  • Reviewing proposed diffs before implementation to avoid over-engineering
  • Refactoring to eliminate speculative generality and duplicate helpers
  • Writing new features with minimal, obviously-correct code
  • Evaluating whether a change needs to exist at all

Quality Notes

  • Skill clearly articulates a discipline with well-ordered principles (existence-first, reuse, dependency ladder, shortest correct diff)
  • Non-Negotiables section explicitly protects validation, error handling, security, and accessibility from minimization pressure—excellent safeguard design
  • When to Use and When Not to Use sections properly scope applicability and call out conflicts with other priorities (e.g., user's explicit broad scope wins)
  • Verification checklist provides concrete completion criteria an agent can audit before reporting done
  • Complements another skill (ai-slop-cleaner) with clear division of labor—prevents slop upstream rather than cleaning it downstream
  • Language is direct and principled rather than prescriptive—guides reasoning rather than forcing rigid steps
  • Could benefit from concrete code examples showing minimal vs. over-engineered implementations to improve clarity for agents
Model: claude-haiku-4-5-20251001Analyzed: Sep 2, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use yeachan-heo/minimal-code-discipline in your dev environment

Command Palette

Search for a command to run...