cpp-naming-check
Skill129 starsChanged 8 months agoApache-2.0View on GitHub
Check C++ naming conventions against Google Style Guide. Use when checking if names follow conventions or when renaming identifiers.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cpp-header-templateSkill
- cpp-reviewSkill
- create-new-releaseSkill
- google-cpp-styleSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Verify names follow Google C++ Style Guide conventions.
- Distinctive: line 73
Check for consistency with surrounding code
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
// 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_DEBUGAbbreviations
- OK: Listed in Wikipedia or universally known (
i,n,id,url) - Capitalize as word:
StartRpc()notStartRPC() - Don't delete letters:
customernotcstmr
Check Process
- Identify the entity type (class, function, variable, etc.)
- Apply the corresponding naming rule
- Check for consistency with surrounding code
- Flag any Hungarian notation or other outdated styles
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

