本文へスキップ
Skillpedia
一般的なプログラミング91k · #1320

principle-encode-lessons-in-structure

できること

このスキルは、メモの中で同じ訂正を繰り返さないようAIを導きます。その教訓を、リントルール、チェック、またはそれを強制するスクリプトに変えます。ミスを減らしたいチーム向けです。

使う場面

  • ✓同じ指示が2回以上書き留められているとき。
  • ✓レビュアーからの同じ訂正が繰り返し戻ってくるとき。
  • ✓テストの失敗が、自動的にチェックできるパターンを明らかにしたとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“コードレビューでいつも同じ間違いをしています。そのルールを、もう一度の注意書きではなく、自動チェックに変えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIは、そのルールがリントルール、メタデータのフラグ、実行時チェック、スクリプトで強制できるかを尋ねます。利用可能な最も強い仕組みを優先し、チェックができたら文章のリマインダーを取り除きます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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)
よくある質問

より良いリマインダーを書けばよいのでは?

リマインダーは見落とされやすいのに対し、自動チェックは誰も覚えておかなくてもルールを強制するとスキルは述べています。

ルールに人間の判断が必要な場合は?

指示をより目立たせ、失敗の例を加えるようスキルは述べています。

どの仕組みが好まれますか?

状況が許す中で最も強いもので、例えばその間違いを不可能にする、またはビルドを失敗させるルールです。

詳細

作者による元の説明

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

人気

GitHubのスター
91k
ランキング
#1320
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル