cpp-review

Review C++ code against Google C++ Style Guide. Use when reviewing C++ code, pull requests, or when asked to check code style compliance.

clickhouse/pg_stat_ch1 installsApache-2.0Synced Aug 25

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: cpp-review
description: Review C++ code against Google C++ Style Guide. Use when reviewing C++ code, pull requests, or when asked to check code style compliance.
license: Apache-2.0
---

# C++ Code Review (Google Style)

Review C++ code for compliance with the Google C++ Style Guide.

## Review Checklist

### Naming
- [ ] Types use `PascalCase`
- [ ] Functions use `PascalCase` (accessors use `snake_case`)
- [ ] Variables use `snake_case`
- [ ] Class members have trailing underscore: `member_`
- [ ] Constants use `kPascalCase`
- [ ] Macros use `UPPER_CASE` with project prefix

### Headers
- [ ] Has `#define` guard: `PROJECT_PATH_FILE_H_`
- [ ] Self-contained (includes all dependencies)
- [ ] Includes ordered: related header, C system, C++ stdlib, other libs, project
- [ ] No forward declarations unless necessary

### Classes
- [ ] Single-argument constructors are `explicit`
- [ ] Data members are `private`
- [ ] Copy/move semantics explicit (= default, = delete)
- [ ] No virtual calls in constructors
- [ ] Uses composition over inheritance when appropriate

### Functions
- [ ] Returns values instead of output parameters when possible
- [ ] Parameters ordered: inputs before outputs
- [ ] Functions are ≤40 lines (prefer smaller)
- [ ] Uses `override`/`final` for virtual overrides

### Modern C++
- [ ] Uses `nullptr` (not `NULL` or `0`)
- [ ] Uses C++ casts (not C-style)
- [ ] Uses range-based for loops where appropriate
- [ ] Uses `auto` appropriately (not excessively)
- [ ] Smart pointers for ownership (`unique_ptr`, `shared_ptr`)

### Formatting
- [ ] 80 character line limit
- [ ] 2-space indent
- [ ] Braces on same line as control structures
- [ ] Spaces around binary operators

## Feedback Format

Use severity levels:

- 🔴 **MUST FIX**: Style violations or bugs that must be fixed
- 🟡 **SHOULD FIX**: Strong recommendations for improvement
- 🟢 **CONSIDER**: Optional enhancements or suggestions

## Example Review Comment

```
🔴 **MUST FIX**: Missing `explicit` on single-argument constructor
Line 45: `Foo(int value)` should be `explicit Foo(int value)` to prevent
implicit conversions.

🟡 **SHOULD FIX**: Function too long
Lines 78-145: `ProcessData()` is 67 lines. Consider breaking into smaller
functions for readability and testability.

🟢 **CONSIDER**: Use structured bindings
Line 23: `auto [iter, success] = map.insert({key, value});` would be clearer
than separate `.first` and `.second` access.
```

More Code Review skills

pr-to-video

heygen-com/hyperframes

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

178.9k

receiving-code-review

obra/superpowers

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

178.0k

public-relations

coreyhaines31/marketingskills

When the user wants help with public relations, earned media, press coverage, journalist outreach, or media strategy (not pull requests). Also use when the user mentions 'PR,' 'public relations,' 'press,' 'press release,' 'press coverage,' 'media outreach,' 'pitch a journalist,' 'get featured,' 'media list,' 'media kit,' 'press kit,' 'newsjacking,' 'news hijack,' 'HARO,' 'Qwoted,' 'Featured,' 'Help A Reporter,' 'reporter request,' 'tech press,' 'TechCrunch,' 'earned media,' 'thought leadership placement,' 'op-ed,' 'guest article,' 'press contacts,' 'podcast prep,' 'going on a podcast,' 'podcast guest,' 'prep me for this podcast,' or 'how do I get press.' Use this for earned media work — finding journalists, pitching stories, newsjacking, prepping podcast appearances, and responding to press requests. For startup/SaaS/AI directory submissions, see directory-submissions. For product launches, see launch. For social-media engagement, see social. For cold-email outreach to prospects, see cold-email.

33.1k

← All Code Review skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY