| name | naming |
| description | This skill should be used when the user asks to "help me name this", "what should I call this", "naming suggestions", "help with naming", "give me a name for", or mentions difficulty naming a project, file, variable, function, class, module, component, API route, database table, or any other code artifact. Also triggers when the user says "命名" or "取名" or "怎么叫" in Chinese. Provides guided Q&A and curated name options to solve programmer naming problems. |
| version | 0.1.0 |
Naming Assistant
Programmer naming problems — solved through focused Q&A and curated options. Default output language is English unless the user explicitly requests Chinese or another language.
Workflow
Step 1: Identify the Target
Determine exactly what is being named. If not stated, ask one focused question:
"What are you naming? (e.g., project, variable, function, class, file, module, API route, database table)"
Common targets and their primary concerns:
| Target | Primary concern |
|---|
| Project / repo | Memorable, searchable, brand-friendly |
| npm / pip package | Unique in registry, concise, descriptive |
| Variable | Reveals intent, follows language convention |
| Function / method | Action verb, describes what it does |
| Class / interface / type | Noun, describes what it represents |
| File / directory | Matches contents, follows project convention |
| API route | REST-ful resource noun |
| Database table / column | snake_case, plural tables |
| CSS class / design token | BEM or utility convention |
| Feature flag / env var | ALL_CAPS, prefixed |
Step 2: Gather Context (Q&A)
Ask the most important missing questions — max 3 questions per round, prioritizing:
- What does it do / represent? (1–2 sentences of purpose)
- What's the tech stack / language? (determines case convention)
- Any constraints? (length limit, must-use keywords, existing naming patterns in the codebase)
Optional follow-ups when relevant:
- Is this public API or internal?
- What's the user-facing description? (for projects / packages)
- Are there existing related names to stay consistent with? (e.g.,
getUserById → should new function follow get*ById pattern?)
Do not ask all questions at once. Start with purpose + language, then follow up if needed.
Step 3: Generate Options
Provide 4–6 name candidates organized into tiers:
## Naming Suggestions
**Recommended**
1. `bestName` — [why: concise, follows convention X, reveals intent Y]
2. `secondBest` — [why: alternative if first feels too long / too short]
**Also Consider**
3. `option3` — [trade-off: more explicit but verbose]
4. `option4` — [trade-off: shorter but slightly less clear]
**If you prefer [alternative style]**
5. `option5` — [e.g., if snake_case preferred over camelCase]
Rules for generating options:
- Apply the correct case convention for the language (see
references/naming-conventions.md)
- Include at least one option that prioritizes brevity and one that prioritizes clarity
- Avoid anti-patterns: no
data, info, temp, util, manager as standalone words
- For functions: use action verbs (
fetch, parse, validate, build, resolve)
- For booleans: use
is, has, can, should prefix
- For collections: use plural nouns
Step 4: Explain & Refine
After presenting options:
- Briefly explain the top recommendation and its reasoning
- Ask: "Does any of these fit? Or should I adjust direction (e.g., shorter, different verb, different style)?"
- Iterate based on feedback — refine until the user is satisfied or narrows to a favorite
Key Principles
Reveal Intent, Not Implementation
❌ processData() → ✅ normalizeUserInput()
❌ handleStuff() → ✅ retryFailedPayment()
❌ temp → ✅ pendingOrderIds
Match Language Conventions
Always apply the default convention for the language in use. When uncertain, ask. See references/naming-conventions.md for the full matrix.
Consistency With the Codebase
When the user provides existing names from their codebase, match the pattern:
- If they use
fetch* for data loading, don't suggest get*
- If files use
PascalCase, don't suggest kebab-case
- If they have
UserService, a new service should follow *Service
Concise but Not Cryptic
Target: 1–3 words for variables/functions, 1–4 words for project names.
- Too short:
u, fn, x (meaningless)
- Too long:
currentlySelectedUserProfileDataForDisplay (unwieldy)
- Sweet spot:
selectedUserProfile
Special Cases
Project / Package Naming
Extra checks for projects:
- Search for name conflicts on npm / PyPI / GitHub before recommending (ask user if they want to verify)
- Consider domain availability for web apps
- Avoid names that are too generic (
utils, helper, tools)
- Check for pronounceability and memorability
- Prefer names that hint at value proposition:
date-fns (date functions), zod (validation)
Bilingual Projects (English + Chinese)
If the project serves Chinese users but codebase is English:
- Code names → English (default)
- Display names / app names → suggest both English and Chinese variants
- Example: code:
video-dl, display: 视频下载器 / VideoGrabber
When Multiple Names Are Needed
For a new feature/module that requires naming at multiple levels (project + package + main class + main function):
- Name them in top-down order
- Ensure consistency across levels
- Present as a cohesive naming scheme
Example output:
Naming scheme for your "video downloader" feature:
- Module / directory: `video-downloader/`
- Main class: `VideoDownloader`
- Main method: `download(url: string)`
- Config key: `videoDownloader.maxConcurrent`
- Feature flag: `FEATURE_VIDEO_DOWNLOADER`
Conversation Starters
When the user gives minimal context, use these as opening questions:
For any target:
"What does [it] do in one sentence? And what language / stack is this for?"
For a project name:
"What problem does this project solve? Who is the target user? Any vibe you're going for (serious tool, fun utility, enterprise)?"
For a variable or function:
"What value does it hold / what action does it perform? Paste the relevant code if possible."
For a file:
"What will this file contain? (component, service, utility, config, type definitions?)"
Additional Resources
references/naming-conventions.md — Complete case styles, language defaults, and anti-patterns organized by target type (variables, functions, classes, files, database, API, CSS)