tdd-workflow

Enforce test-driven development in C++ projects using Google Test and CMake/CTest.

2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/steven715/cpp-claude-code --skill tdd-workflow-steven715
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/steven715/cpp-claude-code/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/steven715/cpp-claude-code --skill tdd-workflow-steven715

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides and enforces Test-Driven Development in C++ projects, ensuring tests are written before code to improve reliability and maintainability.

Core Features & Use Cases

  • TDD-first workflow: write unit and integration tests before implementing features.
  • Coverage discipline: target 80%+ test coverage (unit + integration) using Google Test and CMake/CTest.
  • Workflow guidance: provides step-by-step guidance from user stories to refactoring to maintainable code.
  • Use Case: When adding a new feature, you draft tests, run the build and tests, implement code to pass tests, and iterate until green.

Quick Start

Create a failing unit test for a new feature, run cmake to configure the build, run ctest to execute tests, implement minimal code to satisfy tests, and repeat until all tests are green and coverage targets are met.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce test-driven development in C++ with Google Test and CMake?

To enforce test-driven development in C++, write failing Google Test unit tests first, configure CMake/CTest to execute them, implement minimal code to pass, and iterate until achieving 80%+ coverage.

What is the best way to achieve 80% test coverage in a CMake project?

Achieving 80% test coverage in a CMake project involves configuring CMake/CTest for coverage reporting, writing unit and integration tests with Google Test before features, and iterating from failing tests to passing implementations.

Can I use this TDD workflow for refactoring existing C++ code?

Yes, this TDD workflow applies to feature development, bug fixes, and refactoring existing C++ code by drafting tests, running CMake builds and CTest executions, and iterating until all tests pass and coverage targets are met.

Do I need Google Test and CTest to follow this C++ TDD workflow?

Yes, this workflow requires Google Test for writing unit and integration tests and CMake/CTest for configuring the build, executing tests, and measuring coverage to enforce the 80%+ test coverage target.

Why write failing tests before implementing C++ features?

Writing failing tests before implementing C++ features ensures test-driven development discipline, improves code reliability and maintainability, and guarantees that features are built specifically to satisfy predefined Google Test and CTest requirements.

What are the limitations of enforcing TDD in C++ projects?

Enforcing TDD in C++ projects requires strict adherence to writing tests before code, continuous CMake configuration and CTest execution, and iterating until 80%+ coverage is met, which may increase initial development time.