red-green-proof
यह क्या करती है
यह स्किल एजेंट से बग सुधार की पुष्टि सबूत के साथ करवाती है, यह मानकर नहीं कि वह काम करता है। यह उन डेवलपर्स के लिए है जिन्हें ऐसा रिग्रेशन टेस्ट चाहिए जो सचमुच बग पकड़े, न कि दोनों तरह से पास हो जाए।
कब इस्तेमाल करें
- ✓जब आप कोई बग ठीक कर रहे हों और सबूत चाहते हों कि सुधार काम करता है।
- ✓जब पुल रिक्वेस्ट में रिग्रेशन टेस्ट जुड़ा हो पर फ़ेल होने वाला रन दर्ज न हो।
- ✓जब कोई टेस्ट पास होता लगे, जबकि बग अब भी मौजूद हो सकता है।
Skill का लिंक
https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/skills/red-green-proof/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“साबित कीजिए कि यह लॉगिन बग सचमुच ठीक हो गया है, एक ऐसा टेस्ट लिखकर जो पहले फ़ेल हो और सुधार के बाद पास हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट बग का कारण पक्का करता है, ऐसा टेस्ट लिखता है जो मौजूदा कोड पर फ़ेल हो, और सबसे छोटा सुधार लागू करता है। फिर वह सुधार हटाकर जाँचता है कि टेस्ट दोबारा फ़ेल होता है, जिससे पता चलता है कि टेस्ट सचमुच उसी सुधार पर निर्भर है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Red-Green-Proof
A bug is not fixed because the tests pass. A bug is fixed when a test fails without your fix and passes with it, and you have watched it do both.
Overview
Use this skill when a bug, incident, flaky test, or unproven regression test is under investigation. It applies a strict red-green-red loop: establish the cause, observe a focused test fail, make the smallest fix, then remove the fix and observe the test fail again. The final revert is the proof that the test is actually coupled to the defect.
Workflow
Keep evidence for each phase separate. A test command that exits zero is not evidence that it exercised the defect; record the assertion and the observed failure or success. Do not proceed when the current phase is unobserved.
Before changing code, identify the exact test command and expected red signal. After the fix, run that same command without changing its assertions. During the revert, use the same command again and preserve the failure output. Restore the fix before running the broader suite.
Proactive Triggers
- A pull request adds a regression test but no pre-fix failure is recorded → ask for the red run before calling it coverage.
- A bug fix changes production code and tests in one step → verify the test fails against the parent revision or label the evidence as missing.
- A test uses only mocks or call-count assertions → ask for the observable user-facing consequence.
- A test is described as flaky → preserve the failing seed, timing, or interleaving before attempting a stabilization fix.
Output Format
Report each investigation with: (1) target and cause, labeled Proven,
Inferred, or Unknown; (2) the red command and actual failure before the
fix; (3) green and revert-red results with actual output; and (4) final suite
status and remaining uncertainty.
Most "regression tests" written after a fix never had the chance to fail. They are decoration. This skill is the discipline that separates a real test from a decorative one.
Picking the target
With an argument, that is the target: /red-green-proof the status endpoint reports finished runs as running.
With no argument, take the target from the conversation. The usual case is that you have just spent a long stretch investigating something — the bug is already on screen. Do not ask what to work on. Scan back through the session and pick, in this order:
- A defect just identified but not yet fixed.
- A fix applied without a failing test to back it — the most valuable target, because the test still has to be proven load-bearing.
- A test written but never verified red.
- Something described as "still open", "not fixed yet", or "characterization only".
State your pick in one line and start:
Target: the buffer discards events when the flush write fails (
checkpointBuffer.ts:271). Verifying before writing the test.
Only ask the user if two or more candidates are genuinely equal in priority — then list them as a short numbered choice and stop. If several related defects came up, handle them one at a time through the full loop rather than batching; each needs its own red.
If nothing in the conversation qualifies, say so and ask for a target rather than inventing one.
The loop
Run these in order. Do not skip 1, and never skip 4.
1. Verify the cause. Do not infer it.
Before you write a line of test code, establish what actually happened using evidence you can point at: the real record from the database or API, the real log line, the actual source of the function you are blaming.
Say which of these you have:
- Proven — I read the value / ran the code / pulled the record.
- Inferred — consistent with the evidence, but I have not confirmed it.
- Unknown — I cannot determine this from what is available.
State the label out loud. If the honest answer is Unknown, say so and name the one artifact that would settle it. A confident wrong cause costs more than an admitted gap, because it sends the fix to the wrong place.
Two traps worth naming:
- A plausible mechanism is not the mechanism. Rank candidates, then go rule them out one at a time by reading code, not by reasoning about it.
- Check whether the "bug" was deliberate.
git log -S '<the exact line>'and read the commit. If a test already asserts the current behaviour, someone may have wanted it. Understand why before you invert it.
2. Write the test. Watch it fail.
The test must fail **against
अक्सर पूछे जाने वाले सवाल
आखिर में सुधार हटाना क्यों ज़रूरी है?
जो टेस्ट सुधार के साथ और उसके बिना दोनों तरह से पास हो, वह कुछ साबित नहीं करता, इसलिए वापसी का कदम पुष्टि करता है कि टेस्ट सचमुच सुधार पर निर्भर है।
क्या पास होने वाला टेस्ट सबूत माना जाता है?
अपने-आप नहीं। स्किल हर चरण के लिए असली फ़ेल और पास होने का आउटपुट दर्ज करना ज़रूरी मानती है।
क्या इसके लिए बग का स्पष्ट विवरण चाहिए?
अगर इसे डीबगिंग चैट के तुरंत बाद इस्तेमाल किया जाए, तो यह उस बातचीत से लक्ष्य ले लेती है।
जानकारी
लेखक का मूल विवरण
Turns a suspected bug into a proven one. Verify the cause against reality before claiming it, write a test that FAILS on the current code, apply the fix, watch it pass — then revert the fix and confirm the test goes red again, because a test that passes both ways proves nothing. Invoked bare after a debugging conversation, it takes the target from context rather than asking. Use when fixing a bug, investigating an incident, hardening a flaky area, or when asked to "add tests that reveal the bug". Triggers on "/red-green-proof", "prove the bug", "red-green", "make the test fail first", "is that
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9503
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agent-launcher-orchestrator
29kआपके एजेंट को एक साफ़ लक्ष्य से शुरू करके, अपने खाते में Claude मैनेज्ड एजेंट की योजना बनाने, बनाने, जांचने और शेड्यूल करने में चरण-दर-चरण मदद करती है।
grade-iterate
29kआपके एजेंट को किसी मैनेज्ड AI एजेंट के काम को रूब्रिक से आंकने और तय संख्या के दौरों में सुधारने देती है, ताकि वह कभी अनंत चक्र में न फंसे।
interview
29kआपके एजेंट को AI एजेंट के विचार पर आपसे इंटरव्यू लेने और कुछ भी लॉन्च होने से पहले आपके जवाबों को सरल निर्माण योजना में बदलने देती है।
run-without-you
29kआपके एजेंट को मैनेज्ड AI एजेंट शेड्यूल पर या किसी घटना पर चलाने में मदद करती है, लॉन्च से पहले cron समय की जांच के साथ।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।