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

poka-yoke

하는 일

포카요케는 절차나 코드가 실수를 원천적으로 막도록 만드는 기법입니다. 사람이 모든 것을 기억해서 올바르게 하도록 의존하는 대신, 실수가 아예 불가능하거나 즉시 드러나도록 시스템을 설계합니다.

사용하는 경우

  • ✓절차나 코드에서 오류가 발생하지 않도록 막고 싶을 때.
  • ✓오류가 심각한 결과(돈, 중요한 데이터)를 낳을 수 있는 시스템을 설계할 때.
  • ✓반복되는 오류 뒤에 같은 실수가 다시 일어나지 않도록 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/poka-yoke/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

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

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/poka-yoke/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분.

작동 방식

포카요케는 오류를 막는 ‘장치’를 만들어 작동합니다. 특정 데이터 형식, 무언가 잘못되면 진행을 막는 규칙, 또는 오류가 생긴 바로 그 순간의 분명한 경고가 될 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Poka-Yoke: Mistake-Proofing for Software

Shigeo Shingo's insight, from the Toyota Production System: people will always make mistakes; that is not the problem worth solving. The problem is letting a mistake become a defect. So you stop trying to make humans more careful and start redesigning the work so the mistake either cannot physically happen or announces itself immediately.

A poka-yoke ("poh-kah yoh-kay", ポカヨケ) is a device: a jig, a shape, a counter: not an instruction. In software: a type, a constraint, a hook, a schema, a state machine. The single most important consequence:

A comment, a docstring, a wiki page, a code review checklist, or a line in CLAUDE.md saying "don't do X" is not a poka-yoke. It is training. Training degrades. A device does not. If your proposed fix relies on someone remembering something, keep going.

When to Use This Skill

  • Use when the user says "poka-yoke this", "mistake-proof it", or "make this harder to get wrong".
  • Use when designing an interface, schema or state machine and the ask is "make invalid states unrepresentable" or "so callers cannot screw it up".
  • Use when auditing existing code for footguns: "what could bite us here", "what is easy to misuse".
  • Use after an incident, when the fix must close the class rather than the case: "make sure this never happens again", "this is the third time".
  • Especially for money, auth, permissions, deletion, migrations and pipelines, where failure is silent.

The two axes

Every real poka-yoke answers two questions. Use both when you classify a hazard or propose a device. They are the difference between this method and generic code review.

Axis 1, Regulatory function: what happens when the mistake occurs?

This is a strict preference ladder. Always reach for the highest rung you can afford.

Rung Name What it does Software examples
1 Control The mistake is impossible. The work cannot proceed. Type won't compile · NOT NULL / CHECK / unique constraint · required function argument · private constructor + smart constructor · PreToolUse hook returns deny · protected branch
2 Warning The mistake is possible but announced at the moment it happens. Lint error in the editor · failing CI gate · runtime assertion that throws · confirmation prompt naming the exact thing being destroyed
3 Detection The mistake ships, and something finds it afterward. Tests · monitoring · alerting · reconciliation job
0 (not a poka-yoke) Relies on a human remembering. Docs · comments · training · "be careful" · review checklists

Shingo's rule: prefer control over warning, always, and only settle for warning when control is genuinely too expensive, then say why out loud. In software the honest reason is usually "the language can't express it" or "it would break every existing caller," and both are worth stating explicitly so the tradeoff is visible.

Axis 2, Setting function: how does the device notice?

Shingo's three detection methods map cleanly onto software. These are your inspection lenses, run all three over any interface and you will find hazards that a general code review misses.

Method Factory floor The question to ask code Software devices
Contact The part physically won't seat unless it's the right shape and orientation Can the wrong thing fit? Distinct types instead of shared primitives · branded/newtype IDs · parse-don't-validate at boundaries · units in the type · discriminated unions instead of bags of optionals
Fixed-value A counter says all 6 screws were fitted Can the wrong count or an incomplete set pass? Exhaustive match/switch over an enum · required fields · "all migrations applied" check · row-count guard on a bulk write · checksums · config validated as a whole at boot
Motion-step A sensor confirms step 3 happened before step 4 Can the steps happen in the wrong order, or be skipped? Typestate · builder that cannot .build() until required steps run · state machines with illegal transitions unrepresentable · idempotency keys · RAII / defer / context managers · transactions

The third principle: inspect at the source

Shingo separated source inspection from informative inspection, which finds the defect

…

자주 묻는 질문

포카요케가 아닌 것은 무엇인가요?

코드의 주석, 문서의 지침, 체크리스트는 포카요케가 아닙니다. 이것들은 사람의 기억에 의존하며 잊힐 수 있습니다. 포카요케는 시스템 자체에 있는 규칙이나 구조입니다.

포카요케의 단계는 무엇인가요?

세 단계가 있습니다. 통제(오류가 불가능하게 함), 경고(오류가 발생하는 순간 알림), 감지(나중에 오류를 찾아냄)입니다. 가장 이상적인 목표는 항상 통제입니다.

포카요케는 오류를 어떻게 알아내나요?

세 가지 방법을 씁니다. 접촉(잘못된 부품은 맞지 않음), 고정값(개수나 집합이 틀림), 동작 순서(단계가 잘못된 순서로 일어나거나 건너뜀)입니다.

상세 정보

작성자의 원본 설명

Mistake-proof code, config and process: make the wrong action impossible or self-announcing rather than documented.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5461
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬