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★ 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)
jq. Read the pre-computedjqvalue. FAIL when it isabsent: the bash resolver this check runs for the zone report (${CLAUDE_PLUGIN_ROOT}/scripts/context-zone.sh) then printsunknown, andapplycannot merge into an existingzones.json. The module and the PostCompact marker hook do not use jq. Remediation: install jq (https://jqlang.org/download/).node. Read the pre-computednodevalue. FAIL when it isabsent: the PostCompact marker row in${CLAUDE_PLUGIN_ROOT}/hooks/hooks.jsonrunsnode hooks/exec-bash.mjs, and the module writes each snapshot by runningnode lib/write-snapshot.mjs, and this check never counts a Claude Code install as supplyingnodefor them (pointer below). WithoutnodeonPATHthe marker does not launch and no snapshot is written, so file readers readunknown; 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 neednode. Remediation: install Node.js (https://nodejs.org/en/download) and restart Claude Code.- Pointer: Set up, "Install with npm",
for whether the installed
claudebinary uses Node.
- Pointer: Set up, "Install with npm",
for whether the installed
- Module state. The module loads only where mods can.
This session: the module registers
mcp__context-usage__statuswhen 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 testprocess never sees this session's settings (adisableAllHooksin 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(command -v jq*) - 02
Bash(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), без исполняемых скриптов.
Похожие скиллы
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…