Skip to content
Back to skills

Cpp Patterns

ASecurity

C++ patterns for smart pointers, lifetimes, locks, C++20 to 26 changes, compiler defaults, and hardening. Load before any edit to a C++ file or header, however small, and for C++ questions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsc++

Security analysis

A100/100

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

Scanned December 3, 2026

npx -y skills add ku5ic/claude-kit --skill cpp-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cpp Patterns?

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

Security grade badge for Cpp Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ku5ic-cpp-patterns/badge)](https://www.skillsdirectory.com/skills/ku5ic-cpp-patterns)

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-patterns
description: C++ patterns for smart pointers, lifetimes, locks, C++20 to 26 changes, compiler defaults, and hardening. Load before any edit to a C++ file or header, however small, and for C++ questions.
---

# C++ patterns

Default assumption: C++23, ISO/IEC 14882:2024, per isocpp.org's standard page. C++26 isn't published: its DIS ballot didn't pass unanimously, as reported at the November 2026 meeting, and a second ballot is expected. Suggest a C++26 feature only when the build already opts into it.

A standard row applies when the build's `-std` or `/std`, else the compiler's default, is at least its standard, and a compiler row when the project's compiler is at least that release. GCC 16 defaults to `gnu++20`, GCC 11 to 15 and Clang 16 and later to `gnu++17`, and MSVC to `/std:c++14`.

A `.h` header also loads c-patterns, since it may be C.

## Reference files

Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.

| Before                                                                                | Read                                                     |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing C++ code, raising `-std`, or upgrading the compiler                           | [reference/upgrades.md](reference/upgrades.md)           |
| Writing, changing, or reviewing C++ code                                              | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a class, a smart pointer, a parameter list, an enum, or a build's flags       | [reference/practices.md](reference/practices.md)         |
| Configuring compiler warnings, clang-tidy, the analyzers, sanitizers, or clang-format | [reference/tooling.md](reference/tooling.md)             |

Files in this skill

  • SKILL.md1.9 KB
  • reference/anti-patterns.md9.9 KB
  • reference/practices.md2.1 KB
  • reference/tooling.md4.1 KB
  • reference/upgrades.md7.6 KB
  • sources.md7.9 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.