Command Palette

Search for a command to run...

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

Setup

Verify context-usage prerequisites, mod, snapshot, and options (check), or seed zones.json and place the status-line segment (apply [cache-line]).

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

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

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

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

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

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

Setup

Pre-computed context

Four of check's read-only probes run at load time. Read the values below; do not re-issue them.

jq (a path = present, absent = missing): !command -v jq 2>/dev/null || echo "absent" node (a path = present, absent = missing): !command -v node 2>/dev/null || echo "absent" zones.json contents, capped at 40 lines, or one token distinguishing an absent file from an unreadable one: !if [ -e "$HOME/.claude/context-usage/zones.json" ]; then head -40 "$HOME/.claude/context-usage/zones.json" 2>&1 || echo "(present but unreadable)"; else echo "(absent)"; fi Leftover directory from the plugin's earlier name (its entries, or (absent)): !if [ -d "$HOME/.claude/context-guard" ]; then ls -A "$HOME/.claude/context-guard" 2>&1; echo "compaction markers: $(find "$HOME/.claude/context-guard/context" -maxdepth 1 -name '*.compacted' 2>/dev/null | wc -l)"; else echo "(absent)"; fi

Purpose

Narrow-write setup. The plugin's module (hooks/register.tsx, a Claude Code mod) writes each session's snapshot, sends Claude the zone lines, draws the optional band row and serves the mcp__context-usage__status tool. Nothing about it needs wiring, so check inspects and reports PASS/FAIL/INFO with one remediation line per FAIL. The plugin also owns the machine file ~/.claude/context-usage/zones.json, whose schema it defines and whose values the operator may edit; that owned writable file is what obliges an apply, and a bare apply writes nothing else. apply cache-line places the one other file, the optional status-line segment.

Action routing: no argument or check runs the check; apply cache-line runs only the cache-line section below; any other apply runs the zones.json section.

The code is the source of truth for its own behavior. Read ${CLAUDE_PLUGIN_ROOT}/hooks/register.tsx and ${CLAUDE_PLUGIN_ROOT}/scripts/context-zone.sh when a finding depends on what they do, rather than reciting this file. The consumer-facing constants (snapshot path pattern, staleness rule, default zone bands, zones.json shape) are owned by ${CLAUDE_PLUGIN_ROOT}/reference/reader-contract.md. Open plugin files by the ${CLAUDE_PLUGIN_ROOT} paths this skill names, with the Read tool; never Glob or Grep the plugin directory.

check (read-only)

  1. jq. Read the pre-computed jq value. FAIL when it is absent: the bash resolver this check runs for the zone report (${CLAUDE_PLUGIN_ROOT}/scripts/context-zone.sh) then prints unknown, and apply cannot merge into an existing zones.json. The module and the PostCompact marker hook do not use jq. Remediation: install jq (https://jqlang.org/download/).
  2. node. Read the pre-computed node value. FAIL when it is absent: the PostCompact marker row in ${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json runs node hooks/exec-bash.mjs, and the module writes each snapshot by running node lib/write-snapshot.mjs, and this check never counts a Claude Code install as supplying node for them (pointer below). Without node on PATH the marker does not launch and no snapshot is written, so file readers read unknown; report that the marker cannot launch (how Claude Code treats a hook that cannot start: Hooks, "Exit code output"), since nothing else says so. The module's zone lines, band row and status tool do not need node. Remediation: install Node.js (https://nodejs.org/en/download) and restart Claude Code.
  3. Module state. The module loads only where mods can.
    • This session: the module registers mcp__context-usage__status when the session starts. Look for that name in your own tool list, deferred tool names included. Present → PASS, the mod is running in this session. Absent → INFO "mods off in this session, or the status tool was refused by policy" (a refused registration leaves one debug-log line, "context-usage: the status tool could not register").

    • Run claude --version. Older than 2.1.287 → FAIL "mods off: Claude Code <version> is older than the 2.1.287 floor; older builds are unsupported". Remediation: update Claude Code.

    • A separate claude plugin test process never sees this session's settings (a disableAllHooks in this session's settings, --bare, worker crashes), so it may only say whether mods can load on this build, read against the troubleshoot table at the pointer below; never report it as this session's state.

    • Where mods are off, the plugin runs reactive-only there: no zone lines, no band row, no status tool and no snapshot writes; the PostCompact marker, a settings hook, still runs wherever settings hooks do.

    • Pointer: [troubleshoot: check whether mods can load](h

Полный SKILL.md на GitHub

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

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

  1. 01Bash(command -v jq*)
  2. 02Bash(command -v node*)

FAQ

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

Verify context-usage prerequisites, mod, snapshot, and options (check), or seed zones.json and place the status-line segment (apply [cache-line]).

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

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

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

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

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

Сравнить Setup с