Pular para o conteúdo
Skillpedia
Código em geral41 mil · #7010

minimal-code-discipline

O que ela faz

Esta skill guia um agente a manter as mudanças de código o menores possível, sem perder a correção. É para quem quer mudanças focadas, sem inchaço nem extras especulativos.

Quando usar

  • ✓Quando você pede uma mudança mínima, enxuta ou a menor possível.
  • ✓Quando um plano ou uma mudança está crescendo além do que foi pedido.
  • ✓Quando você quer que uma mudança proposta seja revisada quanto a um tamanho desnecessário antes de ser construída.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Adicione um botão de exportação simples na página de relatórios. Mantenha a mudança o menor possível e reaproveite o que já temos.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente primeiro pergunta se a mudança é realmente necessária, verifica a base de código em busca de auxiliares existentes e prefere a ferramenta mais simples que faz o trabalho. Mantém a mudança curta, mas mantém as verificações de segurança.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

Ele remove verificações de segurança para deixar o código pequeno?

Não. Comportamentos protegidos e verificações de segurança nunca são cortados só para economizar linhas.

Ele substitui um pedido de uma funcionalidade grande?

Não. Se você pedir explicitamente uma construção ampla ou preparada para o futuro, o seu escopo prevalece.

Em que ela difere da skill de limpeza?

Esta impede que código extra seja escrito, enquanto a skill de limpeza organiza o código depois que ele já foi adicionado.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
41 mil
Posição no ranking
#7010
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas