Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when writing or refactoring C++: enforce the C++ Core Guidelines house style — snake_case identifiers, trailing-underscore data members, non-ALL_CAPS constants and enumerators, scoped enum class, brace initialization, '\n' over std::endl, using-aliases, and guarded headers — which cheaper models do not do by default.
.claude/skills/cpp-core-guidelines-style/SKILL.md| Model | Lift | Δ tokens | Δ turns | Cases | Verified |
|---|---|---|---|---|---|
| gemini-3.6-flashbest | +48% | +138% | 0% | 23 | 54d ago |
| gemini-3.5-flash | pending re-run | — | |||
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-22 | ✗→✓ | ▲ Improved | — | — |
When you emit C++, name and shape every token the way the C++ Core Guidelines (isocpp.github.io/CppCoreGuidelines) do: lowercase snake_case everywhere, trailing-underscore private members, no ALL_CAPS outside macros, scoped enums, brace initialization, '\n' for newlines, using aliases, guarded headers. The defaults a general model reaches for (PascalCase types, MAX_SIZE constants, std::endl) are the wrong house style here.
This is the closed rule set. Apply every rule that the snippet touches.
struct / enum / alias), free functions, member functions, variables, and parameters are all lowercase words joined by underscores. Never PascalCase, never camelCase. class http_client, void send_request(), int retry_count. A single-word name is simply lowercase: socket, not Socket.
or protected data member ends with exactly one trailing underscore: buffer_, host_, byte_count_. Do not use an m_ prefix, a _ prefix, or Hungarian tags. Public data members of an aggregate struct are snake_case without the trailing underscore.
const/constexprobject is snake_case, never uppercase. Write constexpr int max_retries, not MAX_RETRIES. Reserve ALL_CAPS exclusively for #define macro names (which you should avoid anyway, ES.45/Enum.1).
lowercase: red, not_found, in_progress. Never RED / NOT_FOUND.
enum class, never plain enum (Enum.3). Declare everyenumeration as enum class name { ... };. A bare unscoped enum { ... } leaks its names into the surrounding scope and is forbidden.
using aliases, never typedef (T.43). Type aliases useusing node_id = std::uint64_t;. Never typedef.
object is initialized where it is declared, and scalars / strings / aggregates use brace {} initialization: int count{0};, std::string name{"x"};. Never leave a variable uninitialized; prefer {} over =.
'\n', never std::endl (SL.io.50). End a line of stream outputwith the character '\n'. std::endl forces a flush and must not appear.
#pragma onceor a matching #ifndef X / #define X pair closed by #endif.
using namespace at file scope in a header (SF.7). Never place ausing namespace ...; directive at global or namespace scope inside a header; it pollutes every translation unit that includes it.
Rule 1 — snake_case types and functions
cpp// BEFORE (general-model default) class HttpClient { public: Response SendRequest(const std::string& url); }; // AFTER (Core Guidelines house style) class http_client { public: response send_request(const std::string& url); };
Rule 2 — trailing underscore on private members
cpp// BEFORE class ring_buffer { private: std::vector<int> data; std::size_t head; std::size_t m_tail; // m_ prefix }; // AFTER class ring_buffer { private: std::vector<int> data_; std::size_t head_; std::size_t tail_; };
Rule 3 — constants are not ALL_CAPS
cpp// BEFORE const int MAX_RETRIES = 3; constexpr double TIMEOUT_SECONDS = 2.5; // AFTER constexpr int max_retries{3}; constexpr double timeout_seconds{2.5};
Rules 4 & 5 — scoped enum, lowercase enumerators
cpp// BEFORE enum Color { RED, GREEN, BLUE }; // AFTER enum class color { red, green, blue };
Rule 6 — using, not typedef
cpp// BEFORE typedef std::vector<std::vector<int>> Matrix; // AFTER using matrix = std::vector<std::vector<int>>;
Rule 7 — brace-initialize at declaration
cpp// BEFORE int port = 8080; std::string host; // uninitialized then assigned later // AFTER int port{8080}; std::string host{"localhost"};
Rule 8 — '\n' over std::endl
cpp// BEFORE std::cout << "done" << std::endl; // AFTER std::cout << "done" << '\n';
Rule 9 — guarded header
cpp// BEFORE (no guard) #include <string> class widget { /* ... */ }; // AFTER #pragma once #include <string> class widget { /* ... */ };
Rule 10 — no file-scope using namespace in a header
cpp// BEFORE (in a .h) using namespace std; class parser { string text_; }; // AFTER class parser { std::string text_; };
initializer list: std::vector<int> v{10}; is one element equal to 10. To create ten default elements, use parentheses: std::vector<int> v(10);. This parenthesis case is the one allowed exception to rule 7.
underscore — the underscore marks private state only (rule 2).
assert) stayALL_CAPS — that is exactly what rule 3 reserves caps for.
(T, Iter) per long-standing convention; rule 1 governs ordinary identifiers, not template parameters.
#ifndef guard and #pragma once are interchangeable for rule 9; pickone, do not require both.
class tcp_session { int fd_; }; — Don't: class TcpSession { int m_fd; };constexpr int buffer_size{4096}; — Don't: #define BUFFER_SIZE 4096enum class state { idle, running }; — Don't: enum State { IDLE, RUNNING };using byte_span = std::span<std::byte>; — Don't: typedef ... ByteSpan;std::cout << line << '\n'; — Don't: std::cout << line << std::endl;#pragma once at top of header — Don't: unguarded headerstd::string s{name}; at declaration — Don't: std::string s; then assignPascalCase out of C++ habit — the std library and theseguidelines are snake_case; match them.
MAX_* / DEFAULT_* in caps; caps belong to macros.ALL_CAPS because "that's how enums look" — scopedenumerators are lowercase.
std::endl at the end of a print — use '\n' and flushexplicitly only when you truly need to.
with braces.
enum class; enumerators lowercaseusing, not typedef'\n', never std::endl#pragma once or include guardusing namespace at file scope in a header| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +48 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.5-flash | verified | 7/2/2026 | +100% |
Other measured skills in the registry, with their headline benchmark lift.