poka-yoke
यह क्या करती है
Poka-yoke एक तकनीक है जिससे किसी process या code को गलती-प्रूफ़ बनाया जाता है। लोगों के सब कुछ सही से याद रखने पर भरोसा करने की जगह, system ऐसे डिज़ाइन किया जाता है कि या तो गलती करना नामुमकिन हो, या गलती तुरंत साफ़ दिख जाए।
कब इस्तेमाल करें
- ✓जब आप किसी process या code में गलतियों को होने से रोकना चाहते हैं।
- ✓ऐसे systems डिज़ाइन करते समय जहाँ गलती के गंभीर नतीजे हो सकते हैं (जैसे पैसा, ज़रूरी data)।
- ✓बार-बार होने वाली किसी गलती के बाद, यह पक्का करने के लिए कि वह फिर न हो।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/poka-yoke/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं इस registration form को गलती-प्रूफ़ कैसे बना सकता हूँ ताकि user गलत जानकारी submit न कर सके?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
Poka-yoke 'devices' बनाकर काम करता है जो गलतियों को रोकते हैं। यह कोई खास data type हो सकता है, एक नियम जो तब तक आगे बढ़ने नहीं देता जब तक कुछ गलत है, या गलती के ठीक उसी पल पर एक साफ़ चेतावनी।
तकनीकी सामग्री (मूल 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
…
अक्सर पूछे जाने वाले सवाल
Poka-yoke क्या नहीं है?
Poka-yoke code में कोई comment, किसी document में लिखा निर्देश, या checklist नहीं है। ये चीज़ें इंसान की याददाश्त पर निर्भर रहती हैं और भूली जा सकती हैं। Poka-yoke system के अंदर का एक नियम या ढांचा है।
Poka-yoke के कितने level होते हैं?
तीन level होते हैं: Control (गलती असंभव हो जाती है), Warning (गलती उसी समय बताई जाती है), और Detection (बाद में कोई चीज़ गलती पकड़ लेती है)। सबसे अच्छा हमेशा Control का लक्ष्य रखना है।
Poka-yoke गलतियों को कैसे पहचानता है?
यह तीन तरीकों से काम करता है: Contact (गलत हिस्सा फिट नहीं होगा), Fixed-value (गिनती या सेट गलत है), और Motion-step (steps गलत क्रम में होते हैं या छूट जाते हैं)।
जानकारी
लेखक का मूल विवरण
Mistake-proof code, config and process: make the wrong action impossible or self-announcing rather than documented.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5461
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।