Перейти к содержанию
Skillpedia
Код в целом41k · #7010

minimal-code-discipline

Что он делает

Этот скилл направляет агента на то, чтобы держать изменения кода как можно меньше, оставаясь при этом корректными. Он нужен тем, кто хочет сфокусированных изменений без раздувания и предположительных дополнений.

Когда использовать

  • ✓Когда вы просите минимальное, компактное или наименьшее возможное изменение.
  • ✓Когда план или изменение разрастаются сверх того, что просили.
  • ✓Когда вы хотите, чтобы предложенное изменение проверили на лишний объем, прежде чем его построят.

Ссылка на скилл

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Добавь простую кнопку экспорта на страницу отчета. Сделай изменение как можно меньше и переиспользуй то, что у нас уже есть.”

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

repo: Yeachan-Heo/oh-my-claudecode

Популярность

Звёзды на GitHub
41k
Место в рейтинге
#7010
Лицензия
MIT
Обновлён
02.11.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы