Saltar al contenido
Skillpedia
Programación general15 mil · #10981

principle-minimize-reader-load

Qué hace

Ofrece al asistente una regla para que el código sea fácil de leer para las personas. Está pensada para equipos cuyo código es difícil de seguir por envoltorios, indirecciones o estado compartido.

Cuándo usarla

  • ✓Cuando el código es difícil de seguir desde la pregunta hasta la respuesta.
  • ✓Cuando un envoltorio tiene un solo llamador o un adaptador no tiene un segundo uso.
  • ✓Cuando el estado global o mutable hace que el comportamiento sea difícil de predecir.

Link de la skill

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-minimize-reader-load/SKILL.md

Có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

Usa esta skill para ayudarme: https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-minimize-reader-load/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Este módulo tiene cinco capas de envoltorios que hacen todas lo mismo. Simplifícalo para que un desarrollador nuevo pueda seguirlo.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El asistente cuenta las capas que hay entre una pregunta y su respuesta, y el estado oculto que el lector debe seguir. Colapsa los envoltorios que cuestan más de lo que ahorran, prefiere funciones puras y reduce el estado al ámbito más pequeño útil.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Minimize Reader Load

Maintainability is the work a reader must do to understand code. Track two axes: layers to trace (indirections between the question and the answer) and state to hold (hidden or mutable context the reader must keep in their head). LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of Guard the Context Window. Working memory is finite for readers too.

  • Collapse layers that cost more than they save: wrappers with one caller, adapters with no second implementation, speculative indirection that was never needed. Inline them.
  • Make adjacent layers change the abstraction. A layer that repeats the same methods and arguments adds reader load without compression. Collapse pass-through layers.
  • Demand interface compression. A broad interface that hides little complexity makes readers learn both the surface and the implementation. Prefer boundaries that hide meaningful decisions.
  • Shrink state scope: prefer pure functions (returns over mutations), locals over fields, fields over module state, and module state over globals. Derive instead of sync.
  • Name the invariant at the boundary, not in every consumer, so the reader learns it once.
  • Before adding a layer or a piece of state, ask: does it reduce reader load elsewhere by at least as much?

The test: can a new reader answer "where does X come from?" and "what can change X?" in under 30 seconds? If not, cut layers or cut state.

Preguntas frecuentes

¿El objetivo es contar líneas?

No. La skill indica que el esfuerzo del lector importa más que el número de líneas o las puntuaciones de complejidad.

¿Cuándo debe eliminarse una capa?

Cuando añade esfuerzo al lector sin un beneficio real, como un envoltorio con un solo llamador.

¿Y el estado?

Prefiere funciones puras y valores locales frente a campos, estado de módulo y globales.

Detalles

Descripción original del autor

Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope.

repo: cursor/plugins

Popularidad

Estrellas en GitHub
15 mil
Posición en el ranking
#10981
Licencia
—
Actualizada
31/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas