minimal-code-discipline

Applies YAGNI-ladder discipline to keep code diffs minimal and correct.

38.9k|3.5k|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: minimal-code-discipline
Source: https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/minimal-code-discipline
Command: npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Code changes often grow beyond the stated request through scope creep, duplicated helpers, speculative generality, and unnecessary new dependencies. This Skill enforces a minimal-code discipline so diffs stay small, obviously correct, and free of reinvented utilities.

Core Features & Use Cases

  • Existence-First Planning: Questions whether a change needs to exist at all before writing any code, skipping work that serves only speculative future needs.
  • Reuse and Dependency Ladder: Searches the codebase for existing helpers before writing new ones, and prefers standard library, then platform-native capability, then installed dependencies over hand-written code.
  • Protected Non-Negotiables: Guarantees that validation at trust boundaries, error handling, security controls, accessibility, and explicitly requested scope are never minimized away.
  • Use Case: When asked to add a small feature, the Skill guides the AI to reuse an existing helper two files away, avoid adding a new npm package, and ship the shortest correct diff with tests still passing.

Quick Start

Ask the AI to implement the requested change using the minimal-code-discipline skill so the diff stays as small as possible without cutting validation or error handling.

Frequently Asked Questions about minimal-code-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep code diffs minimal when implementing a feature?

Apply the YAGNI-ladder discipline: confirm the change needs to exist, reuse existing helpers instead of writing new ones, prefer the standard library over new dependencies, and ship the shortest correct diff after understanding the execution path.

What is the dependency ladder in minimal code discipline?

The dependency ladder orders implementation choices: standard library first, then platform-native capability, then an already-installed dependency, with hand-written code as the last resort. New dependencies are avoided unless the user explicitly approves them.

When should I not use a minimal-code or YAGNI approach?

Avoid it when the user explicitly requests a broad or future-proofed build, when the task is throwaway exploratory scaffolding, or when minimization would remove validation, error handling, security controls, or accessibility fundamentals.

How does minimal-code-discipline differ from ai-slop-cleaner?

minimal-code-discipline prevents bloated code from being written in the first place during planning and implementation, while ai-slop-cleaner removes slop after it has already landed in the codebase. The two skills complement each other.

Can minimization remove validation or error handling code?

No. The skill defines non-negotiables that must never be minimized away: validation at trust boundaries, error handling that guards against data loss, security controls, accessibility fundamentals, and explicitly requested scope.