Agent skill

Google Cpp Style

by ClickHouse in ClickHouse/pg_stat_ch

Google C++ Style Guide rules for writing clean, maintainable C++ code.

Apache-2.0Auto-check passedWriting & Content

Install Google Cpp Style

skills CLI
$ npx skills add ClickHouse/pg_stat_ch --skill google-cpp-style -a claude-code

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

GitHub CLI
$ gh skill install ClickHouse/pg_stat_ch google-cpp-style --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/ClickHouse/pg_stat_ch.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/google-cpp-style .claude/skills/google-cpp-style && 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
google-cpp-style
GitHub stars
124
Token cost
~951 tokens
SKILL.md length
246 words
Files
9
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Google C++ Style Guide rules for writing clean, maintainable C++ code.

  • Works in 3 steps: Optimize for the reader - Code is read… → Be consistent - Follow existing patterns… → Avoid surprising constructs - Prefer…
  • Discussing naming conventions
  • SKILL.md covers Quick Reference, Core Principles, Target Version and Detailed References, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Google Cpp Style is an agent skill from ClickHouse/pg_stat_ch. Google C++ Style Guide rules for writing clean, maintainable C++ code. Use when writing C++, reviewing code, discussing naming conventions, formatting, class design, or any C++ best practices. Covers headers, scoping, classes, functions, naming, comments, and formatting.

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `classes.md`, `comments.md` and `features.md`).

It sits in Writing & Content. It works with C++, ClickHouse and PostgreSQL. The licence is Apache-2.0.

When your agent uses it

  • Discussing naming conventions
  • Any C++ best practices

Example prompts

  • “/google-cpp-style”

Workflow steps

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

  1. Optimize for the reader - Code is read more than written
  2. Be consistent - Follow existing patterns in the codebase
  3. Avoid surprising constructs - Prefer clear over clever

What it can do on your machine

Read from SKILL.md and the folder at commit 10be897. 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

    No URLs in SKILL.md.

    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

Google Cpp Style loads about 951 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 246 words of instructions outside code blocks.

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

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 ClickHouse/pg_stat_ch at commit 10be897, republished under its Apache-2.0 licence (© ClickHouse). 246 words, ~951 tokens.

Download SKILL.mdSave it as .claude/skills/google-cpp-style/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
google-cpp-style
description
Google C++ Style Guide rules for writing clean, maintainable C++ code. Use when writing C++, reviewing code, discussing naming conventions, formatting, class design, or any C++ best practices. Covers headers, scoping, classes, functions, naming, comments, and formatting.

Google C++ Style Guide

This skill provides the complete Google C++ Style Guide for C++20. Apply these rules when writing or reviewing C++ code.

Quick Reference

TopicKey Rules
NamingTypes: PascalCase, functions: PascalCase, variables: snake_case, constants: kPascalCase, macros: UPPER_CASE
Formatting80 char lines, 2-space indent, spaces (not tabs), { on same line
HeadersSelf-contained, #define guards, include what you use
ClassesPrefer composition over inheritance, explicit constructors, private data members

Core Principles

  1. Optimize for the reader - Code is read more than written
  2. Be consistent - Follow existing patterns in the codebase
  3. Avoid surprising constructs - Prefer clear over clever

Target Version

Code should target C++20. Do not use C++23 features or non-standard extensions.

Detailed References

For complete rules on specific topics:

  • Header Files - Include guards, ordering, forward declarations
  • Scoping - Namespaces, linkage, static/global variables
  • Classes - Constructors, inheritance, operator overloading
  • Functions - Parameters, overloading, default arguments
  • C++ Features - Smart pointers, exceptions, RTTI, lambdas
  • Naming - All naming conventions with examples
  • Comments - Documentation style and requirements
  • Formatting - Whitespace, braces, line length

Common Patterns

Header File Template
cpp
#ifndef PROJECT_PATH_FILE_H_
#define PROJECT_PATH_FILE_H_

#include "project/public/header.h"

#include <sys/types.h>

#include <string>
#include <vector>

#include "other/library.h"
#include "project/internal.h"

namespace project {

class MyClass {
 public:
  MyClass();
  explicit MyClass(int value);

  void DoSomething();
  int count() const { return count_; }
  void set_count(int count) { count_ = count; }

 private:
  int count_;
};

}  // namespace project

#endif  // PROJECT_PATH_FILE_H_
Class Declaration Order
cpp
class MyClass {
 public:
  // Types and type aliases
  using ValueType = int;

  // Static constants
  static constexpr int kMaxSize = 100;

  // Constructors and assignment
  MyClass();
  MyClass(const MyClass&) = default;
  MyClass& operator=(const MyClass&) = default;

  // Destructor
  ~MyClass();

  // All other methods
  void Process();

 protected:
  // Protected members (if needed)

 private:
  // Private methods
  void InternalHelper();

  // Data members
  int value_;
};
Function Comments
cpp
// Returns an iterator positioned at the first entry >= `start_word`.
// Returns nullptr if no such entry exists.
// The client must not use the iterator after the table is destroyed.
std::unique_ptr<Iterator> GetIterator(absl::string_view start_word) const;

Critical Rules Summary

Always Do
  • Use #define guards in all headers
  • Make single-argument constructors explicit
  • Use nullptr (not NULL or 0) for pointers
  • Use override or final for virtual function overrides
  • Declare data members private
  • Initialize variables at declaration
Never Do
  • Use using namespace directives
  • Use C-style casts (use static_cast, etc.)
  • Use exceptions (in Google code)
  • Use non-standard extensions
  • Define macros in headers (when possible)
  • Use std::auto_ptr (use std::unique_ptr)

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

Files

SKILL.md and 8 other files in .claude/skills/google-cpp-style of ClickHouse/pg_stat_ch.

  • SKILL.md
  • classes.md
  • comments.md
  • features.md
  • formatting.md
  • functions.md
  • headers.md
  • naming.md
  • scoping.md

Open the folder on GitHubat commit 10be897

Compare with similar skills

Google Cpp Style 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.

Google Cpp Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Google Cpp Style this skillClickHouse/pg_stat_ch124—~951Automated safety check: PassApache-2.0
Chdb Datastorevemetric/vemetric3942 repos~1.4kAutomated safety check: PassApache-2.0
Translationdoxygen/doxygen6.6k—~5.2kAutomated safety check: PassGPL-2.0
PgjevrealZachi/pg-jev1k—~2.9kAutomated safety check: PassCustom licence
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Observal AdminObserval/Observal4.1k—~774Automated safety check: PassApache-2.0

Similar skills

  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Translation

    doxygen/doxygen

    Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…

    6.6k GitHub stars~5.2k tokensUpdated 7 days ago
    Writing & ContentAuto-check passed
  • Pgjev

    realZachi/pg-jev

    Install, configure, query and explain pgjev (the jev PostgreSQL extension that filters, ranks and classifies rows with plain-language conditions via TypeSafe's Jev model).

    1k GitHub stars~2.9k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Observal Admin

    Observal/Observal

    Administers Observal users, settings, diagnostics, review queues, security events, audit logs, SAML, SCIM, the local Observal server, its upgrades and rollback, and its own PostgreSQL and ClickHouse…

    4.1k GitHub stars~774 tokensUpdated today
    DatabasesAuto-check passed
  • Git PR Flow

    wgzhao/Addax

    Standard branch, commit, and pull-request workflow for this repo.

    1.4k GitHub stars~216 tokensUpdated today
    DevelopmentAuto-check passed

More from ClickHouse/pg_stat_ch

  • Cpp Header Template

    ClickHouse/pg_stat_ch

    Generate C++ header files following Google Style Guide. An agent skill from ClickHouse/pg_stat_ch.

    124 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed
  • Cpp Naming Check

    ClickHouse/pg_stat_ch

    Check C++ naming conventions against Google Style Guide. An agent skill from ClickHouse/pg_stat_ch.

    124 GitHub stars~701 tokensUpdated yesterday
    Auto-check passed
  • Cpp Review

    ClickHouse/pg_stat_ch

    Review C++ code against Google C++ Style Guide. An agent skill from ClickHouse/pg_stat_ch.

    124 GitHub stars~609 tokensUpdated yesterday
    Auto-check passed
  • Create New Release

    ClickHouse/pg_stat_ch

    Create and push a new semver release tag. An agent skill from ClickHouse/pg_stat_ch.

    124 GitHub stars~488 tokensUpdated yesterday
    Auto-check passed

Questions about Google Cpp Style

What does Google Cpp Style do?

Google C++ Style Guide rules for writing clean, maintainable C++ code. Google Cpp Style is an agent skill from ClickHouse/pg_stat_ch. Google C++ Style Guide rules for writing clean, maintainable C++ code.

When should I use Google Cpp Style?

Google Cpp Style fits situations like: discussing naming conventions; any C++ best practices.

How do I install Google Cpp Style in Claude Code?

Run `npx skills add ClickHouse/pg_stat_ch --skill google-cpp-style -a claude-code`. Or copy the skill folder (.claude/skills/google-cpp-style in ClickHouse/pg_stat_ch) into .claude/skills/google-cpp-style in your project. Claude Code loads it when a task matches its description.

How do I install Google Cpp Style in Codex?

Run `npx skills add ClickHouse/pg_stat_ch --skill google-cpp-style -a codex`. Or copy the skill folder (.claude/skills/google-cpp-style in ClickHouse/pg_stat_ch) into .agents/skills/google-cpp-style in your project. Codex loads it when a task matches its description.

Can I use Google Cpp Style 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 ClickHouse/pg_stat_ch --skill google-cpp-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/google-cpp-style, .gemini/skills/google-cpp-style, .github/skills/google-cpp-style and .opencode/skills/google-cpp-style in your project.

What does Google Cpp Style need to run?

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

Does Google Cpp Style access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Google Cpp Style 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 Google Cpp Style use?

Google Cpp Style is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Google Cpp Style use?

About 951 tokens (SKILL.md is roughly 3.8k 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 Google Cpp Style?

Skills that share tags, products or a category with Google Cpp Style: Chdb Datastore (vemetric/vemetric, 394 stars), Translation (doxygen/doxygen, 6.6k stars), Pgjev (realZachi/pg-jev, 1k stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Google Cpp Style?

ClickHouse (a GitHub organization) maintains it in ClickHouse/pg_stat_ch, which has 124 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

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