Command Palette

Search for a command to run...

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

Setup

Verify bash-format prerequisites and shell hooks (check [inspect]), or resolve and register git pre-commit entries (apply [install-git-hooks]).

БесплатноБез исполняемых скриптов
melodic-softwareот melodic-software★ 34 звезды на GitHub

Установить Setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Setup

Pre-computed context

check's tool probes ran at load time. Read these rows instead of re-issuing them; each shows the tool's path when present, or absent when missing:

  • jq: !command -v jq 2>/dev/null || echo absent
  • node: !command -v node 2>/dev/null || echo absent
  • shellcheck: !command -v shellcheck 2>/dev/null || echo absent
  • shfmt: !command -v shfmt 2>/dev/null || echo absent

A row reading [shell command execution disabled by policy] carries no result: run that tool's command -v probe via Bash instead.

  • Pointer: for the placeholder a skipped load-time command leaves, fetch skills § Inject dynamic context live.
  • As of: 2026-11-11
  • Recheck trigger: the placeholder text changes.

Purpose

Thin check-centric setup per the uniform setup contract (docs/plugin-philosophy.md "Setup is explicit and repeatable" in the marketplace repository): check inspects and reports, apply resolves. Shell formatting and linting are two concerns. The hooks run only the plugin's shipped adapter for each, where that tool's own config governs the file, and otherwise nothing; they never run a command from the repository's bash record (docs/conventions/ecosystems/bash.yaml), which /toolchain:lint (if enabled) and /toolchain:check (if enabled) run on request. The only consumer-project files this plugin writes are its git-hook entry copies (apply install-git-hooks); the record is written by /toolchain:setup apply bash (if enabled), never here. The tunables are the native userConfig options (the on/off toggle and the gitignored-file switch). Every prerequisite is a PATH binary the plugin never bundles, and the plugin never installs system packages, so the rest of apply is guidance-only. It never modifies user settings or the plugin cache.

Action routing: no argument or check runs the check; check inspect runs only the check inspect section; apply runs the check first, then offers remediation guidance. Both are non-interactive. Never prompt when the action is given. apply install-git-hooks asks only where its section says to.

check (read-only)

The batch hook (${CLAUDE_PLUGIN_ROOT}/hooks/bash-format.sh), the entries and the resolver they share are the single source of truth for what the plugin requires and how it resolves things; step 4 asks the resolver itself.

Read it first. Probe what it actually does, don't recite this file. Then read the pre-computed tool rows, run the remaining probes via Bash, and report a PASS/FAIL/INFO table with one remediation line per FAIL. Do not modify anything. Read each option value from this text; never put a ${user_config.*} string in a shell command. Open plugin files by the ${CLAUDE_PLUGIN_ROOT} paths this skill names; never Glob or Grep the plugin directory.

When the plugin's toggle is disabled, every prerequisite absence except node downgrades from FAIL to INFO. The hook exits through its enabled-gate before probing anything, so a deliberately disabled plugin is not broken. Report the probes informationally and note that re-enabling restores the FAIL semantics. A missing node stays FAIL in either state: every hook row launches node, and the gate runs inside hooks/exec-bash.mjs. A tool the git pre-commit entries need keeps the grade it gets with the toggle on while those entries are installed (step 10 reports it as a tool line beside an ok, stale or modified entry): the entries run at commit outside Claude Code and read no toggle.

  1. Bash version. Check against the hooks' floor, Bash 3.2 or newer (${CLAUDE_PLUGIN_ROOT}/hooks/hook-utils.sh).
  2. node. The pre-computed node row. FAIL if absent: every hook row launches through node hooks/exec-bash.mjs, so without node the hook does not launch and no shell edit is formatted in the session (${CLAUDE_PLUGIN_ROOT}/README.md Requirements).
  3. jq. The pre-computed jq row. FAIL if absent: the batch row does nothing, since it reads the file paths with jq, and the format entry cannot run its subscript guard.
  4. What each concern resolves to. From the repository root run sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh" --resolve and sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/lint.sh" --resolve. Each prints one row: plugin, concern, source, tool, found, detail, tab-separated. It reads the adapters' configs and runs nothing. Append repository paths (--resolve scripts/a.sh lib/b.bash) for one row per file, since each adapter's config walk can answer differently per file; the detail column then names the config that governs that file and the binary that would run, or why nothing resolved. Each adapter's own rules (which config opts a file in, where its binary comes from) are in ${CLAUDE_PLUGIN_ROOT}/git-hooks/adapters.sh, and the format opt-in test is in `${CLAUDE_PLUGIN_ROOT}/git-hooks/shfmt-rewrite.sh
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Bash(command -v jq*)
  2. 02Bash(command -v node*)
  3. 03Bash(command -v shellcheck*)
  4. 04Bash(command -v shfmt*)
  5. 05Bash(node "${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs" verify:*)
  6. 06Bash(node ${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs verify:*)
  7. 07Bash(node "${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs" inspect:*)
  8. 08Bash(node ${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs inspect:*)
  9. 09Bash(node "${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs" plan:*)
  10. 10Bash(node ${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/install.mjs plan:*)
  11. 11Bash(sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh" --resolve)
  12. 12Bash(sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh" --resolve:*)
  13. 13Bash(sh ${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh --resolve)
  14. 14Bash(sh ${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh --resolve:*)
  15. 15Bash(sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/lint.sh" --resolve)
  16. 16Bash(sh "${CLAUDE_PLUGIN_ROOT}/git-hooks/lint.sh" --resolve:*)
  17. 17Bash(sh ${CLAUDE_PLUGIN_ROOT}/git-hooks/lint.sh --resolve)
  18. 18Bash(sh ${CLAUDE_PLUGIN_ROOT}/git-hooks/lint.sh --resolve:*)

Вложенные файлы

  • reference/git-hook-decisions.md

FAQ

Что делает скилл Setup?

Verify bash-format prerequisites and shell hooks (check [inspect]), or resolve and register git pre-commit entries (apply [install-git-hooks]).

Как установить скилл Setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Setup запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить Setup с