cpp-testing
Use when writing or fixing C++ tests, configuring GoogleTest/CTest, or adding coverage/sanitizers.
Skill by viniciuscs84
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/viniciuscs84-cpp-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cpp-testing
What's inside
- Skill name
cpp-testing- Description
- Use when writing or fixing C++ tests, configuring GoogleTest/CTest, or adding coverage/sanitizers.
- License
- MIT
- Instructions
- 266 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# C++ Testing (Agent Skill)
Agent-focused testing workflow for modern C++ (C++17/20) using GoogleTest/GoogleMock with CMake/CTest.
## When to Use
- Writing new C++ tests or fixing existing tests
- Designing unit/integration test coverage for C++ components
- Adding test coverage, CI gating, or regression protection
- Configuring CMake/CTest workflows for consistent execution
- Investigating test failures or flaky behavior
- Enabling sanitizers for memory/race diagnostics
### When NOT to Use
- Implementing new product features without test changes
- Large-scale refactors unrelated to test coverage or failures
- Performance tuning without test regressions to validate
- Non-C++ projects or non-test tasks
## Core Concepts
- **TDD loop**: red → green → refactor (tests first, minimal fix, then cleanups).
- **Isolation**: prefer dependency injection and fakes over global state.
- **Test layout**: `tests/unit`, `tests/integration`, `tests/testdata`.
- **Mocks vs fakes**: mock for interactions, fake for stateful behavior.
- **CTest discovery**: use `gtest_discover_tests()` for stable test discovery.
- **CI signal**: run subset first, then full suite with `--output-on-failure`.
## TDD Workflow
Follow the RED → GREEN → REFACTOR loop:
1. **RED**: write a failing test that captures the new behavior
2. **GREEN**: implement the smallest change to pass
3. **REFACTOR**: clean up while tests stay green
```cpp
// tests/add_test.cpp
#include <gtest/gtest.h>
int Add(int a, int b); // Provided by production code.
TEST(AddTest, AddsTwoNumbers) { // RED
EXPECT_EQ(Add(2, 3), 5);
}
// src/add.cpp
int Add(int a, int b) { // GREEN
return a + b;
}
// REFACTOR: simplify/rename once tests pass
```
## Code Examples
### Basic Unit Test (gtest)
```cpp
// tests/calculator_test.cpp
#include <gtest/gtest.h>
int Add(int a, int b); // Provided by production code.
TEST(CalculatorTest, AddsTwoNumbers) {
EXPECT_EQ(Add(2, 3), 5);
}
```
### Fixture (gtest)
```cpp
// tests/user_store_test.cpp
// Pseudocode stub: replace UserStore/User with project types.
#include <gtest/gtest.h>
#include <memory>
#include <optional>
#include <string>
struct User { std::string name; };
class UserStore {
public:
explicit UserStore(std::string /*path*/) {}
void Seed(std::initializer_list<User> /*users*/) {}
std::optional<User> Find(const std::string &/*name*/) { return User{"alice"}; }
};
class UserStoreTest : public ::testing::Test {
protected:
void SetUp() override {
store = std::make_unique<UserStore>(":memory:");
store->Seed({{"alice"}, {"bob"}});
}
std::unique_ptr<UserStore> store;
};
TEST_F(UserStoreTest, FindsExistingUser) {
auto user = store->Find("alice");
ASSERT_TRUE(user.has_value());
EXPECT_EQ(user->name, "alice");
}
```
### Mock (gmock)
```cpp
// tests/notifier_test.cpp
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <string>
class Notifier {
public:
virtual ~Notifier() = default;
virtual void Send(const std::string &message) = 0;
};From viniciuscs84/sdd-toolkit, MIT.
More from viniciuscs84/sdd-toolkit
- 0.479score
csharp-xml-docs
viniciuscs84
C# XML documentation with on-demand Haiku→Expert Review→Final workflow.
SkillCFreshness: CClaude Code +9 - 0.476score
agent-browser
viniciuscs84
Use for automated browser tasks (navigation, form filling, scraping, screenshots, web app testing).
SkillCFreshness: CClaude Code +9 - 0.474score
cpp-development
viniciuscs84
Use when writing, reviewing, or refactoring C++ code — covers workflow, essential patterns, and pre-commit checklist for modern C++17/20.
SkillCFreshness: CClaude Code +9 - 0.474score
audio-dsp
viniciuscs84
Use when implementing real-time DSP algorithms, audio thread architecture, or offline spectral analysis in C++/Rust.
SkillCFreshness: CClaude Code +9 - 0.473score
agents-md
viniciuscs84
Use when asked to write or review AGENTS.md/CLAUDE.md/LLMs.md context files.
SkillCFreshness: CClaude Code +9 - 0.473score
code-review-excellence
viniciuscs84
Use when conducting code reviews or establishing review standards.
SkillCFreshness: CClaude Code +9 - 0.471score
audio-engineering-principles
viniciuscs84
Use for real-time audio code safety, determinism, and numeric hygiene.
SkillCFreshness: CClaude Code +9 - 0.470score
csharp-refactor
viniciuscs84
C# code refactoring skill.
SkillCFreshness: CClaude Code +9 - 0.469score
csharp-docs
viniciuscs84
Ensure that C# types are documented with XML comments and follow best practices for documentation.
SkillCFreshness: CClaude Code +9 - 0.469score
csharp-mstest
viniciuscs84
Get best practices for MSTest 3.x/4.x unit testing, including modern assertion APIs and data-driven tests
SkillCFreshness: CClaude Code +9 - 0.468score
csharp-code-review
viniciuscs84
C# code review skill.
SkillCFreshness: CClaude Code +9 - 0.466score
csharp-async
viniciuscs84
Get best practices for C# async programming
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 30, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/viniciuscs84/sdd-toolkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from viniciuscs84
- 0.479score
csharp-xml-docs
viniciuscs84
C# XML documentation with on-demand Haiku→Expert Review→Final workflow.
SkillCFreshness: CClaude Code +9 - 0.476score
agent-browser
viniciuscs84
Use for automated browser tasks (navigation, form filling, scraping, screenshots, web app testing).
SkillCFreshness: CClaude Code +9 - 0.474score
audio-dsp
viniciuscs84
Use when implementing real-time DSP algorithms, audio thread architecture, or offline spectral analysis in C++/Rust.
SkillCFreshness: CClaude Code +9 - 0.474score
cpp-development
viniciuscs84
Use when writing, reviewing, or refactoring C++ code — covers workflow, essential patterns, and pre-commit checklist for modern C++17/20.
SkillCFreshness: CClaude Code +9 - 0.473score
code-review-excellence
viniciuscs84
Use when conducting code reviews or establishing review standards.
SkillCFreshness: CClaude Code +9 - 0.473score
agents-md
viniciuscs84
Use when asked to write or review AGENTS.md/CLAUDE.md/LLMs.md context files.
SkillCFreshness: CClaude Code +9
Cite this page
cpp-testing skill. Agent Mart. https://agentmart.dev/skills/viniciuscs84-cpp-testing (last updated 2026-10-24)