Master Naming Suite
Streamline your workflow with this suggest, better, variable, function. Includes structured workflows, validation checks, and reusable patterns for productivity.
Master Naming Suite
A comprehensive skill for naming things in software ā covering variable naming conventions, function naming patterns, file and directory naming, API endpoint naming, database column naming, and team naming standards across different languages and frameworks.
When to Use This Skill
Choose Master Naming Suite when you need to:
- Establish naming conventions for a new codebase
- Refactor inconsistent naming across a project
- Choose clear names for complex functions or variables
- Design API endpoint naming strategies
- Create naming guidelines for a development team
Consider alternatives when:
- You need code style formatting (use a linter/formatter skill)
- You need code documentation (use a documentation skill)
- You need API design beyond naming (use an API design skill)
Quick Start
# Get naming suggestions claude "Suggest better names for these variables in a user authentication module: d (data), res (result), tmp (temporary value), flag (boolean), cb (callback)"
# Naming Improvements | Current | Problem | Better Name | Why | |---------|---------------------|------------------------|------------------------------| | d | Single letter, vague | userData / loginPayload | Describes what the data is | | res | Ambiguous abbreviation| authResult / loginResponse | Distinguishes from HTTP response | | tmp | No context | pendingToken / unverifiedEmail | Names the temporary thing | | flag | Generic boolean | isAuthenticated / hasValidSession | Describes what it flags | | cb | Cryptic abbreviation| onAuthComplete / handleLoginResult | Describes the callback's purpose | ## Naming Rules Applied 1. Names should reveal intent, not implementation 2. Boolean names start with is/has/can/should 3. Callbacks describe the event, not the mechanism 4. Avoid abbreviations unless universally known (URL, ID, HTTP)
Core Concepts
Language-Specific Conventions
| Language | Variables | Functions | Classes | Constants | Files |
|---|---|---|---|---|---|
| JavaScript | camelCase | camelCase | PascalCase | UPPER_SNAKE | kebab-case.js |
| TypeScript | camelCase | camelCase | PascalCase | UPPER_SNAKE | kebab-case.ts |
| Python | snake_case | snake_case | PascalCase | UPPER_SNAKE | snake_case.py |
| Go | camelCase | PascalCase* | PascalCase | camelCase | snake_case.go |
| Rust | snake_case | snake_case | PascalCase | UPPER_SNAKE | snake_case.rs |
| Ruby | snake_case | snake_case | PascalCase | UPPER_SNAKE | snake_case.rb |
*Go uses PascalCase for exported, camelCase for unexported
Function Naming Patterns
## Function Name Formulas ### Actions: verb + noun - getUser(), createOrder(), deleteSession() - fetchUserProfile(), validateEmail(), parseConfig() ### Transformations: source + To + target - celsiusToFahrenheit(), jsonToXml(), stringToDate() ### Predicates (return boolean): is/has/can/should + condition - isValid(), hasPermission(), canEdit(), shouldRetry() ### Event Handlers: on/handle + event - onSubmit(), handleClick(), onAuthSuccess() ### Factory Functions: create/make/build + noun - createUser(), makeConnection(), buildQuery() ### Anti-Patterns to Avoid ā processData() ā too vague (process how?) ā doStuff() ā meaningless ā manager() ā noun, not a verb ā handleIt() ā what is "it"? ā temp() ā what is temporary?
API Endpoint Naming
## RESTful Endpoint Naming ### Pattern: /resource/{id}/sub-resource GET /users ā List users GET /users/123 ā Get user 123 POST /users ā Create user PUT /users/123 ā Update user 123 DELETE /users/123 ā Delete user 123 GET /users/123/orders ā List user 123's orders ### Rules 1. Use plural nouns: /users not /user 2. Use kebab-case: /user-profiles not /userProfiles 3. Use nouns, not verbs: /users not /getUsers 4. Nest for relationships: /users/123/orders 5. Use query params for filtering: /users?role=admin ### Anti-Patterns ā /getUsers, /createUser ā verbs in URLs ā /user_profiles ā snake_case in URLs ā /Users ā PascalCase in URLs ā /users/get-all ā action in path
Configuration
| Parameter | Description | Example |
|---|---|---|
language | Primary programming language | "typescript" |
convention | Naming convention standard | "airbnb" / "google" |
max_length | Maximum name length | 40 characters |
abbreviations | Allowed abbreviations | ["id", "url", "http"] |
prefix_style | Boolean prefix style | "is" / "has" |
Best Practices
-
Name things by what they represent, not how they're implemented ā
userListis better thanuserArray.priceInCentsis better thanpriceInt. Implementation changes; meaning stays. When you refactor from an array to a Set,userListstill makes sense butuserArraybecomes a lie. -
Use consistent verb vocabulary across the codebase ā Pick one: get/fetch/retrieve ā not all three. Pick one: create/make/build ā not all three. Document the chosen verbs in a style guide. Inconsistency forces developers to guess which verb was used where.
-
Don't abbreviate unless the abbreviation is more recognizable than the full word ā
URL,HTTP,IDā everyone knows these.usr,btn,mgrā these save a few characters but cost readability. If you'd need to explain the abbreviation to a new team member, spell it out. -
Make the name proportional to the scope ā Loop variables can be short (
i,j). Module-level constants should be descriptive (MAX_RETRY_ATTEMPTS). A variable used in 3 lines can becount. A variable used across 100 lines needsactiveUserSessionCount. -
Rename without hesitation when you find a better name ā Good naming is iterative. When you realize
datashould beuserProfile, rename it immediately. Modern IDEs make project-wide renames safe and instant. The cost of a bad name compounds every time someone reads it.
Common Issues
Team members use different names for the same concept ā One developer calls it user, another calls it account, a third calls it profile. Maintain a domain glossary that defines the canonical name for each concept and enforce it in code reviews.
Names become outdated as code evolves ā A function named sendEmail that now also sends SMS and push notifications is misleading. When behavior changes, rename to match: sendNotification. Old names that don't match current behavior are worse than vague names.
Hungarian notation and type prefixes clutter the code ā strName, intAge, boolIsActive ā these prefixes duplicate information that the type system already provides. Modern languages with strong type systems make type prefixes unnecessary noise. Let the types speak for themselves.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.