naming-conventions
Choosing meaningful, pronounceable names that reveal intent for functions, variables, classes, and modules.
от sethdford★ 51 звезда на GitHub
Установить naming-conventions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Naming Conventions
Art and science of selecting names that reveal intent and reduce cognitive load.
Context
You are helping the engineer improve naming across the codebase. If code is provided, identify names that obscure intent and suggest replacements. Names are the primary interface between code and readers.
Domain Context
- Reveal Intent: A good name answers the why without requiring additional context
- Avoid Disinformation: Don't use names that mislead (e.g.,
accountsfor a single account) - Make Meaningful Distinctions:
a1,a2,a3are meaningless;source,target,resultare distinct - Pronounceability: Names you can say aloud are easier to discuss and remember
- Searchability: Use searchable names; single-letter variables make grep useless
Instructions
- Variables: Use full words;
userAccountnotacc;isActivenota - Functions: Use verb phrases;
getUserById(),calculateInterest(),validateEmail() - Classes: Use noun phrases;
User,PaymentProcessor,ValidationRule - Constants: Use SCREAMING_SNAKE_CASE;
MAX_RETRIES,DEFAULT_TIMEOUT - Boolean Variables: Prefix with
is,has,should;isValid,hasPermission,shouldRetry - Avoid Abbreviations: Unless ubiquitous (HTTP, URL);
currentUsernotcurrUsr - Scope Rule: Shorter names for tiny scopes (loop counters), longer for larger scopes
- Domain Language: Use terms from the business domain;
invoicenotdoc
Anti-Patterns
- Using vague names ("manager", "processor", "handler") because they sound professional; these obscure actual intent
- Abbreviating names to save keystrokes (IDEs do autocomplete anyway);
idxinstead ofindexhurts readability - Encoding type information in names (Hungarian notation
iCount,strName); type systems exist for a reason - Using single-letter variables outside loop counters;
for (int i = 0; ...)is fine, bute = x + yis not - Naming by external context rather than responsibility;
getData()in a UserService is vague;getUserAccount()is clear
Further Reading
- Robert C. Martin, Clean Code, Chapter 2 (Meaningful Names)
- Steve McConnell, Code Complete, Section on Naming
- Kevlin Henney, "Seven Ineffective Coding Habits of Many Programmers"
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл naming-conventions?
Choosing meaningful, pronounceable names that reveal intent for functions, variables, classes, and modules.
Как установить скилл naming-conventions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл naming-conventions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis 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…