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

tdd-workflows-tdd-green

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

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

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

  • ✓जब कोई कोड टेस्ट फेल हो जाए और आपको उसे जल्दी ठीक करना हो।
  • ✓जब कोई नया फीचर शुरू कर रहे हों और पहला कदम टेस्ट को पास करना हो।
  • ✓सिर्फ ज़रूरी चीज़ें लागू करने के लिए, ताकि कोड उम्मीद के मुताबिक काम करे।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-green/SKILL.md

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

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

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

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

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

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

“मेरा प्रोडक्ट लिस्ट वाला टेस्ट फेल हो रहा है, उसे पास करने के लिए सबसे कम कोड बनाओ।”

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

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

यह टूल सबसे छोटा कोड बदलाव खोजता है जो एक टूटे हुए टेस्ट को पूरा करे। यह यह छोटा सुधार लागू करता है और जाँचता है कि टेस्ट अब पास हो रहा है या नहीं, बिना अनावश्यक जटिलता जोड़े।

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

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

Green Phase: Simple function

def product_list(request): products = Product.objects.all() return JsonResponse({'products': list(products.values())})

Refactor: Class-based view

class ProductListView(View): def get(self, request): products = Product.objects.all() return JsonResponse({'products': list(products.values())})

Refactor: Generic view

class ProductListView(ListView): model = Product context_object_name = 'products'


### Express Patterns

**Inline → Middleware → Service Layer:**
```javascript
// Green Phase: Inline logic
app.post('/api/users', (req, res) => {
  const user = { id: Date.now(), ...req.body };
  users.push(user);
  res.json(user);
});

// Refactor: Extract middleware
app.post('/api/users', validateUser, (req, res) => {
  const user = userService.create(req.body);
  res.json(user);
});

// Refactor: Full layering
app.post('/api/users',
  validateUser,
  asyncHandler(userController.create)
);

Use this skill when

  • Moving from red to green in a TDD cycle
  • Implementing minimal behavior to satisfy tests
  • You want to keep implementation intentionally simple

Do not use this skill when

  • You are refactoring for design or performance
  • Tests are already passing and you need new requirements
  • You need a full architectural redesign

Instructions

  1. Review failing tests and identify the smallest fix.
  2. Implement the minimal change to pass the next test.
  3. Run tests after each change to confirm progress.
  4. Record shortcuts or debt for the refactor phase.

Safety

  • Avoid bypassing tests to make them pass.
  • Keep changes scoped to the failing behavior only.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
अक्सर पूछे जाने वाले सवाल

TDD में 'ग्रीन फेज़' का क्या मतलब है?

TDD (Test-Driven Development) में 'ग्रीन फेज़' वह समय है जब सभी कोड टेस्ट पास हो रहे होते हैं।

सबसे कम कोड लिखना क्यों ज़रूरी है?

कम कोड लिखने से अनावश्यक जटिलता से बचाव होता है। आप ठीक उसी समस्या को हल करते हैं जिस ओर टेस्ट इशारा करता है, जिससे आगे कोड संभालना आसान होता है।

इस टूल का इस्तेमाल कब बंद करूँ?

जब टेस्ट पास हो जाएँ और आपको नए फीचर जोड़ने हों, या जब आपका लक्ष्य सिर्फ टेस्ट ठीक करने के बजाय पूरे कोड का डिज़ाइन सुधारना हो, तब इसका इस्तेमाल रोक दें।

जानकारी

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

Implement the minimal code needed to make failing tests pass in the TDD green phase.

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#5935
लाइसेंस
MIT
अपडेट की गई
15/10/2026

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

0

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

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

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

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