Saltar al contenido
Skillpedia
Programación general91 mil · #1320

principle-encode-lessons-in-structure

Qué hace

Esta skill guía a la IA para dejar de repetir la misma corrección en las notas. Convierte la lección en una regla de lint, una comprobación o un script que la haga cumplir. Es para equipos que quieren menos errores repetidos.

Cuándo usarla

  • ✓Cuando la misma instrucción se ha escrito dos o más veces.
  • ✓Cuando una corrección recurrente de un revisor vuelve una y otra vez.
  • ✓Cuando una prueba fallida revela un patrón que podría comprobarse automáticamente.

Link de la skill

https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/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/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/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

“En las revisiones de código seguimos cometiendo el mismo error. Convierte esa regla en una comprobación automática en lugar de otro recordatorio.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La IA pregunta si la regla puede aplicarse con una regla de lint, un indicador en los metadatos, una comprobación en tiempo de ejecución o un script. Prefiere el mecanismo más fuerte disponible y elimina el recordatorio de texto una vez que existe la comprobación.

Contenido técnico (SKILL.md original)

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

Encode Lessons in Structure

Encode recurring fixes in mechanisms (tools, code, metadata, automation) instead of textual instructions. Every error, human correction, and unexpected outcome is a learning signal. Capture it, route it, and close the loop.

Why: Textual instructions are easy to miss. They require the reader to notice, remember, and comply. Structural mechanisms (lint rules, metadata flags, runtime checks, automation scripts) enforce the rule without cooperation.

Pattern: When you catch yourself writing the same instruction a second time:

  1. Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?
  2. If yes, encode it. Delete the instruction
  3. If no (requires judgment), make the instruction more prominent and add an example of the failure mode

Pick the strongest mechanism. When more than one mechanism would work, choose the strongest the situation allows (an unrepresentable state that cannot compile, then a lint or banned API that fails CI, then a canonical helper, then a runtime check), because agents copy whatever the surrounding code already does and a weaker guard becomes the next template.

Corollary: If the fix is structural, only use the structural fix. The instruction is the symptom.

Feedback loop:

  • Capture every correction. When the human intervenes or tests fail, decide if it's a one-off or a pattern.
  • Route to the right layer. One-off -> brain note. Recurring fix -> skill or lint rule. Systemic issue -> principle.
  • Close the loop. Don't just record. Apply now or create a concrete todo.

Anti-patterns:

  • Acknowledging without recording ("I'll keep that in mind" does not persist)
  • Recording without routing (a brain note about a lint rule that should exist is wasted unless the lint rule gets implemented)
  • Fixing without generalizing (fixing one instance while leaving the recurring pattern intact)
Preguntas frecuentes

¿Por qué no escribir un recordatorio mejor?

La skill dice que los recordatorios se pasan por alto con facilidad, mientras que las comprobaciones automáticas hacen cumplir la regla sin que nadie tenga que acordarse.

¿Qué pasa si una regla necesita juicio humano?

La skill dice que hay que hacer la instrucción más visible y añadir un ejemplo del fallo.

¿Qué mecanismo se prefiere?

El más fuerte que permita la situación, como una regla que haga imposible el error o que haga fallar la compilación.

Detalles

Descripción original del autor

Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.

repo: storybookjs/storybook

Popularidad

Estrellas en GitHub
91 mil
Posición en el ranking
#1320
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas