FISCFED9/CLI / .agents/skills/plugins/antigravity-awesome-skills-claude/skills/cpp-pro
cpp-pro
VerifiedWrite idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms. Handles templates, move semantics, and performance optimization.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.8 KB |
| references/build-tooling.md | markdown | 9.5 KB |
| references/concurrency.md | markdown | 10.7 KB |
| references/memory-performance.md | markdown | 8.9 KB |
| references/modern-cpp.md | markdown | 6.4 KB |
| references/templates.md | markdown | 7.7 KB |
| resources/implementation-playbook.md | markdown | 1.2 KB |
resources/implementation-playbook.md
View on GitHub# C++ Implementation Playbook
**Date:** March 23, 2026
**Author:** champbreed
---
## 1. RAII & Resource Management
Always wrap raw resources in manager objects to ensure cleanup on scope exit.
```cpp
// Good: Scope-bound cleanup
void process() {
auto data = std::make_unique<uint8_t[]>(1024);
// memory is freed automatically
}
```
## 2. Smart Pointer Ownership
- **unique_ptr**: Use for exclusive ownership.
- **shared_ptr**: Use for shared ownership across components.
- **weak_ptr**: Use to break circular reference cycles.
## 3. Concurrency Safety
Always use RAII-style locks like `std::lock_guard` or `std::unique_lock`.
```cpp
void update() {
std::lock_guard<std::mutex> lock(mutex_); // Released automatically
// thread-safe logic
}
```
## 4. Move Semantics & Efficiency
Avoid expensive copies by utilizing move constructors and `std::move`.
```cpp
void processData(std::vector<std::string>&& data) {
auto internalData = std::move(data); // Transfers ownership, no copy
}
```
## 5. Modern STL Algorithms
Prefer algorithms over manual loops for readability and optimization.
```cpp
void sortData(std::vector<int>& myVector) {
// Use std::ranges (C++20) for cleaner, safer iteration
std::ranges::sort(myVector);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |