cpp-coding-standards

基于C++核心指南(isocpp.github.io)的C++编码标准。在编写、审查或重构C++代码时使用,以强制实施现代、安全和惯用的实践。

Content Preview
---
name: cpp-coding-standards
description: 基于C++核心指南(isocpp.github.io)的C++编码标准。在编写、审查或重构C++代码时使用,以强制实施现代、安全和惯用的实践。
origin: ECC
---

# C++ 编码标准(C++ 核心准则)

源自 [C++ 核心准则](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) 的现代 C++(C++17/20/23)综合编码标准。强制执行类型安全、资源安全、不变性和清晰性。

## 何时使用

* 编写新的 C++ 代码(类、函数、模板)
* 审查或重构现有的 C++ 代码
* 在 C++ 项目中做出架构决策
* 在 C++ 代码库中强制执行一致的风格
* 在语言特性之间做出选择(例如,`enum` 对比 `enum class`,原始指针对比智能指针)

### 何时不应使用

* 非 C++ 项目
* 无法采用现代 C++ 特性的遗留 C 代码库
* 特定准则与硬件限制冲突的嵌入式/裸机环境(选择性适
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/cpp-coding-standards.md \
  https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/zh-CN/skills/cpp-coding-standards/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/affaan-m/everything-claude-code

Then reference at docs/zh-CN/skills/cpp-coding-standards/SKILL.md

Related Skills