test-driven-development
यह क्या करती है
यह स्किल AI को टेस्ट-ड्रिवन डेवलपमेंट में मार्गदर्शन देती है: पहले ऐसा टेस्ट लिखना जो समस्या दिखाए, फिर छोटा फ़िक्स करना। यह उन डेवलपर के लिए है जिन्हें यह सबूत चाहिए कि बदलाव काम करता है।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि नया फ़ीचर पहले लिखे गए टेस्ट के साथ बने।
- ✓जब आपको बग ठीक करना है और पहले फ़ेल होने वाले टेस्ट से फ़िक्स साबित करना है।
- ✓जब आप व्यवहार बदल रहे हैं और मौजूदा टेस्ट टूटने से बचाना चाहते हैं।
Skill का लिंक
https://github.com/odysseus-dev/odysseus/blob/dev/resources/skills/general/test-driven-development/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“उस बग को ठीक कीजिए जिसमें खाली सर्च नतीजे पेज को क्रैश करते हैं। पहले फ़ेल होने वाला टेस्ट लिखिए, फिर ठीक कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI मौजूदा कोड और टेस्ट पढ़ता है, अपेक्षित व्यवहार दिखाने वाला सबसे छोटा टेस्ट लिखता है, और पुष्टि करता है कि वह फ़ेल होता है। फिर टेस्ट को पास कराने वाला सबसे छोटा बदलाव करता है और diff की समीक्षा करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
When to Use
Use when implementing a feature, fixing a bug, or changing behavior where a regression test can define the expected result. Prefer this workflow for parser, routing, agent-loop, and UI behavior changes.
Procedure
- Inspect the relevant code, existing tests, and local conventions before editing.
- Write the smallest regression test that demonstrates the requested behavior or reproduces the bug.
- Run that test and confirm it fails for the expected reason, not because the test setup is broken.
- Make the smallest production change that makes the test pass.
- Run the focused test again, then run the surrounding module suite.
- Review the diff for unrelated changes, brittle assertions, hidden state, and missing error paths.
- Report the tests run and any remaining coverage or environment limits.
Pitfalls
- Do not write a test that only mirrors the implementation; assert the user-visible contract.
- Do not weaken an assertion just to make a failing test pass.
- Do not skip the focused failing-test step when the behavior is observable in a local test.
- Keep network, filesystem, and model calls deterministic with fakes or fixtures unless the integration itself is under test.
Verification
- The new regression test fails before the fix and passes after it.
- The relevant focused suite passes.
- The broader suite passes or its failure is explained with evidence.
- The final diff contains the test and the production change needed for the same behavior.
अक्सर पूछे जाने वाले सवाल
टेस्ट पहले फ़ेल क्यों होना चाहिए?
स्किल कहती है कि फ़ेल होने वाला टेस्ट दिखाता है कि टेस्ट सच में व्यवहार जाँचता है, इत्तेफ़ाक से पास नहीं हो रहा।
क्या यह टेस्ट को पास कराने के लिए उसे कमज़ोर कर सकती है?
नहीं। स्किल कहती है कि फ़ेल होने वाले टेस्ट को पास कराने के लिए assertion कमज़ोर न करें।
टेस्ट में नेटवर्क कॉल कैसे संभाले जाते हैं?
स्किल उन्हें fakes या fixtures से अनुमान योग्य रखती है, जब तक कनेक्शन खुद ही परखा न जा रहा हो।
जानकारी
लेखक का मूल विवरण
Build or fix software with a focused red-green-refactor loop
repo: odysseus-dev/odysseus
लोकप्रियता
- GitHub स्टार
- 95k
- रैंकिंग में स्थान
- #1315
- लाइसेंस
- AGPL-3.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
odysseus
95kयह आपके एजेंट को सीमित टोकन के ज़रिए आपके Odysseus डेटा, जैसे टू-डू, ईमेल, कैलेंडर, मेमोरी और दस्तावेज़, पढ़ने और अपडेट करने देती है।
odysseus
95kयह आपके एजेंट को Codex Agent टोकन के ज़रिए आपके Odysseus डेटा, जैसे टू-डू, ईमेल, कैलेंडर, मेमोरी और दस्तावेज़, पढ़ने और अपडेट करने देती है।
artifact-completion
95kयह आपके एजेंट को माँगी गई फ़ाइल या दस्तावेज़ जल्दी बनाने, असली आउटपुट से सुधारने, और पूरा बताने से पहले जाँचने में मदद करती है।
terminal-recovery
95kयह आपके एजेंट को विफल टर्मिनल कमांड से उबरने में मदद करती है: एरर पढ़कर, संभावित कारण खोजकर और एक केंद्रित फ़िक्स आज़माकर।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।