principle-encode-lessons-in-structure
하는 일
이 스킬은 AI가 메모에 같은 수정을 반복해서 적지 않도록 안내합니다. 교훈을 린트 규칙, 검사, 또는 이를 강제하는 스크립트로 바꿉니다. 반복되는 실수를 줄이고 싶은 팀을 위한 것입니다.
사용하는 경우
- ✓같은 지침을 두 번 이상 적었을 때.
- ✓리뷰어의 반복되는 수정 요청이 계속 돌아올 때.
- ✓테스트 실패가 자동으로 확인할 수 있는 패턴을 드러낼 때.
스킬 링크
https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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:
- Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?
- If yes, encode it. Delete the instruction
- 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.
댓글
- …
이 저장소의 다른 스킬
handle-pr-comments
91kGitHub 풀 리퀘스트 리뷰 댓글을 하나씩 처리하며, 수정을 제안하고 선택을 적용한 뒤 스레드를 해결하도록 에이전트를 돕습니다.
storybook-startup-benchmark
91kStorybook이 시작되어 첫 스토리를 보여 줄 때까지 걸리는 시간을 측정하고, 공정한 비교를 위해 반복 실행하도록 에이전트를 돕습니다.
storybook-upgrade
91k프로젝트의 모든 Storybook 패키지를 선택한 버전으로, 한 번에 한 메이저 버전씩 업그레이드하는 방법을 에이전트에게 보여 줍니다.
update-pr-description
91k풀 리퀘스트의 제목과 설명이 여전히 코드 변경과 맞는지 확인하고, 정확한 수정을 제안하도록 에이전트를 돕습니다.