simplify
Qué hace
Esta skill hace el código que ya funciona más claro y sencillo sin cambiar su comportamiento. Es para desarrolladores que quieren un código que otros puedan leer y cambiar con más facilidad.
Cuándo usarla
- ✓Cuando una función funciona y sus pruebas pasan, pero el código parece más pesado de lo necesario.
- ✓Cuando una función es larga, tiene muchos niveles de anidamiento o nombres poco claros.
- ✓Cuando una revisión de código señala problemas de legibilidad o de complejidad.
Link de la skill
https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/simplify/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Esta función funciona, pero es difícil de seguir. Simplifícala sin cambiar lo que hace.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill comprueba que el comportamiento está bien entendido y después hace cambios que mantienen iguales las entradas, las salidas y el manejo de errores. Omite el código que ya es claro.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Cambiará el comportamiento del código?
La skill indica que el comportamiento debe seguir siendo exactamente el mismo, así que evita cualquier cambio del que no esté segura.
¿El objetivo es tener menos líneas?
No. El objetivo es un código más fácil de leer, entender y cambiar.
¿Cuándo debo omitirla?
Cuando el código ya está limpio, o cuando es crítico para el rendimiento y la versión más simple sería mediblemente más lenta.
Detalles
Descripción original del autor
Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
Popularidad
- Estrellas en GitHub
- 10 mil
- Posición en el ranking
- #12017
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
cli-review
10 milPermite que tu agente ejecute una revisión de código de Greptile en tu rama actual antes de abrir una solicitud de cambios, y resuma los hallazgos.
ai-estimates
10 milAyuda a tu agente a estimar cuánto tarda un trabajo cuando una persona trabaja con IA, separando el trabajo rápido de la IA de los retrasos humanos y externos.
clonedeps
10 milPermite que tu agente copie el código fuente de las dependencias clave del proyecto en una carpeta local, para poder leer cómo funcionan esas bibliotecas por dentro.
codemap
10 milCrea un mapa estructurado de un proyecto de código desconocido, para que tu agente encuentre rápidamente sus partes principales. Es mejor usarla cuando pides un mapa del código.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.