Back to Skill Hub
Download Skill Package

System Prompt / Instructions

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

  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.

Frequently Asked Questions

What is tdd-workflows-tdd-green?

tdd-workflows-tdd-green is an expert AI persona designed to improve your coding workflow. Implement the minimal code needed to make failing tests pass in the TDD green phase. It provides senior-level context directly within your IDE.

How do I install the tdd-workflows-tdd-green skill in Cursor or Windsurf?

To install the tdd-workflows-tdd-green skill, download the package, extract the files to your project's .cursor/skills directory, and type @tdd-workflows-tdd-green in your editor chat to activate the expert instructions.

Is tdd-workflows-tdd-green free to download?

Yes, the tdd-workflows-tdd-green AI persona is completely free to download and integrate into compatible Agentic IDEs like Cursor, Windsurf, Github Copilot, and Anthropic MCP servers.

@

tdd-workflows-tdd-green

Implement the minimal code needed to make failing tests pass in the TDD green phase.

Download Skill Package

IDE Invocation

@tdd-workflows-tdd-green
COPY

Platform

IDE Native

Price

Free Download

Setup Instructions

Cursor & Windsurf

  1. Download the zip file above.
  2. Extract to .cursor/skills
  3. Type @tdd-workflows-tdd-green in editor chat.

Copilot & ChatGPT

Copy the instructions from the panel on the left and paste them into your custom instructions setting.

"Adding this tdd-workflows-tdd-green persona to my Cursor workspace completely changed the quality of code my AI generates. Saves me hours every week."

A
Alex Dev
Senior Engineer, TechCorp