tdd-red-green-refactor — community tdd-red-green-refactor, support, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Agile Development Agents requiring test-driven development capabilities with red-green-refactor workflow. 🤖 an AI agent for the support desk at Badass Courses

skillrecordings skillrecordings
[0]
[0]
Updated: 3/2/2026

Agent Capability Analysis

The tdd-red-green-refactor skill by skillrecordings is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Agile Development Agents requiring test-driven development capabilities with red-green-refactor workflow.

Core Value

Empowers agents to implement robust testing frameworks, utilizing failing tests to drive minimal code changes, and refactoring for clarity and structure, all while maintaining passing tests through protocols like TDD and frameworks such as unittest or pytest.

Capabilities Granted for tdd-red-green-refactor

Implementing test-driven development for new features
Refactoring legacy code with test coverage
Debugging existing tests to ensure correct functionality

! Prerequisites & Limits

  • Requires existing test harness or framework
  • Dependent on specific programming language support for TDD
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

tdd-red-green-refactor

Install tdd-red-green-refactor, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

TDD Red / Green / Refactor

Use this skill whenever making code changes that should be covered by tests.

Non-negotiables

  • Start with a failing test that expresses the behavior (red).
  • Implement the smallest change to pass (green).
  • Refactor for clarity/structure after green, keeping tests passing.
  • If no tests exist, add a minimal test harness + a failing test first.

Workflow

  1. Identify the smallest observable behavior.
  2. Add or update a test to fail on current code.
  3. Run the smallest relevant test command (targeted if possible).
  4. Implement the minimal code to make it pass.
  5. Refactor with tests still green.
  6. Report: test command(s) run + results.

If tests cannot run

  • State why (missing deps, env, credentials, etc.).
  • Still write the failing test first and note the expected outcome.
  • Provide a suggested test command for the user to run.

Test targeting

Prefer the narrowest scope:

  • single file
  • package-level
  • repo-level only if needed

Typecheck policy

Types always pass. Do not blame pre-existing errors. Fix or revert.

WE USE VITEST - NOT BUN:TEST

This is non-negotiable. Never use bun:test imports or APIs.

typescript
1// ✅ CORRECT - Vitest 2import { describe, it, expect, vi, beforeEach } from 'vitest' 3 4// ❌ WRONG - bun:test (DO NOT USE) 5import { describe, it, expect, mock } from 'bun:test'

Test commands

bash
1# All tests via Turborepo 2bun run test 3 4# Filtered by package 5bun run test --filter=@skillrecordings/core 6bun run test --filter=web 7 8# Direct Vitest (when you need fine-grained control) 9bun run test:all 10bun run test:all -- -t "name of test" 11bun run test:all -- packages/core/src/tools/process-refund.test.ts

Common Vitest patterns

typescript
1// Mocking 2const mockFn = vi.fn() 3vi.mocked(someModule).someMethod.mockResolvedValue(result) 4 5// Hoisting mocks (required for factory functions) 6const mockClient = vi.hoisted(() => ({ method: vi.fn() })) 7vi.mock('./client', () => ({ client: mockClient })) 8 9// Spying 10vi.spyOn(object, 'method').mockImplementation(...)

Notes to include in the response

  • Which test you wrote first.
  • The command used to hit red and green.
  • Any refactor that changed structure but not behavior.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is tdd-red-green-refactor?

Perfect for Agile Development Agents requiring test-driven development capabilities with red-green-refactor workflow. 🤖 an AI agent for the support desk at Badass Courses

How do I install tdd-red-green-refactor?

Run the command: npx killer-skills add skillrecordings/support/tdd-red-green-refactor. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for tdd-red-green-refactor?

Key use cases include: Implementing test-driven development for new features, Refactoring legacy code with test coverage, Debugging existing tests to ensure correct functionality.

Which IDEs are compatible with tdd-red-green-refactor?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for tdd-red-green-refactor?

Requires existing test harness or framework. Dependent on specific programming language support for TDD.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add skillrecordings/support/tdd-red-green-refactor. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use tdd-red-green-refactor immediately in the current project.

Related Skills

Looking for an alternative to tdd-red-green-refactor or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI