cpp-coding-standards
Skill0 starsChanged 52 days agoMITView on GitHub
Enforce modern C++ guidelines (C++17/20/23) derived from the ISO C++ Core Guidelines. Covers RAII, resource ownership, const-correctness, Rule of Zero and Five, smart pointer selection, bounds safety, concepts, and avoiding undefined behavior. Use when writing, reviewing, or refactoring C++ code, headers, classes, or systems modules, or when checking that C++ interfaces enforce memory and type safety at compile time.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- majay123/my-embedded-skillstheir own version, first seen Nov 8, 2026
- TsinHzl/claude-code-configtheir own version, first seen Nov 1, 2026
- ghvinashvili/specagenttheir own version, first seen Nov 1, 2026
- renepf/claude-skillstheir own version, first seen Oct 25, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
Used with
Projects with it also use agent-payment-x402, openclaw-persona-forge and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TironFoxSkillagent-payment-x402
Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.
Also in 6 projects that use this
TironFoxSkillopenclaw-persona-forge
为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡, 输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。 如当前环境提供已审核的生图 skill,可自动生成统一风格头像图片。 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。 不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。 触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、 龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、 lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
Also in 5 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 9 projects that use this
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 10 projects that use this
loulanyueSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 8 projects that use this
renepfSkillmotion-advanced
Advanced motion patterns for React / Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loaders, and the full API decision tree. Requires motion-foundations.
Also in 4 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- loulanyue/awesome-claude-notes★ 272same name
- Fmarzochi/EGC★ 61same name
- gongyijie85/dsh-ecc★ 8same name
- majay123/my-embedded-skills★ 8same name
- ghvinashvili/specagent★ 7same name
- TsinHzl/claude-code-config★ 2same name
- junimnjw/everything-claude-code★ 1same name
- Rojios/everything-claude-code★ 1same name
- Ronnasayd/aipp★ 1same name
- royaluniondesign-sys/claude-os★ 1same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- cpp-testingSkill
- embedded-firmware-misraSkill
- latency-critical-systemsSkill
- m5-onboardSkill
- onnx-quantize-tflmSkill
- openlane-sky130-flowSkill
- rtl-testbench-disciplineSkill
- rtl-verilog-lintSkill
- skill-eval-harnessSkill
- timing-closure-cdcSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Value semantics: Prefer returning values or structured bindings rather than passing output parameters.
- Very specific: line 25
Compile-time enforcement: Prefer static_assert and C++20 concepts over runtime dynamic checks where feasible.
- Very specific: line 40
When shared ownership is genuinely necessary across independent async subsystems, use std::shared_ptr.
- Distinctive: line 55
If a class directly wraps a low-level OS handle or hardware resource, handle all special members explicitly (Rule of Five):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modern C++ Standards (ISO C++ Core Guidelines)
The bugs that cost the most in C++ arise from ambiguous resource ownership, dangling pointers, uninitialized state, and silent slicing during polymorphic copies. The ISO C++ Core Guidelines eliminate these classes of defects by relying on the compiler's type system, value semantics, and deterministic resource destruction.
// RAII and value semantics: no explicit memory calls required
auto buffer = std::make_unique<uint8_t[]>(length);
std::span<const uint8_t> view(buffer.get(), length);Extended rule tables and cross-cutting guideline mappings live in references/core-guidelines.md. Consult that reference when deciding between language features or verifying specific rule numbers (P, I, F, C, R, T, SL).
Core Principles
- RAII everywhere: Tie resource acquisition and release directly to object lifetimes. Raw
newanddeleteshould not appear in application code. - Immutability by default: Mark data members and variables
constorconstexprunless mutation is required. - Value semantics: Prefer returning values or structured bindings rather than passing output parameters.
- Compile-time enforcement: Prefer
static_assertand C++20 concepts over runtime dynamic checks where feasible.
Ownership and Pointers
A raw pointer represents an observation, not an owner. An interface that receives a raw pointer assumes the caller manages lifetime.
// Explicit ownership transfer via unique_ptr
void ingest(std::unique_ptr<Packet> packet);
// Borrowed view: non-owning observation
void inspect(const Packet& packet);
void inspect_range(std::span<const uint8_t> bytes);When shared ownership is genuinely necessary across independent async subsystems, use std::shared_ptr. Otherwise, prefer std::unique_ptr because it avoids atomic reference counting overhead.
Rule of Zero and Rule of Five
A class that relies on standard containers (std::vector, std::string, std::unique_ptr) requires no custom copy, move, or destructor logic. This is the Rule of Zero.
struct Session {
std::string id;
std::vector<uint8_t> payload;
std::unique_ptr<SocketHandle> socket;
// Special member functions generated automatically by compiler
};If a class directly wraps a low-level OS handle or hardware resource, handle all special members explicitly (Rule of Five):
- Destructor
- Copy constructor
- Copy assignment operator
- Move constructor
- Move assignment operator
Polymorphic base classes should declare their destructor public virtual or protected non-virtual to avoid undefined behavior during deletion.
Interfaces and Parameter Passing
- Pass cheaply copied types (e.g., primitives,
std::string_view,std::span) by value. - Pass expensive or polymorphic types by
const&. - Single-argument constructors should be marked
explicitto prevent unintended implicit conversions. - Scoped enumerations (
enum class) prevent unscoped identifier collisions.
enum class Channel : uint8_t {
primary,
backup,
telemetry
};
class Node {
public:
explicit Node(std::string_view identifier);
};Honest limits
This skill enforces stylistic and architectural guidelines. It does not replace a static analysis engine (such as clang-tidy or SonarQube) or a dynamic memory sanitizer (ASan/TSan). Adhering to the Core Guidelines minimizes runtime defects, but cannot mathematically prove freedom from race conditions or lock contention in complex multithreaded systems.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

