code-naming
Skill0 starsChanged 9 months agoMITView on GitHub
Naming decisions for variables, functions, classes, constants, and APIs. Use when choosing names, reviewing naming quality, refactoring unclear names, or establishing naming conventions. Covers descriptive naming, naming as documentation, language-specific conventions, and common naming antipatterns.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- keitakn/engineering-skillstheir own version, first seen Oct 8, 2026
- luabagg/agent-skillstheir own version, first seen Aug 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- keitakn/engineering-skills★ 14same name
- luabagg/agent-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-antipatternsSkill
- code-plan-auditSkill
- code-pruningSkill
- code-quality-foundationsSkill
- code-readabilitySkill
- code-reviewSkill
- code-scope-boundariesSkill
- code-testing-qualitySkill
- code-yagniSkill
- error-handling-patternsSkill
- refactoring-patternsSkill
- software-tradeoffsSkill
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 23
Before committing to a name, verify it answers all three:
- Distinctive: line 29
If a name requires a comment to be understood, the name is wrong.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Code Naming
The Naming Decision Table
| You're naming a... | It should read like... | Form | Examples |
| Class / Type | A noun or noun phrase | PascalCase (most langs) | UserProfile, HttpClient, InvoiceParser |
| Function / Method | A verb or verb phrase | camelCase or snake_case | validateEmail, send_invoice, calculateTotal |
| Boolean | A yes/no question | is/has/can/should prefix | isActive, hasPermission, canRetry |
| Collection | A plural noun | Plural form | users, pendingOrders, activeConnections |
| Constant | A named fact | UPPER_SNAKE_CASE (most langs) | MAX_RETRY_COUNT, DEFAULT_TIMEOUT_MS |
| Interface | A capability or contract | Language-specific | Serializable, IDisposable, Reader |
| Enum | A set of named options | PascalCase values | Color.Red, RetryPolicy.ALLOW_RETRY |
| Event / Callback | What happened or will happen | Past/present tense | onClick, onUserCreated, handleSubmit |
The Three Questions Test
Before committing to a name, verify it answers all three:
- What is it? — The name identifies what the thing represents
- What does it do? — For functions: the action is clear from the name alone
- What are the boundaries? — The name hints at scope, lifetime, or constraints
If a name requires a comment to be understood, the name is wrong.
Naming Antipatterns
Names That Lie
| Antipattern | Problem | Fix |
accountList when it's a Set | Wrong data structure in name | accounts (just use plural) |
processData_v2 | Version control in names | Use version control, not naming |
getUser() that also logs and caches | Name doesn't reveal side effects | fetchAndCacheUser() or split |
isEnabled that modifies state | Query name hides a command | Separate query from mutation |
Names That Don't Try
| Antipattern | Problem | Fix |
data, info, item, thing | Generic to the point of meaningless | Use domain-specific terms |
tmp, val, x beyond tiny scope | Forces reader to track mentally | currentTemperature, retryCount |
manager, handler, processor | Vague role descriptions | Describe what it manages |
utils, helpers, misc | Grab-bag namespaces | Group by domain or operation |
Names That Mislead
| Antipattern | Problem | Fix |
| Inconsistent casing | Readers assume variables are lowercase | Follow language conventions exactly |
Abbreviations (usrRepo, passwd) | Ambiguous unless universally known | Spell it out: userRepository, password |
Noise words (UserData vs UserInfo) | Indistinguishable without reading code | Pick one and be consistent |
Negated booleans (isNotActive) | Double negatives in conditions | Use positive: isActive |
Names That Over-Specify
| Antipattern | Problem | Fix |
Hungarian notation (strName, iCount) | Type system already encodes types | Just name, count |
Gratuitous prefix (GSDAccountService) | Every class in app has same prefix | Use namespaces/packages |
AbstractBase + Impl suffix | Naming the pattern not the concept | UserService + DefaultUserService |
Decision Checklist
- Name reveals intent without needing a comment
- Name uses domain vocabulary where applicable
- Name follows language/project conventions
- Name is distinguishable from similar names nearby
- Boolean names read as yes/no questions
- Function names describe the action (verb phrases)
- Class names describe the thing (noun phrases)
- No abbreviations unless universally understood (
URL,HTTP,API)
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.

