TDD Green Phase - Make Tests Pass Quickly
TDD Green Phase - Make Tests Pass Quickly是一款code方向的AI技能,核心价值是Implement minimal code to satisfy GitHub issue requirements and make failing tests pass without over-engineering,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Implement minimal code to satisfy GitHub issue requirements and make failing tests pass without over-engineering.
mkdir -p ./skills/tdd-green && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/tdd-green/SKILL.md -o ./skills/tdd-green/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# TDD Green Phase - Make Tests Pass Quickly
Write the minimal code necessary to satisfy GitHub issue requirements and make failing tests pass. Resist the urge to write more than required.
GitHub Issue Integration
Issue-Driven Implementation
- **Reference issue context** - Keep GitHub issue requirements in focus during implementation
- **Validate against acceptance criteria** - Ensure implementation meets issue definition of done
- **Track progress** - Update issue with implementation progress and blockers
- **Stay in scope** - Implement only what's required by current issue, avoid scope creep
Implementation Boundaries
- **Issue scope only** - Don't implement features not mentioned in the current issue
- **Future-proofing later** - Defer enhancements mentioned in issue comments for future iterations
- **Minimum viable solution** - Focus on core requirements from issue description
Core Principles
Minimal Implementation
- **Just enough code** - Implement only what's needed to satisfy issue requirements and make tests pass
- **Fake it till you make it** - Start with hard-coded returns based on issue examples, then generalise
- **Obvious implementation** - When the solution is clear from issue, implement it directly
- **Triangulation** - Add more tests based on issue scenarios to force generalisation
Speed Over Perfection
- **Green bar quickly** - Prioritise making tests pass over code quality
- **Ignore code smells temporarily** - Duplication and poor design will be addressed in refactor phase
- **Simple solutions first** - Choose the most straightforward implementation path from issue context
- **Defer complexity** - Don't anticipate requirements beyond current issue scope
Implementation Strategies (Polyglot)
- **Start with constants** - Return hard-coded values from issue examples initially
- **Progress to conditionals** - Add if/else logic as more issue scenarios are tested
- **Extract to methods/functions** - Create simple helpers when duplication emerges
- **Use basic collections** - Simple arrays, lists, or maps over complex data structures
Execution Guidelines
1. **Review issue requirements** - Confirm implementation aligns with GitHub issue acceptance criteria
2. **Run the failing test** - Confirm exactly what needs to be implemented
3. **Confirm your plan with the user** - Ensure understanding of requirements and edge cases. NEVER start making changes without user confirmation
4. **Write minimal code** - Add just enough to satisfy issue requirements and make test pass
5. **Run all tests** - Ensure new code doesn't break existing functionality
6. **Do not modify the test** - Ideally the test should not need to change in the Green phase.
7. **Update issue progress** - Comment on implementation status if needed
Green Phase Checklist
- [ ] Implementation aligns with GitHub issue requirements
- [ ] All tests are passing (green bar)
- [ ] No more code written than necessary for issue scope
- [ ] Existing tests remain unbroken
- [ ] Implementation is simple and direct
- [ ] Issue acceptance criteria satisfied
- [ ] Ready for refactoring phase
🎯 Best For
- QA engineers
- Developers writing unit tests
- UI designers
- Product designers
- Claude users
💡 Use Cases
- Generating test cases for edge conditions
- Writing integration test suites
- Generating component mockups
- Creating design system tokens
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply TDD Green Phase - Make Tests Pass Quickly to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does this generate test mocks?
Many testing skills include mock generation. Check the install command and skill content for details.
Does this work with Figma?
Some design skills integrate with Figma plugins. Check the Works With section for supported tools.
Is TDD Green Phase - Make Tests Pass Quickly compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for TDD Green Phase - Make Tests Pass Quickly?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install TDD Green Phase - Make Tests Pass Quickly?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/tdd-green/SKILL.md, ready to use.
⚠️ Common Mistakes to Avoid
Not testing edge cases
AI tends to generate happy-path tests. Manually review for boundary conditions.
Skipping usability testing
AI-generated designs should be validated with real users before development.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.