BeClaude

tdg

New
62Community RegistryGeneralby Chanwit Kaewkasi

First seen 6/21/2026

Summary

TDG (Test-Driven Generation) brings structured Test-Driven Development workflows to Claude Code, guiding you through the Red-Green-Refactor cycle for systematic code generation.

  • It helps you write tests before implementation, maintain high test coverage, and create atomic, well-organized commits with full traceability via issue numbers.

Overview

A Claude Code plugin that brings Test-Driven Development workflows to AI-assisted coding, following the Red-Green-Refactor cycle for systematic code generation.

About

TDG (Test-Driven Generation) enhances Claude Code with structured workflows for test-driven development. It helps you:

  • Follow the Red-Green-Refactor TDD cycle systematically
  • Write tests before implementation
  • Maintain high test coverage
  • Create atomic, well-organized commits
  • Track work with issue numbers for full traceability

Installation

bash
# Add the TDG marketplace
claude plugin marketplace add chanwit/tdg

# Install the plugin
claude plugin install tdg

Components

Commands

  • /tdg:init - Initialize TDG configuration for your project (detects language, framework, test commands)
  • /tdg:version - Show the current TDG plugin version
  • /tdg:atomic-commit - Create clean, atomic commits by analyzing and organizing your changes

Skills

  • TDG (Test-Driven Generation) - Complete TDD workflow following Red-Green-Refactor cycles

- Automatically detects current phase (red/green/refactor) - Guides you through writing tests first - Ensures commits follow TDD conventions - Requires issue number for traceability

  • Atomic Commit - Create clean, atomic commits for non-TDD workflows

- Analyzes changes and detects mixed concerns - Groups related changes into logical commits - Ensures each commit is a complete unit of work - Validates tests pass before committing

Hooks

  • Automation hooks (coming soon)

Usage

Getting Started

  1. Initialize TDG in your project:
bash
/tdg:init
  1. Use the TDG skill for test-driven development:
code
Use TDG to implement user authentication
  1. For organizing existing changes, use the Atomic Commit skill:
code
Create atomic commits for my changes

TDG Workflow

The TDG skill follows a strict Red-Green-Refactor cycle:

  1. Red Phase - Write failing tests

- Commits prefixed with red: test spec for ... - Include issue number: red: test spec for user login (#42)

  1. Green Phase - Implement code to pass tests

- Commits prefixed with green: ... - Example: green: implement user login (#42)

  1. Refactor Phase - Optimize and clean up

- Commits prefixed with refactor: ... - Example: refactor: extract auth service (#42)

Author

Chanwit Kaewkasi

License

MIT

Links

  • Repository: https://github.com/chanwit/tdg

Install & Usage

1
Add a marketplace
/plugin marketplace add <org/repo>
2
Install the plugin

Add the configuration to /plugin install tdg@<marketplace>

3
Manage with /plugin
/plugin

Use Cases

Initialize TDG configuration for a new project, automatically detecting the language, framework, and test commands.
Follow the Red-Green-Refactor cycle to write a failing test first, then implement the minimum code to pass it, and finally refactor safely.
Create clean, atomic commits that group related changes into logical units and validate tests pass before committing.
Track work with issue numbers for full traceability across all TDD cycles and commits.
Use the Atomic Commit skill for non-TDD workflows to analyze changes, detect mixed concerns, and create well-organized commits.
Check the current TDG plugin version to ensure you're using the latest features.

Usage Examples

1

/tdg:init

2

/tdg:atomic-commit

3

Start a new TDD cycle for issue #42: write a test for the user login function.

View source on GitHub

Security Audits

LicenseUnknownSourceWarnRepositoryPass

Frequently Asked Questions

What is tdg?

TDG (Test-Driven Generation) brings structured Test-Driven Development workflows to Claude Code, guiding you through the Red-Green-Refactor cycle for systematic code generation. It helps you write tests before implementation, maintain high test coverage, and create atomic, well-organized commits with full traceability via issue numbers.

How to install tdg?

To install tdg: add a marketplace (/plugin marketplace add <org/repo>), then add the config to /plugin install tdg@<marketplace>. Finally, /plugin in Claude Code.

What is tdg best for?

tdg is a plugin categorized under General. Created by Chanwit Kaewkasi.

What can I use tdg for?

tdg is useful for: Initialize TDG configuration for a new project, automatically detecting the language, framework, and test commands.; Follow the Red-Green-Refactor cycle to write a failing test first, then implement the minimum code to pass it, and finally refactor safely.; Create clean, atomic commits that group related changes into logical units and validate tests pass before committing.; Track work with issue numbers for full traceability across all TDD cycles and commits.; Use the Atomic Commit skill for non-TDD workflows to analyze changes, detect mixed concerns, and create well-organized commits.; Check the current TDG plugin version to ensure you're using the latest features..