cpp-testing
Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.
Skill by Jamkris
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/jamkris-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 only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.
- License
- MIT
- Instructions
- 320 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 Jamkris/everything-gemini-code, MIT.
More from Jamkris/everything-gemini-code
- 0.588score
brand-voice
Jamkris
Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and…
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
crosspost
Jamkris
Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
accessibility
Jamkris
Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
connections-optimizer
Jamkris
Reorganize the user's X and LinkedIn network with review-first pruning, add/follow recommendations, and channel-specific warm outreach drafted in the user's…
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
click-path-audit
Jamkris
Trace every user-facing button/touchpoint through its full state change sequence to find bugs where functions individually work but cancel each other out…
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
api-connector-builder
Jamkris
Build a new API connector or provider by matching the target repo's existing integration pattern exactly.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
codebase-onboarding
Jamkris
Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter GEMINI.md.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
carrier-relationship-management
evos
Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic…
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
automation-audit-ops
Jamkris
Evidence-first automation inventory and overlap audit workflow for ECC.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
autonomous-agent-harness
Jamkris
Transform Gemini CLI into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
council
Jamkris
Convene a four-voice council for ambiguous decisions, tradeoffs, and go/no-go calls.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
customer-billing-ops
Jamkris
Operate customer billing workflows such as subscriptions, refunds, churn triage, billing-portal recovery, and plan analysis using connected billing tools like…
SkillCFreshness: C★ 91Claude Code +9
Signals
- Stars
- 91
- Forks
- 23
- Open issues
- 1
- Last commit (this folder)
- Mar 24, 2026 (7 months ago)
- Last release
- May 26, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Jamkris
- 0.588score
brand-voice
Jamkris
Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and…
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
api-connector-builder
Jamkris
Build a new API connector or provider by matching the target repo's existing integration pattern exactly.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
accessibility
Jamkris
Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
automation-audit-ops
Jamkris
Evidence-first automation inventory and overlap audit workflow for ECC.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
autonomous-agent-harness
Jamkris
Transform Gemini CLI into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing.
SkillCFreshness: C★ 91Claude Code +9 - 0.583score
click-path-audit
Jamkris
Trace every user-facing button/touchpoint through its full state change sequence to find bugs where functions individually work but cancel each other out…
SkillCFreshness: C★ 91Claude Code +9
Cite this page
cpp-testing skill. Agent Mart. https://agentmart.dev/skills/jamkris-cpp-testing (last updated 2026-10-24)