hoc-constants
Conventions for constants — how they are named and written, and where the files holding them live. Use when declaring a constant or an enum-like object, or…
от openreachtech★ 17 звёзд на GitHub
Установить hoc-constants в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Constants
Conventions related to defining constants.
Naming
- Constant names must be written in all-uppercase SNAKE_CASE.
// NG
const maxRetryCount = 3
// OK
const MAX_RETRY_COUNT = 3
Naming of enum-like objects
- When defining constants as an enum-like object, use the singular form for the name.
- Following the naming convention of enums, do not use the plural form.
// NG: plural
const COLORS = {
RED: 'red',
GREEN: 'green',
BLUE: 'blue',
}
// OK: singular
const COLOR = {
RED: 'red',
GREEN: 'green',
BLUE: 'blue',
}
Chopping down
- In object-type constant definitions, chop down per property (one property per line).
// NG: multiple properties on one line
const COLOR = { RED: 'red', GREEN: 'green', BLUE: 'blue' }
// OK: one property per line
const COLOR = {
RED: 'red',
GREEN: 'green',
BLUE: 'blue',
}
File organization for object-type constants
- When defining an object-type constant, keep one definition per file.
- The file name must match the definition name.
// OK: COLOR is defined alone in COLOR.js
COLOR.js
→ const COLOR = { ... }
Location
- Unless otherwise specified, define constant files under
<project-root>/constants/. - Subfolders may be used as appropriate, depending on the kind of constant.
<project-root>/constants/COLOR.js
<project-root>/constants/http/STATUS_CODE.js
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл hoc-constants?
Conventions for constants — how they are named and written, and where the files holding them live. Use when declaring a constant or an enum-like object, or when deciding where one belongs. Names of everything else belong to the naming convention.
Как установить скилл hoc-constants?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hoc-constants запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…