Domain-Focused Naming
БесплатноБез исполняемых скриптовНе проверенName code by what it does in the domain, not how it's implemented or its history
Об этом скилле
Domain-Focused Naming
Overview
Names documenting implementation or history create confusion. "NewUserAPI" doesn't tell what it does. "ZodValidator" exposes internals.
Core principle: Names tell what code does in the domain, not how it's built or what it replaced.
Violating the letter of this rule is violating the spirit of naming.
When to Use
Use for:
- Variables, functions, classes, modules
- Refactoring existing code
- Code review feedback
- API design
Use ESPECIALLY when:
- Refactoring (tempted to add "New" or "Improved")
- Replacing implementations (tempted to add "Zod" or "MCP")
- Using design patterns (tempted to add "Factory" or "Manager")
- Documenting changes (tempted to add "Unified" or "Enhanced")
The Rules
NEVER Use Implementation Details
Names expose WHAT, not HOW.
NEVER Use Temporal Context
Code exists in present. Don't reference past or transitions.
NEVER Use Pattern Names (Unless They Add Clarity)
Patterns are implementation details. Most don't help understanding.
// OK when pattern IS the purpose class EventEmitter { } // Observer pattern IS what it does class CommandQueue { } // Queue pattern IS what it does
</Good>
### Names Tell Domain Stories
Good names form sentences about business logic.
<Good>
```typescript
// Reads like domain language
user.authenticate()
order.calculateTotal()
payment.process()
// Not
user.executeAuthenticationStrategy()
order.runTotalCalculationAlgorithm()
payment.invokeProcessingWorkflow()
Quick Reference
| Bad Pattern | Why Bad | Good Alternative |
|---|---|---|
ZodValidator |
Exposes implementation | Validator |
MCPToolWrapper |
Exposes protocol | RemoteTool |
NewUserAPI |
Temporal reference | UserAPI |
ImprovedParser |
References history | Parser |
ToolFactory |
Pattern name noise | Tool or createTool() |
AbstractToolInterface |
Redundant qualifiers | Tool |
executeToolWithValidation() |
Implementation in name | execute() |
When Changing Code
Rule: Never document old behavior or the change in names.
Red Flags - STOP and Rename
If you catch yourself writing:
- "New", "Old", "Legacy", "Improved", "Enhanced"
- "Unified", "Refactored", "Updated", "Modern"
- Implementation details ("Zod", "JSON", "MCP", "SQL")
- Unnecessary pattern names ("Factory", "Builder", "Manager")
- Redundant qualifiers ("Abstract", "Base", "Interface")
STOP. Find a name describing actual purpose in the domain.
Common Rationalizations
| Excuse | Reality |
|---|---|
| "Need to distinguish from old version" | Old version shouldn't exist or should be in different namespace. |
| "New developers need to know it's improved" | Code quality shows in behavior, not names. |
| "Factory pattern is important here" | If pattern is core purpose, fine. Usually it's not. |
| "Everyone knows what Zod is" | Today they do. Names should outlive dependencies. |
| "It IS a wrapper around MCP" | That's implementation. What does it DO in your domain? |
Verification
Before committing names:
- Name describes domain purpose
- No implementation d
Установить Domain-Focused Naming в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Domain-Focused Naming?
Name code by what it does in the domain, not how it's implemented or its history
Как установить скилл Domain-Focused Naming?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Domain-Focused Naming запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic