A Claude Code plugin that brings the Google C++ Style Guide into your AI-assisted C++ development workflow.
Includes:
- Skills — invoke on demand: style guide reference, testing patterns, build error resolution, and code review
- Rules — auto-loaded coding style, hooks, patterns, security, and testing guidance for C++ files
claude plugin marketplace add https://github.com/tatsu/gglcppclaude plugin install gglcpp@gglcppIn any Claude Code session, invoke it with:
/gglcpp:google-cpp-style-guide
Or reference it in your prompts:
Review this C++ code against the Google C++ Style Guide.
Note: Claude Code does not automatically install rules from plugins. You must copy the rule files manually into your project or global rules directory.
Rules are installed under gglcpp/cpp/ to avoid conflicts with any existing cpp/ rules you may have in place.
mkdir -p .claude/rules/gglcpp/cpp
for f in coding-style hooks patterns security testing; do
curl -fsSL \
"https://raw.githubusercontent.com/tatsu/gglcpp/main/rules/cpp/${f}.md" \
-o ".claude/rules/gglcpp/cpp/${f}.md"
donemkdir -p ~/.claude/rules/gglcpp/cpp
for f in coding-style hooks patterns security testing; do
curl -fsSL \
"https://raw.githubusercontent.com/tatsu/gglcpp/main/rules/cpp/${f}.md" \
-o "${HOME}/.claude/rules/gglcpp/cpp/${f}.md"
donegit clone https://github.com/tatsu/gglcpp.git
# Project-local:
cp -r gglcpp/rules/cpp .claude/rules/gglcpp/cpp
# Or global:
cp -r gglcpp/rules/cpp ~/.claude/rules/gglcpp/cpp| File | Invoke as | Description |
|---|---|---|
skills/google-cpp-style-guide/SKILL.md |
/gglcpp:google-cpp-style-guide |
Full Google C++ Style Guide reference with examples |
skills/google-cpp-testing/SKILL.md |
/gglcpp:google-cpp-testing |
GoogleTest/GMock setup, fixtures, mocking, sanitizers, and coverage |
skills/google-cpp-build/SKILL.md |
/gglcpp:google-cpp-build |
Incremental build error resolution (CMake, cpplint, clang-tidy) |
skills/google-cpp-review/SKILL.md |
/gglcpp:google-cpp-review |
Code review for memory safety, concurrency, and Google Style compliance |
| File | Description |
|---|---|
rules/cpp/coding-style.md |
Naming, headers, classes, formatting summary |
rules/cpp/hooks.md |
cpplint, clang-format, clang-tidy hook configurations |
rules/cpp/patterns.md |
RAII, smart pointers, error handling, composition |
rules/cpp/security.md |
Memory safety, buffer safety, UB prevention, input validation |
rules/cpp/testing.md |
GoogleTest setup, fixtures, mocking, sanitizers, coverage |
Rules are loaded automatically when Claude Code detects C++ files (*.cpp, *.h, *.cc, etc.).
Create .clang-format at your project root:
BasedOnStyle: GoogleApply:
clang-format -style=Google -i src/**/*.cpp src/**/*.hpip install cpplint
cpplint --recursive src/Create .clang-tidy at your project root:
Checks: "google-*,modernize-*,bugprone-*,readability-*"
WarningsAsErrors: "google-*"Run:
clang-tidy src/*.cpp -- -std=c++20This plugin targets C++20. C++23 features and non-standard extensions are not covered.
Rules and skill content is derived from the Google C++ Style Guide, which is licensed under CC-BY 3.0.
The content was based on the following upstream commit (no release tag was available):
| Field | Value |
|---|---|
| Repository | https://github.com/google/styleguide |
| Commit | 3c5c895 |
| Message | Update C++ style guide (#971) |
CC-BY 3.0 — same license as the Google C++ Style Guide.
See CONTRIBUTING.md.
See SECURITY.md.