मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग41k · #7027

tdd

यह क्या करती है

यह स्किल एजेंट को पहले टेस्ट लिखकर, फिर उसे पास करने वाला सबसे छोटा कोड लिखकर निर्माण का मार्गदर्शन देती है। यह उन डेवलपर के लिए है जो चाहते हैं कि हर बदलाव कोड से पहले लिखे गए टेस्ट से साबित हो।

कब इस्तेमाल करें

  • ✓जब आप नया व्यवहार एक-एक छोटे कदम में टेस्ट-पहले बनवाना चाहें।
  • ✓जब आप चाहें कि कोई बग पहले ऐसा टेस्ट लिखकर ठीक हो जो उसे दोबारा पैदा करे।
  • ✓जब आप चाहें कि टेस्ट कोड से नहीं, किसी भरोसेमंद स्रोत से लिखे जाएँ।

Skill का लिंक

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/tdd/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/tdd/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारी प्राइसिंग स्पेक के उदाहरणों का इस्तेमाल करके डिस्काउंट नियम को टेस्ट-पहले बनाइए, एक छोटे कदम में।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट तय बिंदु पर अगला टेस्ट लिखता है, पुष्टि करता है कि वह अपेक्षित कारण से फ़ेल होता है, और फिर उसे पास कराने वाला सबसे छोटा बदलाव लिखता है। यह चक्र दोहराया जाता है, और रिफ़ैक्टरिंग को बाद की समीक्षा के चरण के लिए रखा जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

TDD

Red-green in small steps, at seams that were agreed in advance. In a launch run the seam list is C2's approved output; outside launch, agree the seams with the user before the first test exists — a seam nobody approved gets no tests.

The loop

One test → one implementation → repeat:

  1. Write the next test at a seam. Run it. Watch it fail for the reason you expect — a test that cannot fail is not a test.
  2. Implement the smallest change that turns it green.
  3. Repeat. Each test is a tracer bullet: a narrow but complete path through the behavior, not a layer finished in isolation.

Rules

  • Expected values come from an independent source of truth — a spec line, a worked example, a documented output. Never from the implementation under test: a test that asserts what the code happens to do is a mirror, not a check.
  • Substitute at the seam's declared boundary class only — in-process, locally substitutable, owned-remote port, or true-external, the class C2 records for each seam. No substitutes inside the boundary the test is exercising.
  • Refactoring is not part of the loop. It belongs to the review stage; the repair worker owns it. Do not refactor mid-red-green.
  • A bug fix starts with the failing test that reproduces it — reproduction before theory, the debugger's rule.
  • When proposing a seam, say in one line what it catches and what it lets through — a seam choice nobody can price is a guess, not a decision.

When no seam fits

If the behavior cannot be tested at any approved seam, stop and say so: report the missing seam as a finding (it feeds architecture-survey and refit) rather than inventing a seam or testing through internals.

Output

  • The seam list used, with boundary classes and each seam's catch/miss line
  • Red/green evidence — the failing run and the passing run
  • Any seam-absence findings
अक्सर पूछे जाने वाले सवाल

क्या टेस्ट वही लिखते हैं जो कोड करता है?

नहीं। अपेक्षित मान किसी स्वतंत्र स्रोत से आते हैं, जैसे स्पेक या कार्य उदाहरण, न कि परीक्षण किए जा रहे कोड से।

टेस्ट कहाँ लिखे जाने चाहिए?

सिर्फ़ पहले से तय बिंदुओं पर, ताकि ऐसे बिंदु के लिए टेस्ट न लिखा जाए जिसे किसी ने मंज़ूर न किया हो।

रिफ़ैक्टरिंग कब होती है?

लाल-हरे चक्र के भीतर नहीं। वह बाद के समीक्षा चरण में होती है।

जानकारी

लेखक का मूल विवरण

Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values; substitutions only at the seam's boundary class; launch Phase 4 reference.

repo: Yeachan-Heo/oh-my-claudecode

लोकप्रियता

GitHub स्टार
41k
रैंकिंग में स्थान
#7027
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-doc-discipline

41k

यह आपके एजेंट को ऐसे निर्देश लिखना सिखाती है जिन्हें दूसरे AI एजेंट बिना अतिरिक्त समझ के फ़ॉलो कर सकें।

लेखन और डॉक्यूमेंटलेखन

ai-slop-cleaner

41k

यह आपके एजेंट को AI से लिखे गए ऐसे कोड को साफ़ करने में मदद करती है जो चलता है पर फूला हुआ या दोहराव वाला है, बिना उसका व्यवहार बदले।

कोडिंगसामान्य कोडिंग

architecture-survey

41k

यह आपके एजेंट को कोडबेस की संरचना देखकर उन हिस्सों की सूची बनाने में मदद करती है जिन्हें बदलना कठिन होता जा रहा है, सबूत के साथ, बिना खुद कुछ बदले।

कोडिंगसामान्य कोडिंग

ask-navigator

41k

यह आपके एजेंट को एक धुंधले प्रोजेक्ट को साफ़ फ़ैसले वाले सवालों के नक्शे में बदलने में मदद करती है, फिर उन्हें एक-एक करके हल करती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

मिलती-जुलती skills