AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Cpp Expert Skill

skill-petrguan-cpp-agent-skill-cpp-expert-skill · by PetrGuan

Write, review, or improve C++ code following best practices for memory management, concurrency, performance, error handling, API design, and modern C++ idioms (C++17/20/23). Use when building new C++ features, refactoring existing code, reviewing code quality, or adopting modern C++ patterns. Aligned with the C++ Core Guidelines (Stroustrup & Sutter).

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-petrguan-cpp-agent-skill-cpp-expert-skill

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-petrguan-cpp-agent-skill-cpp-expert-skill)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Cpp Expert Skill? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

C++ Expert Skill

Operating Rules

  • Follow the C++ Core Guidelines (Stroustrup & Sutter) as the authoritative reference
  • Consult references/style.md at 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_ptr for 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 class exclusively, never plain enum
  • 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.md container 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_ptr for 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_lock for multiple mutexes
  • [ ] No reference captures ([&]) in async/queued/stored lambdas
  • [ ] Move constructors and move assignment are noexcept (required for std::vector optimization)
  • [ ] enum class used exclusively, never plain enum
  • [ ] Exceptions caught by const reference, never by value
  • [ ] Destructors are noexcept
  • [ ] #pragma once in all header files
  • [ ] explicit on 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 organization
  • references/memory.md -- RAII, ownership semantics, smart pointer selection
  • references/concurrency.md -- Threading, synchronization, async patterns, lambda capture rules
  • references/error-handling.md -- Assertions, exceptions, defensive coding, return value patterns
  • references/performance.md -- Data-oriented design, cache awareness, allocation discipline
  • references/patterns.md -- Design patterns and modern C++ idioms (C++17/20)
  • references/api-design.md -- Clean interfaces, minimal surface area, type safety
  • references/testing.md -- Unit testing patterns, mock conventions, test data builders
  • references/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.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.