Skip to content
Back to skills

Cpp Professional Usage

ASecurity

`analysis-agent`/`task-agent`/`review-agent`: use when C/C++ changes cross ownership, UB, ABI/FFI, exception, concurrency, or target-build boundaries; skip tool-only work.

  • 7 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
businessc++performance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add machenjie/rd-skills --skill cpp-professional-usage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cpp Professional Usage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cpp Professional Usage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/machenjie-cpp-professional-usage/badge)](https://www.skillsdirectory.com/skills/machenjie-cpp-professional-usage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cpp-professional-usage
description: "`analysis-agent`/`task-agent`/`review-agent`: use when C/C++ changes cross ownership, UB, ABI/FFI, exception, concurrency, or target-build boundaries; skip tool-only work."
---

# cpp-professional-usage

## Registry Trigger

**Use when**

- Inspect or change C or C++ resource ownership, borrowed lifetime, undefined behavior exposure, ABI/FFI, exception flow, concurrency, or target-specific build behavior.
- Native correctness depends on compiler, optimizer, architecture, foreign runtime, or cleanup invariants in the current scope.

**Do not use when**

- The open decision is language/runtime selection, package policy, build-tool mechanics, test strategy, or a measured performance bottleneck.
- No task-local C/C++ source, native boundary, public header, generated binding, or target behavior requires inspection or change.

## Skill Role

Protect C/C++ resource and object lifetimes, undefined-behavior boundaries, exception cleanup, concurrency publication, ABI/FFI representation, and target-dependent semantics.

## High-Value Rules

- Bind deterministic resource acquisition and release to a scoped owner; make external-ABI transfer explicit.
- Define validity for pointers, references, views, iterators, callbacks, and moved-from objects across invalidation events.
- Prove lifetime, bounds, overflow, initialization, aliasing, alignment, representation, and race safety beyond compilation.
- Define exception or status boundaries, unwind cleanup, destructor failure, and caller translation.
- Fix ABI layout, calling convention, symbols, allocators, buffers, errors, callbacks, threads, and binding authority.
- State happens-before, publication, synchronization ownership, cancellation cleanup, and object lifetime.
- Define language standard, compiler flags, visibility, platform assumptions, and generated artifacts for explicit targets.
- Return the C/C++ safety decision with inspected native evidence, proof limits, and specialist routes even when no Reference loads.

## Anti-Patterns

- `shared_ptr`, a raw handle, or a custom deleter is introduced because ownership remains undecided.
- A view, iterator, callback capture, or foreign buffer escapes the storage or thread lifetime that makes it valid.
- A local build, one sanitizer lane, or one compiler is generalized to unsupported optimizer, architecture, or platform combinations.
- Source compatibility or unit-test success is presented as binary compatibility for exported layout, symbols, exceptions, or allocators.

## Stop Conditions

- Route language, package, build, test, and performance decisions to their specialist owners.
- Route synchronization protocols to `concurrency-control`.
- Route kernel, driver, allocator, interrupt, lock-free, hardware, or deep ABI/FFI design to `low-level-systems-extension`.

## Output Contract

- C C++ safety decision with ownership lifetime undefined behavior exception concurrency ABI FFI target-build risks and specialist routes

## Targeted References

| Path | Type | Load when | Do not load when | Required by | Required output |
|---|---|---|---|---|---|
| [native safety evidence](references/native-safety-evidence.md) | evidence-pattern | Native change crosses ownership borrowed lifetime undefined behavior concurrency ABI FFI or target-build boundary needing failure-specific proof | Current native ownership contracts and target-specific checks settle the changed boundary | task-agent, review-agent, analysis-agent | evidence-record, proof-limit, residual-risk |

Files in this skill

  • SKILL.md3.4 KB
  • references/native-safety-evidence.md2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…