Naming conventions for AI generated code matter because AI generates plausible names that often miss meaning. Four naming patterns transform AI code from technically correct to readable: descriptive over generic, consistent verb prefixes for functions, plural nouns for collections, and meaningful boolean prefixes (is, has, can). Adding these to CLAUDE.md and code review produces code that future you and team members can understand without reverse engineering.
This tutorial walks through the four naming patterns, what AI defaults look like, how to enforce conventions, and the four mistakes builders make with naming.
Why Naming Matters Specifically For AI Code
Naming matters specifically for AI code because AI generates code volume faster than humans can review carefully. Bad names accumulate at AI scale; accumulation makes code unreadable.
The 2026 reality is that AI generated names are often technically correct (data, item, thing, value) but semantically empty. Empty names produce code that requires reading implementation to understand intent.
A 2025 code readability study of 200 vibe coded projects found that projects with enforced naming conventions had 52 percent faster code review times than projects without conventions. Naming clarity measurably affects review and maintenance speed.
The pattern to copy is the way medical professionals use precise terminology. "Patient experiencing acute thoracic discomfort" beats "patient feeling chest pain" for clinical communication. Code naming follows the same principle; precise names communicate intent.
The Four Naming Patterns That Matter
Four patterns transform AI naming defaults.
Pattern 1, descriptive over generic. "userEmail" beats "data". "calculateMonthlyRevenue" beats "compute". Specific names communicate intent.
Pattern 2, consistent verb prefixes for functions. "get" for retrieval, "set" for assignment, "is" for booleans, "handle" for events. Consistency aids recognition.

Pattern 3, plural nouns for collections. "users" for array, "user" for single. Plurality matches data shape.
Pattern 4, boolean prefixes (is, has, can). "isLoading", "hasPermission", "canEdit". Prefix immediately communicates type.
What AI Default Names Look Like
AI defaults follow predictable patterns that produce readability problems.
Default 1, generic placeholder names. data, item, thing, value, result. Names mean nothing without context.
Browse more ship articles
Read more shipDefault 2, inconsistent verbs. "getUser" in one file, "fetchUser" in another, "loadUser" in third. Inconsistency forces recognition every time.
Default 3, ambiguous singular plural. "user" sometimes single, sometimes array. Ambiguity produces bugs.
Default 4, missing boolean prefixes. "loading" instead of "isLoading", "permission" instead of "hasPermission". Missing prefix obscures type.
How To Enforce Each Pattern
Three enforcement approaches make conventions stick.
Enforcement 1, document conventions in CLAUDE.md. AI reads conventions; conventions shape generation.
Enforcement 2, ESLint rules for naming. eslint-plugin-naming-convention enforces patterns; CI catches violations.
Enforcement 3, code review checklist for naming. Human reviewers catch conventions ESLint cannot enforce.
What Makes Naming Conventions Sustainable
Three patterns separate sustainable naming from temporary discipline.

Pattern 1, conventions in CLAUDE.md. AI reads; AI applies. Conventions shape default generation.
Pattern 2, ESLint enforces mechanics. Mechanical patterns (case, prefixes) enforced automatically.
Pattern 3, review catches semantic. Meaning correctness needs human judgment; review fills the gap.
The combination produces sustainable naming. Without these patterns, naming drifts.
How To Improve Existing Code Naming
Three patterns help improve naming in existing codebases.
Pattern A, rename during refactoring. When touching code for other reasons, improve names. Spreads work over time.
Pattern B, rename worst offenders first. Most confusing names first; impact prioritization.
Pattern C, use IDE rename refactoring. IDE tools handle rename across files safely; manual rename produces bugs.
Common Questions About Naming Conventions
Naming conventions raise questions worth addressing directly.
The first question is whether to use camelCase or snake_case. Match language convention; JavaScript uses camelCase; Python uses snake_case. Match expectation.
The second question is whether to use Hungarian notation (str_name, int_count). No; modern languages have type systems. Hungarian notation adds noise without benefit.
The third question is whether names can be too long. Yes; over 30 characters becomes unreadable. Find balance between specific and concise.
The fourth question is whether AI tools follow naming conventions. With prompting yes; without prompting AI defaults to generic names.
How Naming Affects Codebase Maintainability
Naming affects codebase maintainability in compounding ways. Maintainability effects compound across project lifetime.
The first compounding effect is debug speed. Clear names speed debugging; debug compounds across all bugs.
The second compounding effect is onboarding speed. Clear names speed onboarding; new contributors productive faster.
The third compounding effect is refactoring confidence. Clear names enable safe refactoring; refactoring keeps code clean.
The combination produces maintainability that compounds. Without naming attention, maintainability degrades.
How To Train AI For Better Naming
Three patterns train AI to produce better names.
Pattern A, explicit examples in CLAUDE.md. Show good and bad name examples; AI learns by example.
Pattern B, naming context in prompts. "Use descriptive function names that tell readers what the function does without reading implementation."
Pattern C, request name review during generation. "After generating, review names; rename anything that requires reading implementation to understand."
The combination produces AI generated names matching conventions. Without prompting, AI defaults to generic names.
The most damaging naming mistake is accepting AI default names without review. AI defaults are technically correct but semantically empty; accepting them accumulates readability debt. The fix is to review every name during code review; rename anything generic. Builders who review names produce readable code; builders who accept defaults produce code that requires reverse engineering.
The other mistake is over abbreviating. Short names save typing; long names save reading. Reading happens more than typing.
A third mistake is inconsistent conventions across files. Pick conventions; apply universally. Inconsistency forces recognition overhead.
A fourth mistake is missing the rename opportunity during refactoring. Refactoring is renaming opportunity; opportunity compounds across refactors.
What This Means For You
Naming conventions for AI generated code transform technically correct code into genuinely readable code. The four patterns, AI defaults, and enforcement approaches produce naming that compounds maintainability.
- If you're a senior dev: Add naming conventions to your team's CLAUDE.md; conventions shape all AI generation.
Browse more ship articles
Read more ship