minimal-code-discipline — скилл для Claude Code
Скилл minimal-code-discipline применяет YAGNI-дисциплину при написании кода: сначала проверить, есть ли уже готовое, затем стандартная библиотека, и только потом новый код.
MIT 316 установок ★ 40 997 обновлён 2026-10-24
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a claude-codeЧто делает minimal-code-discipline
Скилл заставляет агента проверять существующий код перед добавлением нового, искать готовые функции в проекте вместо копирования, выбирать стандартную библиотеку до внешних зависимостей и писать самый короткий корректный diff. Внутри — лестница зависимостей (стандартная библиотека → платформа → установленная зависимость → новый код) и правило «скучный код лучше умного». Скилл защищает несжимаемое: валидацию на границах доверия, обработку ошибок с потерей данных, безопасность, доступность и явно запрошенный scope.
Автор рекомендует включать скилл, когда пользователь просит минимальную реализацию, когда план разрастается за рамки задачи или когда нужно проверить размер diff до написания. Без FFmpeg или Python скилл работает — это правило поведения агента, а не внешний инструмент. Перед завершением скилл требует от агента подтвердить, что каждая добавленная строка решает задачу, diff — кратчайший из корректных, несжимаемое цело, тесты проходят.
Какие задачи решает
- не дать агенту переписать готовую функцию вместо её переиспользования
- сократить diff до задачи без спекулятивных обобщений и дублей
- заставить выбрать стандартную библиотеку вместо новой зависимости
- исправить баг в корне, а не латать симптом в каждом вызове
- сохранить валидацию, обработку ошибок и безопасность под давлением минимизации
Примеры запросов агенту
- Поправь этот баг — минимальный diff, только корень проблемы
- Добавь логирование, но сначала найди, есть ли уже логгер в проекте
- Реализуй YAGNI: никаких абстракций, которые я не просил
Как установить minimal-code-discipline
1Через Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a claude-code2Вручную: положить файлы
~/.claude/skills/minimal-code-discipline/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/minimal-code-discipline/
1Через Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a codex2Вручную: положить файлы
.agents/skills/minimal-code-discipline/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a cursor2Вручную: положить файлы
.cursor/skills/minimal-code-discipline/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Yeachan-Heo/oh-my-claudecode skills/minimal-code-discipline2Вручную: положить файлы
.github/skills/minimal-code-discipline/SKILL.md1Через Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a gemini-cli2Командой платформы
gemini skills install https://github.com/Yeachan-Heo/oh-my-claudecode --path skills/minimal-code-disciplineВручную: положить файлы
.devin/skills/minimal-code-discipline/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о minimal-code-discipline
Как установить minimal-code-discipline в Claude Code?
Выполни npx skills add Yeachan-Heo/oh-my-claudecode --skill minimal-code-discipline -a claude-code, скилл ляжет в ~/.claude/skills/minimal-code-discipline/SKILL.md.
Что делает minimal-code-discipline?
Скилл применяет YAGNI-дисциплину: агент проверяет существующий код, повторно использует готовые функции, предпочитает стандартную библиотеку новым зависимостям и пишет кратчайший корректный diff без спекулятивных обобщений.
Когда не стоит включать minimal-code-discipline?
Не включай скилл, если ты явно попросил богатую реализацию с запасом на будущее, пишешь одноразовый прототип или минимизация затронет валидацию, обработку ошибок или безопасность — скилл эти вещи защищает, но лучше не создавать конфликт с явным scope.
Исходный текст
SKILL.md · MIT
--- 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. **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 · Yeachan-Heo/oh-my-claudecode