tdd-workflows-tdd-green
Helps your agent write the minimum code to make failing tests pass. This is done in the 'green' phase of TDD.
What it does
This tool helps write the minimum code needed to make a failing test pass. It focuses on solving the immediate problem so tests start working again.
When to use it
- ✓When a code test fails and you need to fix it quickly.
- ✓When starting a new feature and the first step is to make a test pass.
- ✓To implement only the essentials so the code works as expected.
Example of what to ask your AI
“My product list test is failing, generate the minimal code to make it pass.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool analyzes the smallest code change that satisfies a broken test. It implements this small fix and checks if the test now passes, without adding unnecessary complexity.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill tdd-workflows-tdd-greenOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-green/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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
- Review failing tests and identify the smallest fix.
- Implement the minimal change to pass the next test.
- Run tests after each change to confirm progress.
- 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.mdfor 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.
FAQ
What does 'green phase' mean in TDD?
In TDD (Test-Driven Development), the 'green phase' is when all code tests are passing.
Why is it important to write minimal code?
Writing minimal code avoids unnecessary complexity and ensures you are solving the exact problem the test points to, making future maintenance easier.
When should I stop using this tool?
You should stop when tests are passing and you need to add new features, or if the goal is to improve the overall code design rather than just fixing a test.
Details
Original description by the author
Implement the minimal code needed to make failing tests pass in the TDD green phase.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4321
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
cpp-testing
Makes your agent write and improve tests for C++ code. It helps set up testing tools and fix errors.
affaan-m/ECC
csharp-testing
Helps your agent create tests for C# and .NET code. It uses best practices to ensure tests are efficient and reliable.
affaan-m/ECC
django-tdd
Enables your agent to apply testing strategies for Django with pytest-django and TDD. It's useful for writing robust tests and ensuring code quality, especially for DRF APIs.
affaan-m/ECC