Cpp Mock Testing
CheckedGenerates C++ mock classes and tests to verify component behavior based on provided function signatures and descriptions.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add sentenz/skills --skill cpp-mock-testing -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
sentenz
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill passed all 6 checks. We read its files at one commit and looked for the things that make a skill dangerous to run — not for whether it works.
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No undeclared network calls: passed
Makes no network calls.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned sentenz/skills at 0414902177.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 0414902177
- Manifest
- skills/cpp-mock-testing/SKILL.md
- Scanned
- 1 file, 356 lines
About this skill
What it does
This skill enables AI agents to generate C++ mock classes and functions. It facilitates automated unit testing by creating test doubles, allowing developers to isolate and verify individual components of their code. The generated mocks can be customized with specific return values or behaviors for precise testing scenarios.
When to use it
- When writing unit tests for C++ code where dependencies need to be isolated.
- To quickly create mock objects for integration tests, simulating external services or complex data structures.
- During test-driven development (TDD) to define expected behavior before implementing the actual functionality.
- For scenarios requiring controlled and repeatable testing conditions by mocking out specific function calls.
Key capabilities
- Generates C++ mock classes based on provided class definitions.
- Creates mock functions with customizable return values.
- Supports defining expectations for mock object interactions.
- Facilitates isolating code units during testing.
Example prompts
- "Create a mock class for
DatabaseConnection." - "Generate a mock function for
calculateTotal()that returns 100." - “Mock the
PaymentProcessor::processPaymentmethod to always return success.”
Tips & gotchas
The skill requires a basic understanding of C++ and mocking frameworks. Ensure the class definition provided is accurate, as the generated mock will be based on it.