Command Palette

Search for a command to run...

Назад к скиллам
скилл № 38537

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от 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), без исполняемых скриптов.

Похожие скиллы

Сравнить hoc-constants с