Install
$ agentstack add skill-petrguan-cpp-agent-skill-cpp-expert-skill ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
C++ Expert Skill
Operating Rules
- Follow the C++ Core Guidelines (Stroustrup & Sutter) as the authoritative reference
- Consult
references/style.mdat the start of every task for naming and formatting conventions - Prefer modern C++ (C++17/20/23) idioms over legacy patterns
- Focus on type safety, resource safety, and performance; present optimizations as suggestions unless they address correctness
- Zero-overhead principle: choose abstractions the compiler can eliminate entirely
- Default to
std::unique_ptrfor ownership; raw pointers are non-owning - RAII for all resource management — locks, handles, state restoration
- Rule of Zero: prefer compiler-generated special members; Rule of Five if you must define any
- Encourage simplicity: remove the need > use existing > write simple > write clever
- Use
enum classexclusively, never plainenum - Error paths should be flat — early returns, not deep nesting
Task Workflow
Review existing C++ code
- Read the code under review and identify which topics apply
- Run the Topic Router below for each relevant topic
- Check for common issues: raw owning pointers, manual lock/unlock, reference captures in async lambdas
- Validate naming conventions against
references/style.md
Improve existing C++ code
- Audit current implementation against the Topic Router topics
- Replace legacy patterns with modern C++ equivalents
- Flatten deeply nested control flow with early returns
- Extract long functions (>40 lines) into focused sub-functions
- Suggest performance improvements as optional optimizations (see
references/performance.md)
Implement new C++ feature
- Design ownership and data flow first: identify who owns what
- Choose the right data structures (see
references/performance.mdcontainer selection) - Apply RAII for all resource management
- Design clean APIs with strong types and minimal surface area (see
references/api-design.md) - Write tests using the Arrange-Act-Assert pattern (see
references/testing.md)
Topic Router
Consult the reference file for each topic relevant to the current task:
| Topic | Reference | |-------|-----------| | Naming & formatting | references/style.md | | Memory & ownership | references/memory.md | | Concurrency & threading | references/concurrency.md | | Error handling | references/error-handling.md | | Performance | references/performance.md | | Design patterns | references/patterns.md | | API design | references/api-design.md | | Testing | references/testing.md | | Simplicity & taste | references/simplicity.md |
Correctness Checklist
These are hard rules -- violations are always bugs:
- [ ] Every heap-allocated object has exactly one clear owner
- [ ]
std::unique_ptrfor exclusive ownership; raw pointers are non-owning only - [ ] Rule of Zero: no custom destructor/copy/move unless managing a raw resource; Rule of Five if any are defined
- [ ] RAII for all locks — never manual
lock()/unlock();std::scoped_lockfor multiple mutexes - [ ] No reference captures (
[&]) in async/queued/stored lambdas - [ ] Move constructors and move assignment are
noexcept(required forstd::vectoroptimization) - [ ]
enum classused exclusively, never plainenum - [ ] Exceptions caught by
constreference, never by value - [ ] Destructors are
noexcept - [ ]
#pragma oncein all header files - [ ]
expliciton single-argument constructors - [ ]
[[nodiscard]]on functions where ignoring the return is a bug
References
references/style.md-- Read first for every task. Naming conventions, formatting, and code organizationreferences/memory.md-- RAII, ownership semantics, smart pointer selectionreferences/concurrency.md-- Threading, synchronization, async patterns, lambda capture rulesreferences/error-handling.md-- Assertions, exceptions, defensive coding, return value patternsreferences/performance.md-- Data-oriented design, cache awareness, allocation disciplinereferences/patterns.md-- Design patterns and modern C++ idioms (C++17/20)references/api-design.md-- Clean interfaces, minimal surface area, type safetyreferences/testing.md-- Unit testing patterns, mock conventions, test data buildersreferences/simplicity.md-- Code quality principles, readability, "good taste"
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: PetrGuan
- Source: PetrGuan/Cpp-Agent-Skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.