Agent skill

Cpp Coding Standards

by affaan-m in affaan-m/ECC

C++ coding standards based on the C++ Core Guidelines (isocpp.github.io).

MITAuto-check passedDevelopment

Install Cpp Coding Standards

skills CLI
$ npx skills add affaan-m/ECC --skill cpp-coding-standards -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC cpp-coding-standards --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cpp-coding-standards .claude/skills/cpp-coding-standards && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cpp-coding-standards
GitHub stars
274k
Used in
4 other repos
Token cost
~5.6k tokens
SKILL.md length
1,523 words
Files
1
Skills in repo
657
Repo updated
First seen
Licence
MIT

At a glance

C++ coding standards based on the C++ Core Guidelines (isocpp.github.io).

  • Works in 6 steps: RAII everywhere (P.8, R.1, E.6, CP.20):… → Immutability by default (P.10, Con.1-5,… → Type safety (P.4, I.4, ES.46-49,… → …
  • Refactoring C++ code to enforce modern
  • SKILL.md covers When to Use, Cross-Cutting Principles, Philosophy & Interfaces (P.*,… and Functions (F.*), plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cpp Coding Standards is an agent skill from affaan-m/ECC. C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.

Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code quality and Refactoring. It works with C++ and GitHub. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Refactoring C++ code to enforce modern
  • Idiomatic practices

Example prompts

  • “/cpp-coding-standards”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. RAII everywhere (P.8, R.1, E.6, CP.20): Bind resource lifetime to object lifetime
  2. Immutability by default (P.10, Con.1-5, ES.25): Start with const/constexpr; mutability is the exception
  3. Type safety (P.4, I.4, ES.46-49, Enum.3): Use the type system to prevent errors at compile time
  4. Express intent (P.3, F.1, NL.1-2, T.10): Names, types, and concepts should communicate purpose
  5. Minimize complexity (F.2-3, ES.5, Per.4-5): Simple code is correct code
  6. Value semantics over pointer semantics (C.10, R.3-5, F.20, CP.31): Prefer returning by value and scoped objects

What it can do on your machine

Read from SKILL.md and the folder at commit ef648e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are cpp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • isocpp.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cpp Coding Standards loads about 5.6k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,523 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~5.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 1,523 words, ~5,573 tokens.

Download SKILL.mdSave it as .claude/skills/cpp-coding-standards/SKILL.md (or your agent's skills folder).
name
cpp-coding-standards
description
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.
metadata.origin
ECC

C++ Coding Standards (C++ Core Guidelines)

Comprehensive coding standards for modern C++ (C++17/20/23) derived from the C++ Core Guidelines. Enforces type safety, resource safety, immutability, and clarity.

When to Use

  • Writing new C++ code (classes, functions, templates)
  • Reviewing or refactoring existing C++ code
  • Making architectural decisions in C++ projects
  • Enforcing consistent style across a C++ codebase
  • Choosing between language features (e.g., enum vs enum class, raw pointer vs smart pointer)
When NOT to Use
  • Non-C++ projects
  • Legacy C codebases that cannot adopt modern C++ features
  • Embedded/bare-metal contexts where specific guidelines conflict with hardware constraints (adapt selectively)

Cross-Cutting Principles

These themes recur across the entire guidelines and form the foundation:

  1. RAII everywhere (P.8, R.1, E.6, CP.20): Bind resource lifetime to object lifetime
  2. Immutability by default (P.10, Con.1-5, ES.25): Start with const/constexpr; mutability is the exception
  3. Type safety (P.4, I.4, ES.46-49, Enum.3): Use the type system to prevent errors at compile time
  4. Express intent (P.3, F.1, NL.1-2, T.10): Names, types, and concepts should communicate purpose
  5. Minimize complexity (F.2-3, ES.5, Per.4-5): Simple code is correct code
  6. Value semantics over pointer semantics (C.10, R.3-5, F.20, CP.31): Prefer returning by value and scoped objects

Philosophy & Interfaces (P., I.)

Key Rules
RuleSummary
P.1Express ideas directly in code
P.3Express intent
P.4Ideally, a program should be statically type safe
P.5Prefer compile-time checking to run-time checking
P.8Don't leak any resources
P.10Prefer immutable data to mutable data
I.1Make interfaces explicit
I.2Avoid non-const global variables
I.4Make interfaces precisely and strongly typed
I.11Never transfer ownership by a raw pointer or reference
I.23Keep the number of function arguments low
DO
cpp
// P.10 + I.4: Immutable, strongly typed interface
struct Temperature {
    double kelvin;
};

Temperature boil(const Temperature& water);
DON'T
cpp
// Weak interface: unclear ownership, unclear units
double boil(double* temp);

// Non-const global variable
int g_counter = 0;  // I.2 violation

Functions (F.*)

Key Rules
RuleSummary
F.1Package meaningful operations as carefully named functions
F.2A function should perform a single logical operation
F.3Keep functions short and simple
F.4If a function might be evaluated at compile time, declare it constexpr
F.6If your function must not throw, declare it noexcept
F.8Prefer pure functions
F.16For "in" parameters, pass cheaply-copied types by value and others by const&
F.20For "out" values, prefer return values to output parameters
F.21To return multiple "out" values, prefer returning a struct
F.43Never return a pointer or reference to a local object
Parameter Passing
cpp
// F.16: Cheap types by value, others by const&
void print(int x);                           // cheap: by value
void analyze(const std::string& data);       // expensive: by const&
void transform(std::string s);               // sink: by value (will move)

// F.20 + F.21: Return values, not output parameters
struct ParseResult {
    std::string token;
    int position;
};

ParseResult parse(std::string_view input);   // GOOD: return struct

// BAD: output parameters
void parse(std::string_view input,
           std::string& token, int& pos);    // avoid this
Pure Functions and constexpr
cpp
// F.4 + F.8: Pure, constexpr where possible
constexpr int factorial(int n) noexcept {
    return (n <= 1) ? 1 : n * factorial(n - 1);
}

static_assert(factorial(5) == 120);
Anti-Patterns
  • Returning T&& from functions (F.45)
  • Using va_arg / C-style variadics (F.55)
  • Capturing by reference in lambdas passed to other threads (F.53)
  • Returning const T which inhibits move semantics (F.49)

Classes & Class Hierarchies (C.*)

Key Rules
RuleSummary
C.2Use class if invariant exists; struct if data members vary independently
C.9Minimize exposure of members
C.20If you can avoid defining default operations, do (Rule of Zero)
C.21If you define or =delete any copy/move/destructor, handle them all (Rule of Five)
C.35Base class destructor: public virtual or protected non-virtual
C.41A constructor should create a fully initialized object
C.46Declare single-argument constructors explicit
C.67A polymorphic class should suppress public copy/move
C.128Virtual functions: specify exactly one of virtual, override, or final
Rule of Zero
cpp
// C.20: Let the compiler generate special members
struct Employee {
    std::string name;
    std::string department;
    int id;
    // No destructor, copy/move constructors, or assignment operators needed
};
Rule of Five
cpp
// C.21: If you must manage a resource, define all five
class Buffer {
public:
    explicit Buffer(std::size_t size)
        : data_(std::make_unique<char[]>(size)), size_(size) {}

    ~Buffer() = default;

    Buffer(const Buffer& other)
        : data_(std::make_unique<char[]>(other.size_)), size_(other.size_) {
        std::copy_n(other.data_.get(), size_, data_.get());
    }

    Buffer& operator=(const Buffer& other) {
        if (this != &other) {
            auto new_data = std::make_unique<char[]>(other.size_);
            std::copy_n(other.data_.get(), other.size_, new_data.get());
            data_ = std::move(new_data);
            size_ = other.size_;
        }
        return *this;
    }

    Buffer(Buffer&&) noexcept = default;
    Buffer& operator=(Buffer&&) noexcept = default;

private:
    std::unique_ptr<char[]> data_;
    std::size_t size_;
};
Class Hierarchy
cpp
// C.35 + C.128: Virtual destructor, use override
class Shape {
public:
    virtual ~Shape() = default;
    virtual double area() const = 0;  // C.121: pure interface
};

class Circle : public Shape {
public:
    explicit Circle(double r) : radius_(r) {}
    double area() const override { return 3.14159 * radius_ * radius_; }

private:
    double radius_;
};
Anti-Patterns
  • Calling virtual functions in constructors/destructors (C.82)
  • Using memset/memcpy on non-trivial types (C.90)
  • Providing different default arguments for virtual function and overrider (C.140)
  • Making data members const or references, which suppresses move/copy (C.12)

Resource Management (R.*)

Key Rules
RuleSummary
R.1Manage resources automatically using RAII
R.3A raw pointer (T*) is non-owning
R.5Prefer scoped objects; don't heap-allocate unnecessarily
R.10Avoid malloc()/free()
R.11Avoid calling new and delete explicitly
R.20Use unique_ptr or shared_ptr to represent ownership
R.21Prefer unique_ptr over shared_ptr unless sharing ownership
R.22Use make_shared() to make shared_ptrs
Smart Pointer Usage
cpp
// R.11 + R.20 + R.21: RAII with smart pointers
auto widget = std::make_unique<Widget>("config");  // unique ownership
auto cache  = std::make_shared<Cache>(1024);        // shared ownership

// R.3: Raw pointer = non-owning observer
void render(const Widget* w) {  // does NOT own w
    if (w) w->draw();
}

render(widget.get());
RAII Pattern
cpp
// R.1: Resource acquisition is initialization
class FileHandle {
public:
    explicit FileHandle(const std::string& path)
        : handle_(std::fopen(path.c_str(), "r")) {
        if (!handle_) throw std::runtime_error("Failed to open: " + path);
    }

    ~FileHandle() {
        if (handle_) std::fclose(handle_);
    }

    FileHandle(const FileHandle&) = delete;
    FileHandle& operator=(const FileHandle&) = delete;
    FileHandle(FileHandle&& other) noexcept
        : handle_(std::exchange(other.handle_, nullptr)) {}
    FileHandle& operator=(FileHandle&& other) noexcept {
        if (this != &other) {
            if (handle_) std::fclose(handle_);
            handle_ = std::exchange(other.handle_, nullptr);
        }
        return *this;
    }

private:
    std::FILE* handle_;
};
Anti-Patterns
  • Naked new/delete (R.11)
  • malloc()/free() in C++ code (R.10)
  • Multiple resource allocations in a single expression (R.13 -- exception safety hazard)
  • shared_ptr where unique_ptr suffices (R.21)

Expressions & Statements (ES.*)

Key Rules
RuleSummary
ES.5Keep scopes small
ES.20Always initialize an object
ES.23Prefer {} initializer syntax
ES.25Declare objects const or constexpr unless modification is intended
ES.28Use lambdas for complex initialization of const variables
ES.45Avoid magic constants; use symbolic constants
ES.46Avoid narrowing/lossy arithmetic conversions
ES.47Use nullptr rather than 0 or NULL
ES.48Avoid casts
ES.50Don't cast away const
Initialization
cpp
// ES.20 + ES.23 + ES.25: Always initialize, prefer {}, default to const
const int max_retries{3};
const std::string name{"widget"};
const std::vector<int> primes{2, 3, 5, 7, 11};

// ES.28: Lambda for complex const initialization
const auto config = [&] {
    Config c;
    c.timeout = std::chrono::seconds{30};
    c.retries = max_retries;
    c.verbose = debug_mode;
    return c;
}();
Anti-Patterns
  • Uninitialized variables (ES.20)
  • Using 0 or NULL as pointer (ES.47 -- use nullptr)
  • C-style casts (ES.48 -- use static_cast, const_cast, etc.)
  • Casting away const (ES.50)
  • Magic numbers without named constants (ES.45)
  • Mixing signed and unsigned arithmetic (ES.100)
  • Reusing names in nested scopes (ES.12)

Error Handling (E.*)

Key Rules
RuleSummary
E.1Develop an error-handling strategy early in a design
E.2Throw an exception to signal that a function can't perform its assigned task
E.6Use RAII to prevent leaks
E.12Use noexcept when throwing is impossible or unacceptable
E.14Use purpose-designed user-defined types as exceptions
E.15Throw by value, catch by reference
E.16Destructors, deallocation, and swap must never fail
E.17Don't try to catch every exception in every function
Exception Hierarchy
cpp
// E.14 + E.15: Custom exception types, throw by value, catch by reference
class AppError : public std::runtime_error {
public:
    using std::runtime_error::runtime_error;
};

class NetworkError : public AppError {
public:
    NetworkError(const std::string& msg, int code)
        : AppError(msg), status_code(code) {}
    int status_code;
};

void fetch_data(const std::string& url) {
    // E.2: Throw to signal failure
    throw NetworkError("connection refused", 503);
}

void run() {
    try {
        fetch_data("https://api.example.com");
    } catch (const NetworkError& e) {
        log_error(e.what(), e.status_code);
    } catch (const AppError& e) {
        log_error(e.what());
    }
    // E.17: Don't catch everything here -- let unexpected errors propagate
}
Anti-Patterns
  • Throwing built-in types like int or string literals (E.14)
  • Catching by value (slicing risk) (E.15)
  • Empty catch blocks that silently swallow errors
  • Using exceptions for flow control (E.3)
  • Error handling based on global state like errno (E.28)

Constants & Immutability (Con.*)

All Rules
RuleSummary
Con.1By default, make objects immutable
Con.2By default, make member functions const
Con.3By default, pass pointers and references to const
Con.4Use const for values that don't change after construction
Con.5Use constexpr for values computable at compile time
cpp
// Con.1 through Con.5: Immutability by default
class Sensor {
public:
    explicit Sensor(std::string id) : id_(std::move(id)) {}

    // Con.2: const member functions by default
    const std::string& id() const { return id_; }
    double last_reading() const { return reading_; }

    // Only non-const when mutation is required
    void record(double value) { reading_ = value; }

private:
    const std::string id_;  // Con.4: never changes after construction
    double reading_{0.0};
};

// Con.3: Pass by const reference
void display(const Sensor& s) {
    std::cout << s.id() << ": " << s.last_reading() << '\n';
}

// Con.5: Compile-time constants
constexpr double PI = 3.14159265358979;
constexpr int MAX_SENSORS = 256;

Concurrency & Parallelism (CP.*)

Show full SKILL.md (611 more words)Show less
Key Rules
RuleSummary
CP.2Avoid data races
CP.3Minimize explicit sharing of writable data
CP.4Think in terms of tasks, rather than threads
CP.8Don't use volatile for synchronization
CP.20Use RAII, never plain lock()/unlock()
CP.21Use std::scoped_lock to acquire multiple mutexes
CP.22Never call unknown code while holding a lock
CP.42Don't wait without a condition
CP.44Remember to name your lock_guards and unique_locks
CP.100Don't use lock-free programming unless you absolutely have to
Safe Locking
cpp
// CP.20 + CP.44: RAII locks, always named
class ThreadSafeQueue {
public:
    void push(int value) {
        std::lock_guard<std::mutex> lock(mutex_);  // CP.44: named!
        queue_.push(value);
        cv_.notify_one();
    }

    int pop() {
        std::unique_lock<std::mutex> lock(mutex_);
        // CP.42: Always wait with a condition
        cv_.wait(lock, [this] { return !queue_.empty(); });
        const int value = queue_.front();
        queue_.pop();
        return value;
    }

private:
    std::mutex mutex_;             // CP.50: mutex with its data
    std::condition_variable cv_;
    std::queue<int> queue_;
};
Multiple Mutexes
cpp
// CP.21: std::scoped_lock for multiple mutexes (deadlock-free)
void transfer(Account& from, Account& to, double amount) {
    std::scoped_lock lock(from.mutex_, to.mutex_);
    from.balance_ -= amount;
    to.balance_ += amount;
}
Anti-Patterns
  • volatile for synchronization (CP.8 -- it's for hardware I/O only)
  • Detaching threads (CP.26 -- lifetime management becomes nearly impossible)
  • Unnamed lock guards: std::lock_guard<std::mutex>(m); destroys immediately (CP.44)
  • Holding locks while calling callbacks (CP.22 -- deadlock risk)
  • Lock-free programming without deep expertise (CP.100)

Templates & Generic Programming (T.*)

Key Rules
RuleSummary
T.1Use templates to raise the level of abstraction
T.2Use templates to express algorithms for many argument types
T.10Specify concepts for all template arguments
T.11Use standard concepts whenever possible
T.13Prefer shorthand notation for simple concepts
T.43Prefer using over typedef
T.120Use template metaprogramming only when you really need to
T.144Don't specialize function templates (overload instead)
Concepts (C++20)
cpp
#include <concepts>

// T.10 + T.11: Constrain templates with standard concepts
template<std::integral T>
T gcd(T a, T b) {
    while (b != 0) {
        a = std::exchange(b, a % b);
    }
    return a;
}

// T.13: Shorthand concept syntax
void sort(std::ranges::random_access_range auto& range) {
    std::ranges::sort(range);
}

// Custom concept for domain-specific constraints
template<typename T>
concept Serializable = requires(const T& t) {
    { t.serialize() } -> std::convertible_to<std::string>;
};

template<Serializable T>
void save(const T& obj, const std::string& path);
Anti-Patterns
  • Unconstrained templates in visible namespaces (T.47)
  • Specializing function templates instead of overloading (T.144)
  • Template metaprogramming where constexpr suffices (T.120)
  • typedef instead of using (T.43)

Standard Library (SL.*)

Key Rules
RuleSummary
SL.1Use libraries wherever possible
SL.2Prefer the standard library to other libraries
SL.con.1Prefer std::array or std::vector over C arrays
SL.con.2Prefer std::vector by default
SL.str.1Use std::string to own character sequences
SL.str.2Use std::string_view to refer to character sequences
SL.io.50Avoid endl (use '\n' -- endl forces a flush)
cpp
// SL.con.1 + SL.con.2: Prefer vector/array over C arrays
const std::array<int, 4> fixed_data{1, 2, 3, 4};
std::vector<std::string> dynamic_data;

// SL.str.1 + SL.str.2: string owns, string_view observes
std::string build_greeting(std::string_view name) {
    return "Hello, " + std::string(name) + "!";
}

// SL.io.50: Use '\n' not endl
std::cout << "result: " << value << '\n';

Enumerations (Enum.*)

Key Rules
RuleSummary
Enum.1Prefer enumerations over macros
Enum.3Prefer enum class over plain enum
Enum.5Don't use ALL_CAPS for enumerators
Enum.6Avoid unnamed enumerations
cpp
// Enum.3 + Enum.5: Scoped enum, no ALL_CAPS
enum class Color { red, green, blue };
enum class LogLevel { debug, info, warning, error };

// BAD: plain enum leaks names, ALL_CAPS clashes with macros
enum { RED, GREEN, BLUE };           // Enum.3 + Enum.5 + Enum.6 violation
#define MAX_SIZE 100                  // Enum.1 violation -- use constexpr

Source Files & Naming (SF., NL.)

Key Rules
RuleSummary
SF.1Use .cpp for code files and .h for interface files
SF.7Don't write using namespace at global scope in a header
SF.8Use #include guards for all .h files
SF.11Header files should be self-contained
NL.5Avoid encoding type information in names (no Hungarian notation)
NL.8Use a consistent naming style
NL.9Use ALL_CAPS for macro names only
NL.10Prefer underscore_style names
Header Guard
cpp
// SF.8: Include guard (or #pragma once)
#ifndef PROJECT_MODULE_WIDGET_H
#define PROJECT_MODULE_WIDGET_H

// SF.11: Self-contained -- include everything this header needs
#include <string>
#include <vector>

namespace project::module {

class Widget {
public:
    explicit Widget(std::string name);
    const std::string& name() const;

private:
    std::string name_;
};

}  // namespace project::module

#endif  // PROJECT_MODULE_WIDGET_H
Naming Conventions
cpp
// NL.8 + NL.10: Consistent underscore_style
namespace my_project {

constexpr int max_buffer_size = 4096;  // NL.9: not ALL_CAPS (it's not a macro)

class tcp_connection {                 // underscore_style class
public:
    void send_message(std::string_view msg);
    bool is_connected() const;

private:
    std::string host_;                 // trailing underscore for members
    int port_;
};

}  // namespace my_project
Anti-Patterns
  • using namespace std; in a header at global scope (SF.7)
  • Headers that depend on inclusion order (SF.10, SF.11)
  • Hungarian notation like strName, iCount (NL.5)
  • ALL_CAPS for anything other than macros (NL.9)

Performance (Per.*)

Key Rules
RuleSummary
Per.1Don't optimize without reason
Per.2Don't optimize prematurely
Per.6Don't make claims about performance without measurements
Per.7Design to enable optimization
Per.10Rely on the static type system
Per.11Move computation from run time to compile time
Per.19Access memory predictably
Guidelines
cpp
// Per.11: Compile-time computation where possible
constexpr auto lookup_table = [] {
    std::array<int, 256> table{};
    for (int i = 0; i < 256; ++i) {
        table[i] = i * i;
    }
    return table;
}();

// Per.19: Prefer contiguous data for cache-friendliness
std::vector<Point> points;           // GOOD: contiguous
std::vector<std::unique_ptr<Point>> indirect_points; // BAD: pointer chasing
Anti-Patterns
  • Optimizing without profiling data (Per.1, Per.6)
  • Choosing "clever" low-level code over clear abstractions (Per.4, Per.5)
  • Ignoring data layout and cache behavior (Per.19)

Quick Reference Checklist

Before marking C++ work complete:

  • No raw new/delete -- use smart pointers or RAII (R.11)
  • Objects initialized at declaration (ES.20)
  • Variables are const/constexpr by default (Con.1, ES.25)
  • Member functions are const where possible (Con.2)
  • enum class instead of plain enum (Enum.3)
  • nullptr instead of 0/NULL (ES.47)
  • No narrowing conversions (ES.46)
  • No C-style casts (ES.48)
  • Single-argument constructors are explicit (C.46)
  • Rule of Zero or Rule of Five applied (C.20, C.21)
  • Base class destructors are public virtual or protected non-virtual (C.35)
  • Templates are constrained with concepts (T.10)
  • No using namespace in headers at global scope (SF.7)
  • Headers have include guards and are self-contained (SF.8, SF.11)
  • Locks use RAII (scoped_lock/lock_guard) (CP.20)
  • Exceptions are custom types, thrown by value, caught by reference (E.14, E.15)
  • '\n' instead of std::endl (SL.io.50)
  • No magic numbers (ES.45)

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cpp-coding-standards of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

Used in 4 other repositories

We found 11 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Cpp Coding Standards next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cpp Coding Standards compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cpp Coding Standards this skillaffaan-m/ECC274k4 repos~5.6kAutomated safety check: PassMIT
Code Revieweralirezarezvani/claude-skills28k1 repos~1.6kAutomated safety check: PassMIT
Cpp Coding Standardsxu-xiang/everything-claude-code-zh2k—~4.1kAutomated safety check: PassMIT
Refactor Assistsundial-org/awesome-openclaw-skills663—~523Automated safety check: PassNone
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • Code Reviewer

    alirezarezvani/claude-skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter.

    28k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Cpp Coding Standards

    xu-xiang/everything-claude-code-zh

    基于 C++ 核心指南 (isocpp.github.io) 的 C++ 编码规范。在编写、评审或重构 C++ 代码时使用,以强制执行现代、安全且地道的实践。

    2k GitHub stars~4.1k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Refactor Assist

    sundial-org/awesome-openclaw-skills

    Get refactoring suggestions with colored diffs. An agent skill from sundial-org/awesome-openclaw-skills.

    663 GitHub stars~523 tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Clean Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.

    1.3k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed

More from affaan-m/ECC

All 657 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    274k GitHub starsUsed in 5 repos~1.9k tokens
    Auto-check passed
  • Videodb

    affaan-m/ECC

    Ingest, index, search, edit, and monitor video and audio with the VideoDB Python SDK — upload from files, URLs, or RTSP feeds, build spoken and scene indexes with timestamped search and playable…

    274k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    274k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    274k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    274k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    274k GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Cpp Coding Standards

What does Cpp Coding Standards do?

C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Cpp Coding Standards is an agent skill from affaan-m/ECC.io).

When should I use Cpp Coding Standards?

Cpp Coding Standards fits situations like: refactoring C++ code to enforce modern; idiomatic practices.

How do I install Cpp Coding Standards in Claude Code?

Run `npx skills add affaan-m/ECC --skill cpp-coding-standards -a claude-code`. Or copy the skill folder (skills/cpp-coding-standards in affaan-m/ECC) into .claude/skills/cpp-coding-standards in your project. Claude Code loads it when a task matches its description.

How do I install Cpp Coding Standards in Codex?

Run `npx skills add affaan-m/ECC --skill cpp-coding-standards -a codex`. Or copy the skill folder (skills/cpp-coding-standards in affaan-m/ECC) into .agents/skills/cpp-coding-standards in your project. Codex loads it when a task matches its description.

Can I use Cpp Coding Standards in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill cpp-coding-standards -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cpp-coding-standards, .gemini/skills/cpp-coding-standards, .github/skills/cpp-coding-standards and .opencode/skills/cpp-coding-standards in your project.

What does Cpp Coding Standards need to run?

SKILL.md names no scripts, command-line tools or credentials: Cpp Coding Standards is instructions for the agent only.

Does Cpp Coding Standards access the network?

SKILL.md names 1 domain. As links in the text: isocpp.github.io. This is read from the text; nothing was executed.

Is Cpp Coding Standards safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cpp Coding Standards use?

Cpp Coding Standards is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cpp Coding Standards use?

About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cpp Coding Standards?

Skills that share tags, products or a category with Cpp Coding Standards: Code Reviewer (alirezarezvani/claude-skills, 28k stars), Cpp Coding Standards (xu-xiang/everything-claude-code-zh, 2k stars), Refactor Assist (sundial-org/awesome-openclaw-skills, 663 stars) and Systematic Code Refactoring (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cpp Coding Standards?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 274,360 GitHub stars. The repository holds 657 skills in this directory. The repository was last updated on October 5, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.