본문으로 건너뛰기
Skillpedia
일반 코딩91k · #1320

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 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

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬