minimal-code-discipline
하는 일
이 스킬은 정확성을 지키면서 코드 변경을 가능한 한 작게 유지하도록 에이전트를 안내합니다. 군더더기나 추측성 추가 없이 집중된 변경을 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓최소, 가볍게, 가능한 한 작게 바꿔 달라고 요청할 때.
- ✓계획이나 변경이 요청보다 커지고 있을 때.
- ✓만들기 전에 변경 사항이 불필요하게 큰지 검토받고 싶을 때.
스킬 링크
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“보고서 페이지에 간단한 내보내기 버튼을 추가해 주세요. 변경은 가능한 한 작게 하고, 이미 있는 것을 재사용해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 먼저 변경이 정말 필요한지 묻고, 기존 도우미가 있는지 코드베이스를 확인하며, 일을 해내는 가장 단순한 도구를 선호합니다. 안전 검사는 그대로 두면서 변경을 짧게 유지합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
자주 묻는 질문
코드를 줄이려고 안전 검사를 없애나요?
아니요. 보호된 동작과 안전 검사는 줄 수를 줄이기 위해 절대 빼지 않습니다.
큰 기능 요청을 무시하나요?
아니요. 넓은 범위나 미래 대비 구현을 명시적으로 요청하면, 사용자의 범위가 우선합니다.
정리 스킬과 무엇이 다른가요?
이 스킬은 추가되기 전에 불필요한 코드가 작성되지 않도록 막고, 정리 스킬은 추가된 뒤에 코드를 다듬습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 41k
- 순위
- #7010
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-doc-discipline
41k에이전트가 다른 AI 에이전트가 스스로 따를 수 있는 지침을 쓰도록 가르칩니다. 확인할 수 있는 규칙과 각 규칙의 명확한 이유를 담습니다.
ai-slop-cleaner
41k에이전트가 작동하지만 군더더기가 많거나 반복되는 AI 작성 코드를 정리해, 동작을 바꾸지 않고 불필요한 코드를 제거하도록 돕습니다.
architecture-survey
41k에이전트가 코드베이스의 구조를 검토하고, 근거와 함께 변경하기 어려워지는 부분을 나열합니다. 스스로 아무것도 바꾸지 않습니다.
ask-navigator
41k에이전트가 막연한 프로젝트를 명확한 결정 질문의 지도로 바꾸고, 길이 분명해질 때까지 질문을 하나씩 해결하도록 돕습니다.