less-code
Skill4 starsChanged 33 days agoMITView on GitHub
Keep every code change as small as possible. Use whenever writing, fixing or refactoring code in this repository (features, bug fixes, UI changes, scripts), before adding new files, components, helpers, abstractions, options or dependencies.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Sin abstracciones prematuras: No crees una función, hook, componente o archivo nuevo para un solo uso.
- Distinctive: line 20
Sin capas defensivas inútiles: No agregues try/catch, validaciones, fallbacks ni tipos para situaciones que no pueden ocurrir en el flujo …
- Distinctive: line 23
Sigue el estilo del archivo: No reformatees ni reorganices código que no es parte del cambio.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Less code
La mejor solución es la que deja el código más corto y claro posible. El diff neto ideal es cero o negativo.
Antes de escribir
- Busca antes de crear. Revisa si ya existe un componente, helper, tipo, token o patrón que resuelva el problema (grep o Serena). Reúsalo o extiéndelo en lugar de crear uno paralelo.
- Entiende el flujo actual. Lee el código que vas a tocar y a quién afecta. Muchas veces el cambio correcto es mover o borrar, no añadir.
- Resuelve solo lo que se pidió. Nada de opciones, flags, parámetros, variantes o casos que nadie pidió "por si acaso".
Mientras escribes
- Borra antes de añadir. Si el cambio vuelve innecesario algo existente (código, props, estilos, copy, dependencias), elimínalo en el mismo cambio.
- Sin abstracciones prematuras. No crees una función, hook, componente o archivo nuevo para un solo uso. La regla de tres: abstrae hasta el tercer caso real.
- Sin capas defensivas inútiles. No agregues try/catch, validaciones, fallbacks ni tipos para situaciones que no pueden ocurrir en el flujo real.
- Sin comentarios que repiten el código. Comenta solo el porqué no obvio.
- Sin dependencias nuevas si la plataforma (Next, React, Bun, la librería que ya usamos) lo resuelve.
- Sigue el estilo del archivo. No reformatees ni reorganices código que no es parte del cambio.
Al terminar
- Revisa tu diff completo y pregúntate por cada bloque añadido: ¿se puede borrar, reusar algo existente o escribirse más corto sin perder claridad?
- Corre
/simplifysobre el cambio si está disponible, y luegobun run check(knip detecta exports y dependencias muertas). - Reporta el balance: líneas añadidas / borradas (
git diff --shortstat) y qué eliminaste.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

