
C++ Testing Workflow
Guides the agent through writing, fixing and debugging C++ tests with GoogleTest and CTest
- Repository
- affaan-m/ECC
- Stars
- 295,127
- Licence
- MIT
- Files
- 1 file
What it does
This skill gives an AI agent a structured playbook for C++ testing: writing tests first (red, green, refactor), building unit tests and mocks with GoogleTest/GoogleMock, wiring up CMake and CTest, and diagnosing failing or flaky tests. It also covers adding code coverage reports and turning on sanitizers (tools that catch memory and threading bugs). Once installed, the agent follows these conventions instead of improvising them, and it fills in examples and commands for your project.
Great for
- C++ developers who want an AI assistant to write or repair GoogleTest suites
- Teams setting up CMake/CTest, coverage reporting or sanitizer builds
- Engineers investigating flaky or failing C++ tests
Skip it if
- Non-C++ projects, since the guidance is specific to C++ and GoogleTest (the skill itself says so)
- Feature work with no test changes, or performance tuning, which the skill tells the agent to avoid
Try asking
- “Write GoogleTest unit tests for my Calculator class and wire them into CMake”
- “Why is my UserStoreTest flaky? Help me debug it with a gtest filter and sanitizers”
- “Set up a coverage build with gcov and lcov for this C++ project”
- “Add a gmock mock for my Notifier interface and test the Service class”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
cpp-testing.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip cpp-testing.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip cpp-testing.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Point the agent at your real project layout and types; the examples are stubs and say so.
- Pin the GoogleTest version to your project's policy, as the CMake example advises, rather than accepting the default tag.
- Run the agent's commands yourself before trusting coverage or sanitizer results, since the agent will be executing build and test tools on your machine.
What's inside
- SKILL.md
Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.