Pular para o conteúdo
Skillpedia
Código em geral91 mil · #1320

principle-encode-lessons-in-structure

O que ela faz

Esta skill orienta a IA a parar de repetir a mesma correção em notas. Ela transforma a lição em uma regra de lint, uma verificação ou um script que a aplica. Ela é para equipes que querem menos erros repetidos.

Quando usar

  • ✓Quando a mesma instrução foi escrita duas vezes ou mais.
  • ✓Quando uma correção recorrente de um revisor continua voltando.
  • ✓Quando um teste que falha revela um padrão que poderia ser verificado automaticamente.

Link da skill

https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.md

Copie 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

Use esta skill para me ajudar: https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Estamos sempre cometendo o mesmo erro nas revisões de código. Transforme essa regra em uma verificação automática, em vez de mais um lembrete.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A IA pergunta se a regra pode ser aplicada por uma regra de lint, uma flag nos metadados, uma verificação em tempo de execução ou um script. Ela prefere o mecanismo mais forte disponível e remove o lembrete em texto assim que a verificação existe.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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)
Perguntas frequentes

Por que não escrever um lembrete melhor?

A skill diz que lembretes são fáceis de esquecer, enquanto verificações automáticas aplicam a regra sem que ninguém precise lembrar.

E se a regra exigir julgamento humano?

A skill diz para deixar a instrução mais destacada e incluir um exemplo da falha.

Qual mecanismo é preferido?

O mais forte que a situação permitir, como uma regra que torna o erro impossível ou que faz o build falhar.

Detalhes

Descrição original do 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

Popularidade

Estrelas no GitHub
91 mil
Posição no ranking
#1320
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas