Command Palette

Search for a command to run...

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

Setup

Verify powershell-format prerequisites and 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

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. PowerShell formatting and linting are two concerns, each with its own git-hook entry. The hooks run only the plugin's shipped PSScriptAnalyzer adapter, where a PSScriptAnalyzerSettings.psd1 governs the file, and otherwise nothing; they never run a command from the repository's powershell record (docs/conventions/ecosystems/powershell.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 powershell (if enabled), never here. Rules come from the repository's own settings file, and the tunables are the native userConfig options (the on/off toggle and the end-of-turn check). The pwsh runtime and the PSScriptAnalyzer module are resolved from the environment (never bundled, never downloaded), and the plugin installs nothing, so apply is otherwise guidance-only. It never modifies user settings or the plugin cache.

A machine without PowerShell or the PSScriptAnalyzer module, or a repo without a settings file, is INFO in check while no settings file opts the adapter in: the hooks then run nothing by design. Where a settings file does opt in, check step 3's rows decide. A machine without PowerShell gets the SessionStart probe's notice once per session while the plugin is enabled, in a repository where a settings file sits at or above the project directory or is tracked anywhere in it.

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 entry (${CLAUDE_PLUGIN_ROOT}/git-hooks/format.sh), the end-of-turn lint.sh, their adapter (adapters.sh and psscriptanalyzer.ps1 beside them) and the resolver they share are the single source of truth for what the plugin requires and how it resolves things; step 3 asks the resolver itself.

Read them first. Probe what they actually do, don't recite this file. Then run the 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. An installed plugin runs from a deeply nested cache path, and a search passed that path can fail to start on some hosts because the path is too long, while reading a named file still works.

When the plugin's toggle is disabled, every prerequisite absence except node downgrades from FAIL to INFO. The hooks exit through their 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.

  1. Bash version. Check against the floor, Bash 3.2 or newer (${CLAUDE_PLUGIN_ROOT}/lib/git-hooks/check-lib.sh).
  2. node. Probe via Bash: command -v node, then node --version when it resolves. FAIL if absent: every handler in hooks/hooks.json launches through node hooks/exec-bash.mjs, so without node the hook never starts and says nothing (README Requirements). The hook process resolves bare node from the persisted Machine/User PATH, not from this shell. On Windows a version manager can return a per-call path whose directory name contains a process id (fnm's fnm_multishells\<pid>_<timestamp>\node); that path is ephemeral, so FAIL when it is the only hit, say so, and report the persisted resolution separately from [Environment]::GetEnvironmentVariable('Path','Machine') and 'User'. A non-ephemeral in-shell hit is INFO beside that result, not a PASS by itself.
  3. 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 adapter's config and runs nothing. Append repository paths (--resolve src/a.ps1 build/b.psm1) for one row per file, since the closest settings file governs each file; the detail column then names it, or the row says nothing resolved. The adapter's own rules (which settings file opts a file in, where pwsh c
Полный SKILL.md на GitHub

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

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

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

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

  • reference/git-hook-decisions.md

FAQ

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

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

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

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

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

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

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

Сравнить Setup с