test-fixing
यह क्या करती है
यह स्किल आपके एजेंट को प्रोजेक्ट का टेस्ट सूट चलवाती है, फ़ेल होने वाले टेस्ट को मिलते-जुलते कारणों के समूह में बाँटती है, और सबसे बड़े समूह पहले ठीक करती है। यह उन डेवलपर्स के लिए है जिनके टेस्ट फ़ेल हो रहे हैं।
कब इस्तेमाल करें
- ✓जब आपका टेस्ट सूट फ़ेल हो और आप चाहते हैं कि एजेंट समस्याएँ ढूँढकर ठीक करे।
- ✓जब Continuous Integration जाँच टेस्ट की वजह से फ़ेल हो जाए।
- ✓जब आप फ़ीचर पूरा करके मर्ज से पहले सारे टेस्ट पास देखना चाहते हैं।
Skill का लिंक
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/test-fixing/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“रीफ़ैक्टर के बाद मेरे टेस्ट फ़ेल होने लगे हैं। कृपया उन्हें ठीक कीजिए ताकि सूट पास हो जाए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट टेस्ट चलाता है, फ़ेल होने वाले टेस्ट को एरर के प्रकार, मॉड्यूल या मूल कारण के अनुसार समूहित करता है, फिर कोड पढ़कर छोटे और केंद्रित सुधार करता है, और हर समूह को दोबारा चलाकर पक्का करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Test Fixing
Systematically identify and fix all failing tests using smart grouping strategies.
When to Use
- Explicitly asks to fix tests ("fix these tests", "make tests pass")
- Reports test failures ("tests are failing", "test suite is broken")
- Completes implementation and wants tests passing
- Mentions CI/CD failures due to tests
Systematic Approach
1. Initial Test Run
Run make test to identify all failing tests.
Analyze output for:
- Total number of failures
- Error types and patterns
- Affected modules/files
2. Smart Error Grouping
Group similar failures by:
- Error type: ImportError, AttributeError, AssertionError, etc.
- Module/file: Same file causing multiple test failure
- Root cause: Missing dependencies, API changes, refactoring impacts
Prioritize groups by:
- Number of affected tests (highest impact first)
- Dependency order (fix infrastructure before functionality)
3. Systematic Fixing Process
For each group (starting with highest impact):
Identify root cause
- Read relevant code
- Check recent changes with
git diff - Understand the error pattern
Implement fix
- Use Edit tool for code changes
- Follow project conventions (see CLAUDE.md)
- Make minimal, focused changes
Verify fix
- Run subset of tests for this group
- Use pytest markers or file patterns:
uv run pytest tests/path/to/test_file.py -v uv run pytest -k "pattern" -v - Ensure group passes before moving on
Move to next group
4. Fix Order Strategy
Infrastructure first:
- Import errors
- Missing dependencies
- Configuration issues
Then API changes:
- Function signature changes
- Module reorganization
- Renamed variables/functions
Finally, logic issues:
- Assertion failures
- Business logic bugs
- Edge case handling
5. Final Verification
After all groups fixed:
- Run complete test suite:
make test - Verify no regressions
- Check test coverage remains intact
Best Practices
- Fix one group at a time
- Run focused tests after each fix
- Use
git diffto understand recent changes - Look for patterns in failures
- Don't move to next group until current passes
- Keep changes minimal and focused
Example Workflow
User: "The tests are failing after my refactor"
- Run
make test→ 15 failures identified - Group errors:
- 8 ImportErrors (module renamed)
- 5 AttributeErrors (function signature changed)
- 2 AssertionErrors (logic bugs)
- Fix ImportErrors first → Run subset → Verify
- Fix AttributeErrors → Run subset → Verify
- Fix AssertionErrors → Run subset → Verify
- Run full suite → All pass ✓
अक्सर पूछे जाने वाले सवाल
क्या यह मेरे टेस्ट बदलती है या मेरा कोड?
कारण के हिसाब से यह दोनों बदल सकती है, और इसे न्यूनतम, केंद्रित बदलाव करने के लिए कहा गया है।
यह तय कैसे करती है कि पहले क्या ठीक करना है?
यह सबसे ज़्यादा टेस्ट प्रभावित करने वाले समूह से शुरू करती है, और फ़ीचर की समस्याओं से पहले साझा सेटअप की समस्याएँ ठीक करती है।
क्या इसके लिए कोई खास कमांड चाहिए?
यह make test से शुरू करती है, इसलिए यह तब सबसे अच्छा काम करती है जब आपके प्रोजेक्ट में वह कमांड हो।
जानकारी
लेखक का मूल विवरण
Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.
लोकप्रियता
- GitHub स्टार
- 33k
- रैंकिंग में स्थान
- #8807
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
owasp-security
33kआपके एजेंट को वेब ऐप, API, मोबाइल, कंटेनर और AI एजेंट्स के लिए OWASP सुरक्षा मार्गदर्शन सिखाती है, ताकि वह आम कमज़ोरियाँ पहचान सके और सुधार सुझा सके।
agent-management
33kआपके एजेंट को AI Maestro कमांड-लाइन से AI एजेंट बनाने, सूची देखने, hibernate और wake करने, नाम बदलने और हटाने देती है, हर एजेंट के जीवन-चक्र को संभालते हुए।
agent-messaging
33kAgent Messaging Protocol का उपयोग करके AI एजेंट्स के बीच हस्ताक्षरित संदेश भेजने, प्राप्त करने और उनका जवाब देने देती है, ज़्यादातर आपकी अपनी मशीन पर।
docs-search
33kआपके एजेंट को फ़ंक्शन सिग्नेचर, क्लास परिभाषा और कमेंट के लिए ऑटो-जनरेटेड कोड डॉक्यूमेंटेशन खोजने देती है, ताकि कोड बदलने से पहले वह असली API जाँच सके।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।