naming-conventions — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited naming-conventions (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
What it is: Naming conventions are the rules that make artifact names truthful, predictable, and searchable across code, routes, data, configuration, and documentation-adjacent developer surfaces.
Mental model: A name is a compact contract: artifact kind decides casing, grammar decides the role of each word, and verbs/nouns promise behavior. A good name lets the reader infer what the artifact does before opening the implementation.
Why it exists: Names are read far more often than they are written. Choosing them deliberately prevents hidden cost: stale domain words, false verb promises, casing inconsistency, and missed references during renames.
What it is NOT: It is not whole-code refactoring, whole-diff code review, prose style guidance, product microcopy, or debugging a failed behavior after the name has already misled someone.
Adjacent concepts: Semantics, linguistics, refactor, code-review, debugging, version-control, and information architecture.
One-line analogy: Naming is like labeling circuit breakers: a short label is useful only when it truthfully names the circuit it controls.
Common misconception: Naming is not cosmetic. A misleading identifier creates a wrong model in every caller and reader, even when the code compiles.
get vs fetch vs load), plural vs singular for collections, prefix/suffix conventions (is / has / should for booleans, use for React hooks)url, id, api), when it requires expansion (cust → customer), and when team-internal jargon must be avoided in public-facing namesgetX that also writes; the boolean called isReady that means "should be ready"; the column called created that stores the ship date)customer_id and TypeScript type Customer.id)Names are the most-read part of any codebase. Every reader pays the cost of a bad name; only the author pays the cost of choosing well. The single most valuable property of a name is truthfulness: a name that lies — about what an artifact does, returns, or means — is more harmful than a name that is merely unclear. The second-most-valuable property is consistency with sibling names: a function called getOrders should sit alongside getCustomers, not loadCustomers. The third is brevity, and only the third — short names that mislead are not a virtue.
When a name does not fit, the answer is almost always to rename, not to add a comment explaining what the name "really" means. Comments rot; renames travel with the code.
Casing is project-convention-driven for the artifacts where languages don't enforce it, and language-mandated for the rest. Pick the convention once, document it in the project's CONTRIBUTING or AGENTS file, and apply it everywhere.
| Artifact | Convention | Example |
|---|---|---|
| File name (any) | kebab-case | order-pricing.ts, webhook-handler.py |
| URL path segment | kebab-case | /api/order-pricing |
| CLI flag | kebab-case | --include-template |
| JS/TS variable, function, parameter | camelCase | orderTotal, calculateMargin() |
| JS/TS type, class, interface, React component | PascalCase | Order, OrderPricing, <OrderRow/> |
| Python variable, function | snake_case | order_total, calculate_margin |
| Python class | PascalCase | Order, OrderPricing |
| SQL table name | snake_case (lowercase) | orders, order_line_items |
| SQL column name | snake_case | created_at, customer_id |
| Environment variable | SCREAMING_SNAKE_CASE | STRIPE_SECRET_KEY, NODE_ENV |
| Constant in code | SCREAMING_SNAKE_CASE | MAX_RETRIES, DEFAULT_TIMEOUT_MS |
| Boolean variable / function | is* / has* / should* / can* prefix | isAdmin, hasReceipt, shouldRetry |
| React hook | use* prefix (mandatory) | useOrders, useDebounce |
| Predicate function | verb in interrogative form | validateEmail(), isValidEmail() |
The verb you pick encodes a contract. Choose deliberately.
| Verb | Implies | Wrong when |
|---|---|---|
get | Pure read; cheap; never mutates; idempotent | The function writes, calls an API, or has any side effect |
fetch | Network or I/O read; may fail; may be slow | The function reads from local memory or never crosses a boundary |
load | Read-and-cache, or read-from-disk; one-shot | The function returns synchronously from already-loaded data |
compute / calculate | Pure transformation of inputs | The function takes no inputs or returns I/O |
validate | Returns boolean OR throws; no side effects | The function modifies the input or has hidden side effects |
assert | Throws on failure; void return on success | The function returns a value or has a happy non-throwing path |
parse | String → structured data; may throw on malformed input | The function takes structured data or never throws |
format | Structured data → string | The function returns structured data |
create | Allocates/persists a new entity; returns its identity | The function returns a transient value with no persisted identity |
update | Modifies an existing entity by identity | The function inserts or replaces |
delete / remove | Removes an entity from the system | The function only removes from a transient view |
The single most common naming bug is getX that also writes. If the function has a side effect, the verb must be one that implies side effects (save, apply, commit, flush, record).
A name lies when its words promise behaviour the code does not deliver. Detecting these costs nothing at authoring time and saves real debugging time later.
getThing() that calls a remote API, validate() that throws, parse() that returns null on failure (it should throw or be renamed tryParse).isInvalid set to true to mean valid; the codebase will eventually have if (!isInvalid) and someone will read it backwards. Use isValid and invert the value.getOrder() that returns Order | undefined. The caller has no way to know the function can return undefined without reading the implementation. Either rename to findOrder() (convention: "find" allows null return) or change to getOrderOrThrow().created that, after a migration, now stores the ship date. The name predates the meaning. Rename the column AND all of its callers in the same commit.User but the domain glossary says Account. Pick one in the glossary and rename in code.Renaming is a small change that touches many places. Do all of them in one commit; ship none of them piecemeal.
grep -rn "OldName" --include="*.ts" --include="*.tsx" --include="*.md" (and equivalent for your language). Don't trust IDE rename — it misses dynamic references and string literals.get is cheap, fetch may fail, compute is pure)isValid not isInvalid)getOrders with loadCustomers)| Use instead | When |
|---|---|
refactor | Restructuring already-named code (extract function, inline variable, split file) — naming may change as a side effect of the refactor |
documentation | Writing prose explanation of a naming convention — this skill makes the choice; documentation explains it |
code-review | Evaluating a whole PR — naming is one of many concerns the reviewer covers |
debugging | Investigating why a misnamed identifier produces wrong behaviour — debugging chases the bug; naming-conventions prevents the next one |
<!-- skill-graph-context:start (generated — do not edit by hand) -->
Classification
software-engineering-methodtrueengineering/namingWhen to use
isValidUser or validateUser the right name for this guard?getThing but it also writes to disk — rename itResult but it's specifically the order-pricing result — renameuse or just call it subscribeOrders?User and UserAccount and AccountUser — which means what?created but it stores the ship dateNot for
userIsActive is logging the wrong valueRelated skills
code-review, canonical-repo-structurecode-review, skill-scaffold, pattern-recognition, semanticsConcept
getOrder() that returns undefined, validate() that mutates input, or created that stores a ship date will eventually cause wrong assumptions.Keywords
naming, naming convention, name a file, name a function, name a variable, name a type, rename, identifier, kebab case, camel case<!-- skill-graph-context:end -->
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.