simplify
O que ela faz
Esta skill torna o código que já funciona mais claro e simples, sem mudar seu comportamento. Ela é para desenvolvedores que querem um código mais fácil de ler e alterar por outras pessoas.
Quando usar
- ✓Quando uma funcionalidade funciona e os testes passam, mas o código parece mais pesado do que precisa.
- ✓Quando uma função é longa, muito aninhada ou tem nomes pouco claros.
- ✓Quando uma revisão de código aponta problemas de legibilidade ou de complexidade.
Link da skill
https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/simplify/SKILL.mdCopie 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
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Esta função funciona, mas é difícil de acompanhar. Simplifique-a sem mudar o que ela faz.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill verifica se o comportamento está entendido e depois faz mudanças que mantêm as entradas, as saídas e o tratamento de erros iguais. Ela pula trechos de código que já estão claros.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Code Simplification
Overview
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines - it's code that is easier to read, understand, modify, and debug. Every simplification must pass a simple test: "Would a new team member understand this faster than the original?"
When to Use
- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
- During code review when readability or complexity issues are flagged
- When you encounter deeply nested logic, long functions, or unclear names
- When refactoring code written under time pressure
- When consolidating related logic scattered across files
- After merging changes that introduced duplication or inconsistency
When NOT to use:
- Code is already clean and readable - don't simplify for the sake of it
- You don't understand what the code does yet - comprehend before you simplify
- The code is performance-critical and the "simpler" version would be measurably slower
- You're about to rewrite the module entirely - simplifying throwaway code wastes effort
The Five Principles
1. Preserve Behavior Exactly
Don't change what the code does - only how it expresses it. All inputs, outputs, side effects, error behavior, and edge cases must remain identical. If you're not sure a simplification preserves behavior, don't make it.
Before every change, ask:
- Does this produce the same output for every input?
- Does this maintain the same error behavior?
- Does this preserve the same side effects and ordering?
- What proportionate final-state verification will reveal a behavior change?
2. Follow Project Conventions
Simplification means making code more consistent with the codebase, not imposing external preferences.
Before simplifying:
- Read
AGENTS.md/ project conventions - Study how neighboring code handles similar patterns
- Match the project's style for imports, naming, function style, error handling, and type annotations
Simplification that breaks project consistency is not simplification - it's churn.
3. Prefer Clarity Over Cleverness
Explicit code is better than compact code when the compact version requires a mental pause to parse.
- Replace nested ternaries with readable control flow
- Replace dense inline transforms with named intermediate steps when they clarify intent
- Keep helpful names even if they cost a few extra lines
4. Maintain Balance
Watch for over-simplification:
- Don't inline away names that carry meaning
- Don't merge unrelated logic into one larger function
- Don't remove abstractions that serve testability or extensibility
- Don't optimize for line count over comprehension
5. Scope to What Changed
Default to simplifying recently modified code. Avoid unrelated drive-by refactors unless explicitly asked.
Process
Step 1: Understand Before Touching
Before changing or removing anything, understand why it exists.
Answer:
- What is this code's responsibility?
- What calls it? What does it call?
- What are the edge cases and error paths?
- Are there tests that define expected behavior?
- Why might it have been written this way?
If you can't answer these, read more context first.
Step 2: Look for Simplification Opportunities
Signals:
- Deep nesting
- Long functions with mixed responsibilities
- Nested ternaries
- Boolean flag arguments
- Repeated conditionals
- Generic or misleading names
- Duplicated logic
- Dead code
- Wrappers or abstractions that add no value
Step 3: Apply Changes Incrementally
Make one simplification at a time.
For each simplification:
- Make the change
- Use the proportionate final-state verification plan to check preservation
- Keep it only when the evidence supports preservation
Separate refactoring from feature work whenever possible.
Step 4: Verify the Result
After simplifying, confirm:
- The code is genuinely easier to understand
- The diff is clean and reviewable
- Project conventions still match
- No behavior, error handling, or side effects changed
Guidance for This Repository
- Prefer straightforward TypeScript over clever compression
- Preserve existing runtime behavior, tests, and hooks
- Favor explicit names and smaller focused helpers when they improve readability
- Keep refactors tightly scoped to the task or review feedback
Final-state verification
Use a proportionate final-state verification plan for the final diff. Run checks required by r
Perguntas frequentes
Ela vai mudar o comportamento do código?
A skill diz que o comportamento deve permanecer exatamente igual, então evita qualquer mudança sobre a qual não tenha certeza.
Menos linhas é o objetivo?
Não. O objetivo é um código mais fácil de ler, entender e alterar.
Quando devo evitá-la?
Quando o código já está limpo, ou quando ele é crítico para desempenho e a versão mais simples seria mensuravelmente mais lenta.
Detalhes
Descrição original do autor
Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
Popularidade
- Estrelas no GitHub
- 10 mil
- Posição no ranking
- #12017
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
cli-review
10 milPermite que seu agente rode uma revisão de código do Greptile na sua branch atual antes de abrir um pull request, e depois resuma os achados em termos simples.
ai-estimates
10 milAjuda seu agente a estimar quanto tempo um trabalho leva quando uma pessoa trabalha com IA, separando o trabalho rápido da IA dos atrasos humanos e externos.
clonedeps
10 milPermite que seu agente copie o código-fonte das dependências principais de um projeto para uma pasta local, para que ele consiga ler como essas bibliotecas funcionam por dentro.
codemap
10 milCria um mapa estruturado de um projeto de código que você não conhece, para que seu agente encontre rapidamente as partes principais. Melhor usada quando você pede um mapa do código.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.