Reviews and improves **names** in code — variables, functions, classes, modules, parameters — for clarity, intent, and consistency with language/team conventions. Triggers when asked to review names, rename things, improve code readability, clean up confusing code, or when examining code with generic/vague names like "data", "info", "manager", "temp", "util". Does NOT trigger for general code review unrelated to naming, architecture design, debugging, or performance optimization. Identifies naming anti-patterns (generic names, misleading names, type-encoding, abbreviations), suggests role-based names that reveal intent, checks consistency with project/domain vocabulary, and flags misalignment with language culture.
91
90%
Does it follow best practices?
Impact
94%
1.05xAverage score across 5 eval scenarios
Passed
No known issues
C++ has more variation in naming conventions than most languages because of its long history, multiple major style guides, and lack of a single official formatter. Always check the project's existing style first.
| Guide | Convention | Domains |
|---|---|---|
| Google Style | snake_case for variables/functions, PascalCase for types | Chromium, Google projects |
| LLVM/Clang | camelCase for variables, PascalCase for types | LLVM, Clang, Swift |
| Boost | snake_case with _t suffix for types | Boost libraries |
| Qt | camelCase methods, PascalCase classes prefixed with Q | Qt framework |
| Microsoft | PascalCase for public, camelCase for private with m_ prefix | Windows, .NET interop |
| Standard Library | snake_case, lower-case types | std::vector, std::sort |
| Thing | Convention | Example |
|---|---|---|
| Variable | snake_case | user_name, total_count |
| Function / method | snake_case | calculate_total(), get_user() |
| Class / struct / enum | PascalCase | CustomerOrder, HttpClient |
| Template parameter | PascalCase | template <typename T> |
| Macro | SCREAMING_SNAKE_CASE | ASSERT_TRUE(x), PI |
| Constant / constexpr | kPascalCase or SCREAMING_SNAKE | kMaxRetryCount, BUFFER_SIZE |
| Namespace | snake_case | order_processing, net::http |
| Member variable | snake_case_ (trailing _) or m_snake_case | name_, m_count |
| Getter / setter | snake_case matching member | name(), set_name() |
| Boolean predicate | is_ / has_ / can_ prefix | is_empty(), has_next() |
name_) or m_ prefix (m_name)get_: user.name() not user.get_name()set_ prefix: user.set_name("Alice")is_, has_, can_: container.is_empty(), socket.has_data()_ prefix for private members — reserved for implementation by the standardSCREAMING_SNAKE and should be rare — prefer constexpr or templatesT, K, V), PascalCase for descriptive (TEntity, Allocator)strName, pBuffer prefixesauto type deduction doesn't change naming rules — still name by role| Bad | Good | Reason |
|---|---|---|
char* pszName | std::string name | Legacy Hungarian; modern C++ uses types |
void DoSomething() | void do_something() or void ProcessOrder() | Pick one style and stick to it |
int tmp | int scratch / int buffer_size | tmp doesn't express role |
obj / ptr | item / node / handle | Type-encoding without meaning |
data | records, entries, results | Generic — what data? |
i, j, k outside loops | index, row, col | Fine for loops; bad for wider scope |