Agent skill · software engineering · aiskillstore
tdd-workflows-tdd-green
Implement the minimal code needed to make failing tests pass in the TDD green phase.
Why this skill is useful
Codifies a specific TDD workflow for implementing minimal code to pass tests, which the AI could infer but now doesn't have to guess.
What it needs
About 1k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Green Phase: Simple function def productlist(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 contextobjectname = 'products' 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.
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/tdd-workflows-tdd-green--18ad55