What problem does it solve? C++ test suites often suffer from flaky tests, inconsistent CMake/CTest configuration, missing coverage, and undetected memory or threading bugs. This Skill provides a structured workflow for writing, running, and hardening C++ tests with GoogleTest and GoogleMock. ## Core Features & Use Cases - TDD Workflow Guidance: Follows the red-green-refactor loop with concrete GoogleTest fixture and gmock mock examples for C++17/20 code. - CMake/CTest Configuration: Sets up FetchContent-based GoogleTest integration, gtest_discover_tests() discovery, coverage flags (gcov/lcov, llvm-cov), and ASan/UBSan/TSan sanitizer builds. - Flaky Test Diagnosis: Provides guardrails against common pitfalls like fixed temp paths, wall-clock dependencies, sleep-based synchronization, and hidden global state. - Use Case: A developer inherits a C++ project with failing tests and no coverage. Use this Skill to configure CTest discovery, isolate the failing test with gtest filters, enable AddressSanitizer to find the memory bug, and add coverage reporting to CI. ## Quick Start Ask the agent to write a GoogleTest unit test with a CMake/CTest setup for your C++ class, or to diagnose a specific failing or flaky test.