Skip to content
Skills Library
Programming · Review & audit

cpp-naming-check

/cpp-naming-check

Check C++ naming conventions against Google Style Guide. Use when checking if names follow conventions or when renaming identifiers.

Repository
pg_stat_ch ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Check C++ naming conventions against Google Style Guide. Use when checking if names follow conventions or when renaming identifiers.

Original author description

Check C++ naming conventions against Google Style Guide. Use when checking if names follow conventions or when renaming identifiers.

How it works

  1. Naming Rules Quick Check
  2. Common Mistakes
  3. Abbreviations
  4. Check Process
Original SKILL.md headings · 71 lines, 378 words
SKILL.md preview
---
name: cpp-naming-check
description: Check C++ naming conventions against Google Style Guide. Use when checking if names follow conventions or when renaming identifiers.
---

# C++ Naming Convention Checker

Verify names follow Google C++ Style Guide conventions.

## Naming Rules Quick Check

| Entity | Convention | Pattern | Examples |
|--------|------------|---------|----------|
| Files | lowercase + `_` or `-` | `snake_case.cc` | `my_class.cc`, `http-parser.h` |
| Classes | PascalCase | `[A-Z][a-zA-Z0-9]*` | `MyClass`, `UrlParser` |
| Structs | PascalCase | `[A-Z][a-zA-Z0-9]*` | `Point`, `HttpRequest` |
| Type aliases | PascalCase | `[A-Z][a-zA-Z0-9]*` | `DataMap`, `StringList` |
| Enums | PascalCase | `[A-Z][a-zA-Z0-9]*` | `ErrorCode`, `State` |
| Enumerators | kPascalCase | `k[A-Z][a-zA-Z0-9]*` | `kOk`, `kNotFound` |
| Functions | PascalCase | `[A-Z][a-zA-Z0-9]*` | `ProcessData()`, `GetValue()` |
| Accessors | snake_case | `[a-z][a-z0-9_]*` | `count()`, `set_count()` |
| Variables | snake_case | `[a-z][a-z0-9_]*` | `table_name`, `num_items` |
| Class members | snake_case_ | `[a-z][a-z0-9_]*_` | `value_`, `data_map_` |
| Struct members | snake_case | `[a-z][a-z0-9_]*` | `width`, `height` |
| Constants | kPascalCase | `k[A-Z][a-zA-Z0-9]*` | `kMaxSize`, `kPi` |
| Macros | UPPER_CASE | `[A-Z][A-Z0-9_]*` | `MY_MACRO`, `DEBUG_LOG` |
| Namespaces | snake_case | `[a-z][a-z0-9_]*` | `my_project`, `internal` |
| Template params | Varies | Type=`T`, value=`n` | `T`, `InputIterator`, `N` |

## Common Mistakes

### ❌ Wrong → ✅ Correct

```cpp
// Classes
class myClass;        → class MyClass;
class HTTPParser;     → class HttpParser;  // Treat acronyms as words

// Variables
int TableName;        → int table_name;
int tablename;        → int table_name;    // Use underscores

// Class members
int value;            → int value_;        // Trailing underscore
int m_value;          → int value_;        // No Hungarian notation

// Functions
void process_data();  → void ProcessData();
void getValue();      → void GetValue();   // Or get_value() if accessor

// Constants
const int MAX_SIZE;   → const int kMaxSize;
const int maxSize;    → const int kMaxSize;

// Enumerators
enum { ERROR_OK };    → enum { kErrorOk };
enum { Ok };          → enum { kOk };

// Macros (must be UPPER_CASE with prefix)
#define DEBUG         → #define MYPROJECT_DEBUG
```

## Abbreviations

- **OK**: Listed in Wikipedia or universally known (`i`, `n`, `id`, `url`)
- **Capitalize as word**: `StartRpc()` not `StartRPC()`
- **Don't delete letters**: `customer` not `cstmr`

## Check Process

1. Identify the entity type (class, function, variable, etc.)
2. Apply the corresponding naming rule
3. Check for consistency with surrounding code
4. Flag any Hungarian notation or other outdated styles

Versions

The database has no other skills named cpp-naming-check.

Database snapshot: 13.11.2026 · package version c16007da2dbb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100google-cpp-style
    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.
  • 100cpp-review
    Review C++ code against Google C++ Style Guide. Use when reviewing C++ code, pull requests, or when asked to check code style compliance.
  • 100r-style-guide
    R style guide covering naming conventions, spacing, layout, and function design best practices. Use when writing R code.
  • 100angular-style-guide
    Naming conventions, file structure, and coding standards for Angular projects. Use for Angular-specific naming and organization; defer language-only TypeScript naming questions.
  • 95cpp-style
    Applies C++ coding conventions when writing, reviewing, or refactoring code. Covers .h, .hpp, and .cpp files, Doxygen documentation, naming, formatting, error handling, includes, file ordering, template patterns, embedded (Arduino/PlatformIO) conventions, and Python C++…
  • 100rust-style-guide-audit
    Audit Rust code against the Google Rust Style Guide (google.github.io/styleguide/rustguide.html) and propose concrete refactors. Use when asked to check Rust code against the Google Rust style guide, run a Rust style/lint/antipattern audit, find violations of Google's Rust…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.