principle-encode-lessons-in-structure
यह क्या करती है
यह स्किल AI को नोट्स में एक ही सुधार बार-बार लिखने से रोकती है। वह सबक को lint नियम, जाँच या स्क्रिप्ट में बदलती है जो उसे लागू करे। यह उन टीमों के लिए है जो दोहराई जाने वाली गलतियाँ कम करना चाहती हैं।
कब इस्तेमाल करें
- ✓जब एक ही निर्देश दो बार या उससे ज़्यादा लिखा जा चुका हो।
- ✓जब समीक्षक का बार-बार लौटने वाला सुधार आता रहता है।
- ✓जब किसी टेस्ट की विफलता एक ऐसा पैटर्न दिखाती है जिसे अपने-आप जाँचा जा सकता है।
Skill का लिंक
https://github.com/storybookjs/storybook/blob/next/.agents/skills/principle-encode-lessons-in-structure/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कोड रिव्यू में हमसे बार-बार एक ही गलती होती है। उस नियम को एक और याद दिलाने के बजाय अपने-आप चलने वाली जाँच बना दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI पूछता है कि क्या नियम को lint नियम, metadata flag, रनटाइम जाँच या स्क्रिप्ट से लागू किया जा सकता है। उपलब्ध सबसे मज़बूत तरीका चुनता है, और जाँच बन जाने के बाद शब्दों वाली याद दिलाहट हटा देता है।
तकनीकी सामग्री (मूल 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)
अक्सर पूछे जाने वाले सवाल
क्या बेहतर याद दिलाहट लिखना काफ़ी नहीं?
स्किल कहती है कि याद दिलाहटें छूट जाती हैं, जबकि अपने-आप चलने वाली जाँच किसी को याद रखे बिना नियम लागू करती है।
अगर किसी नियम में इंसानी फ़ैसला चाहिए तो?
स्किल कहती है कि निर्देश को ज़्यादा प्रमुख बनाएँ और उसके साथ विफलता का एक उदाहरण जोड़ें।
किस तरीके को प्राथमिकता मिलती है?
स्थिति जितना सबसे मज़बूत तरीका अनुमति दे, जैसे ऐसा नियम जो गलती को असंभव बना दे या build फ़ेल कर दे।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
handle-pr-comments
91kयह आपके एजेंट को GitHub pull request की समीक्षा टिप्पणियाँ एक-एक करके निपटाने में मदद करती है: फ़िक्स सुझाकर, आपका चुनाव लागू करके, और थ्रेड बंद करके।
storybook-startup-benchmark
91kयह आपके एजेंट को Storybook के शुरू होने और पहली स्टोरी दिखने में लगने वाला समय मापने में मदद करती है, निष्पक्ष तुलना के लिए दोहराए गए रन के साथ।
storybook-upgrade
91kयह आपके एजेंट को प्रोजेक्ट के सभी Storybook पैकेज चुने गए वर्शन तक अपग्रेड करना दिखाती है, एक बार में एक मेजर वर्शन।
update-pr-description
91kयह आपके एजेंट को जाँचने में मदद करती है कि pull request का शीर्षक और विवरण अभी भी कोड बदलावों से मेल खाते हैं या नहीं, फिर सटीक अपडेट सुझाते हुए।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।