tdd-workflow

Guide Go and TypeScript projects through the RED-GREEN-REFACTOR TDD cycle.

1|Updated Dec 22, 2017
One-click install
npx skills add https://github.com/coreyhulen/enviroment --skill tdd-workflow-coreyhulen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/coreyhulen/enviroment/tree/main/claude-init/skills/tdd-workflow
Command: npx skills add https://github.com/coreyhulen/enviroment --skill tdd-workflow-coreyhulen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing robust and well-tested code by enforcing the Test-Driven Development (TDD) methodology, ensuring features are built correctly and bugs are caught early.

Core Features & Use Cases

  • RED-GREEN-REFACTOR Cycle: Guides users through writing failing tests first, then minimal code to pass, followed by refactoring.
  • Language-Specific Examples: Provides concrete examples for both Go and TypeScript testing patterns.
  • Workflow Commands: Includes practical commands for running tests in different modes.
  • Use Case: When developing a new API endpoint in Go, use this Skill to write a failing test for the expected response, implement the minimal code to make it pass, and then refactor the code while ensuring tests remain green.

Quick Start

Use the tdd-workflow skill to implement a new feature by writing a failing test first.

Frequently Asked Questions about tdd-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a Test-Driven Development workflow for Go and TypeScript projects?

To implement Test-Driven Development, use this Skill to guide you through the RED-GREEN-REFACTOR cycle for writing failing tests first, then minimal passing code, and finally refactoring. It provides concrete patterns for both Go and TypeScript projects.

What is the RED-GREEN-REFACTOR cycle and how does it apply to feature implementation?

The RED-GREEN-REFACTOR cycle is a Test-Driven Development technique where you write a failing test first, implement the minimal code required to make it pass, and then refactor the code while ensuring tests remain green. This Skill enforces this workflow for robust feature implementation.

Can I use table-driven tests and Arrange-Act-Assert patterns with this TDD workflow?

Yes, you can use these testing patterns with this TDD workflow. The Skill specifically supports table-driven tests and subtests in Go, alongside Arrange-Act-Assert and async testing patterns in TypeScript to validate feature implementation and bug fixes.

How do I fix a bug using a TDD workflow in my existing codebase?

To fix a bug using a TDD workflow, you write a failing test that reproduces the specific bug, implement the minimal code fix to make the test pass, and then refactor safely. This Skill guides developers through these exact steps to catch bugs early.

Does this TDD workflow require any specific testing dependencies or frameworks?

No, this TDD workflow does not require any specific dependencies or frameworks. It provides workflow commands for running tests in different modes and focuses on the methodology and testing patterns for Go and TypeScript rather than relying on external libraries.

When should I use a TDD workflow instead of writing tests after implementation?

You should use a TDD workflow when you need to ensure features are built correctly and bugs are caught early during development. By enforcing the RED-GREEN-REFACTOR cycle, it streamlines writing robust code compared to adding tests after implementation.