{"owner":"jarrodwatts","repo":"claude-hud","hasSkills":true,"totalSkillsCount":5,"totalTokensCount":3398,"categories":["plugin-manifest","marketplace","claude-rule","command-prompt"],"hasMcp":false,"mcpConfig":null,"found":[".claude-plugin/plugin.json",".claude-plugin/marketplace.json","CLAUDE.md","commands/configure.md","commands/setup.md"],"skills":{".claude-plugin/plugin.json":"{\n  \"name\": \"claude-hud\",\n  \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n  \"version\": \"0.12.1\",\n  \"author\": {\n    \"name\": \"Jarrod Watts\",\n    \"url\": \"https://github.com/jarrodwatts\"\n  },\n  \"commands\": [\n    \"./commands/setup.md\",\n    \"./commands/configure.md\"\n  ],\n  \"homepage\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"repository\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"license\": \"MIT\",\n  \"keywords\": [\"hud\", \"monitoring\", \"statusline\", \"context\", \"tools\", \"agents\", \"todos\", \"claude-code\"]\n}\n",".claude-plugin/marketplace.json":"{\n  \"name\": \"claude-hud\",\n  \"owner\": {\n    \"name\": \"Jarrod Watts\",\n    \"email\": \"jarrodwattsyt@gmail.com\"\n  },\n  \"metadata\": {\n    \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n    \"version\": \"0.12.1\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"claude-hud\",\n      \"source\": \"./\",\n      \"description\": \"Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.\",\n      \"category\": \"monitoring\",\n      \"tags\": [\"hud\", \"statusline\", \"monitoring\", \"context\", \"tools\", \"agents\", \"todos\"]\n    }\n  ]\n}\n","CLAUDE.md":"# CLAUDE.md\n\nClaude HUD is a Claude Code plugin: a [status line](https://code.claude.com/docs/en/statusline) command that prints a two-line HUD (model, project, git, context, usage), plus opt-in lines for tools, agents, todos, and more.\n\n## Commands\n\n```bash\nnpm ci\nnpm test                           # builds dist/, then runs node --test\nnpm run test:update-snapshots      # regenerate tests/golden/expected.txt after an intended output change\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":45,\"context_window_size\":200000}}' | node dist/index.js\n```\n\n## How a render works\n\nClaude Code runs the command after each message, `/compact`, a mode change, a rate-limit reset, or a prompt-cache expiry (debounced 300ms), plus on `refreshInterval` if set. Each run is a fresh process:\n\n1. `stdin.ts` reads the payload. It targets Claude Code ≥ 2.1.260 and trusts its fields (`version`, `cost`, `prompt_cache`, `session_name`, `output_style`, `workspace.repo`, `rate_limits`) instead of deriving them.\n2. `config.ts` loads `plugins/claude-hud/config.json` plus the per-directory `claude-hud.json` override. `DEFAULT_CONFIG` is the schema; a rules table validates each key.\n3. `index.ts` gathers only what enabled elements need, in parallel: the transcript (`transcript.ts`), git or jj (`git.ts`, `jj.ts`), the extra command, memory, auth, config counts, the usage snapshot, the cost ledger, and speed state. All I/O and state writes happen here.\n4. `render/` turns that into lines without I/O. Each element has one implementation in `parts.ts`, `context.ts`, `usage.ts`, `vcs.ts`, `lines.ts`, and `activity.ts`. `expanded.ts` and `compact.ts` only arrange those parts, and `ansi.ts` measures and wraps.\n\n## Invariants\n\n- The default HUD is two lines. New display is opt-in; see the scope section of CONTRIBUTING.md.\n- Text from stdin, the transcript, git, or config is untrusted terminal input. Sanitize it (`utils/sanitize.ts`) before it's printed.\n- Rendering is pure: the clock and terminal width are sampled once in `renderLines`.\n- `tests/golden.test.js` pins end-to-end output. An output change must show up as a reviewed diff to `tests/golden/expected.txt`.\n- `dist/` is built by CI on main. Never commit it in a PR.\n- `README.md` and `README.zh.md` document every key in `DEFAULT_CONFIG`, and `tests/readme-options.test.js` enforces it.\n\n## Setup\n\n`/claude-hud:setup` (`commands/setup.md`) runs `scripts/setup.mjs`. That copies `scripts/statusline.mjs` to `<config dir>/plugins/claude-hud/` and points `statusLine.command` at it. The launcher runs the newest installed version, so plugin updates never need setup again. Plugins can't set `statusLine` themselves, so this step writes the user's `settings.json`.\n\nRuntime: Node.js 18+ or Bun. Build: TypeScript, ES2022, NodeNext modules.\n","commands/configure.md":"---\ndescription: Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides\nallowed-tools: Read, Write, AskUserQuestion\n---\n\n# Configure Claude HUD\n\n## Read the current config\n\nThe config directory is `$CLAUDE_CONFIG_DIR` when set, otherwise `~/.claude`. Read these files if they exist:\n\n1. `plugins/claude-hud/config.json`: the base config. This command writes only this file.\n2. `claude-hud.json` in the config directory: a manual per-directory override. It uses the same shape and its values win. Never write or delete it.\n\nThe effective config is the base with the override layered on top: nested objects merge key by key, and arrays and scalars are replaced. Missing keys use the defaults in the README's configuration table. Use the effective values when describing the current state.\n\n## Ask\n\nAsk these with AskUserQuestion, in two batches of up to four. Put the current value in each question. In multi-select questions, every listed item becomes `true` if selected and `false` if not.\n\n**Layout** (single select)\n- \"Expanded\": `lineLayout: \"expanded\"`, `showSeparators: false`\n- \"Compact\": `lineLayout: \"compact\"`, `showSeparators: false`\n- \"Compact + separators\": `lineLayout: \"compact\"`, `showSeparators: true`\n\n**Activity lines** (multi-select)\n- \"Tools\": `display.showTools`\n- \"Agents\": `display.showAgents`\n- \"Todos\": `display.showTodos`\n- \"Skills & MCP\": `display.showSkills`, `display.showMcp`\n\n**Session info** (multi-select)\n- \"Cost\": `display.showCost`\n- \"Duration\": `display.showDuration`\n- \"Session name\": `display.showSessionName`\n- \"Reasoning effort\": `display.showEffortLevel`\n\n**Usage limits** (single select)\n- \"Bar (default)\": `display.showUsage: true`, `display.usageBarEnabled: true`, `display.usageCompact: false`\n- \"Text\": `display.showUsage: true`, `display.usageBarEnabled: false`, `display.usageCompact: false`\n- \"Compact\": `display.showUsage: true`, `display.usageCompact: true`\n- \"Hidden\": `display.showUsage: false`\n\n**Git** (single select)\n- \"Branch + dirty (default)\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: false`\n- \"Branch only\": `gitStatus.enabled: true`, `showDirty: false`, `showAheadBehind: false`, `showFileStats: false`\n- \"Ahead/behind\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: true`, `showFileStats: false`\n- \"File stats\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: true`\n\n**Language** (single select)\n- \"Keep current\"\n- \"English\": `language: \"en\"`\n- \"简体中文\": `language: \"zh-Hans\"`\n- \"繁體中文\": `language: \"zh-Hant\"`\n\n**Custom line** (single select)\n- \"Keep current\"\n- \"Enter text\": ask for the text (max 80 characters) and save it as `display.customLine`\n- \"Remove\": shown only when one is set; saves `display.customLine: \"\"`\n\nIf the user cancels any question, say \"Configuration cancelled.\" and stop.\n\n## Preview and confirm\n\nCompute the changed keys by comparing against the effective config.\n\n- If nothing changed, say \"No changes needed - config unchanged.\" and stop.\n- Otherwise show each changed key as `key: old → new`.\n- If a changed key is also set in `claude-hud.json`, warn that the override still wins and show the effective value.\n\nThen ask \"Save these changes?\"\n\n## Write\n\nWrite `plugins/claude-hud/config.json`, creating directories as needed. Start from the existing base file and change only the selected keys. Keep every other key exactly as it was, including settings this command doesn't ask about, such as `colors`, thresholds, `elementOrder`, `mergeGroups`, and `display.externalUsage*`. Write valid JSON with 2-space indentation.\n\nThen say: \"Configuration saved! The HUD picks it up on its next refresh.\" Mention that the README documents every other option.\n","commands/setup.md":"---\ndescription: Configure claude-hud as your statusline\nallowed-tools: Bash, Read, AskUserQuestion\n---\n\nSet up claude-hud as the Claude Code status line. `${CLAUDE_PLUGIN_ROOT}` is this plugin's install directory. Placeholders in `{BRACES}` are values you fill in from earlier steps.\n\n## Step 1: Pick the shell\n\nClaude Code runs the statusLine command through bash on macOS, Linux, and WSL. On Windows it uses Git Bash when installed, otherwise PowerShell. Choose `{SHELL}` from the environment's `Platform:` and `Shell:`. On `win32`, also run `echo $OSTYPE` with the Bash tool.\n\n| Platform | Shell / OSTYPE | `{SHELL}` |\n|---|---|---|\n| `darwin`, `linux` (including WSL) | any | `posix` |\n| `win32` | Shell `bash`, or OSTYPE `msys` / `cygwin` | `gitbash` |\n| `win32` | anything else | `powershell` |\n\nWith `gitbash`, use bash syntax in every step: bash expands PowerShell's `$env:...` before PowerShell runs. In WSL, the plugin must be installed inside Linux, not on the Windows side.\n\n## Step 2: Find the runtime\n\n| `{SHELL}` | Command |\n|---|---|\n| `posix` | `command -v bun 2>/dev/null \\|\\| command -v node 2>/dev/null` |\n| `gitbash` | `command -v node 2>/dev/null` (Windows needs Node.js; don't use Bun) |\n| `powershell` | `(Get-Command node -ErrorAction SilentlyContinue).Source` |\n\nThe result is `{RUNTIME}`. The status line will run on the same runtime as the helper in the next steps.\n\nIf nothing is found, stop. Tell the user the current shell can't find Node.js (or Bun), even if Claude Code itself is installed. Point them to Node.js LTS from https://nodejs.org (`winget install OpenJS.NodeJS.LTS` on Windows) or Bun from https://bun.sh (macOS and Linux only). Then ask them to restart their shell and run `/claude-hud:setup` again.\n\n## Step 3: Inspect the current settings\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" inspect --shell {SHELL}\n```\n\nIn PowerShell, prefix the command with `&`. The helper prints JSON with:\n\n- `settingsPath`\n- `command`: the statusLine command it will install\n- `existing`: `none`, `claude-hud`, or `other`, for the current statusLine\n- `existingPreview`: a redacted preview of the current command\n\nIf it fails (for example, settings.json is not valid JSON), show the error and stop. Don't edit settings.json by hand.\n\nIf `existing` is `other`, ask with AskUserQuestion:\n\n- header: \"Existing statusline\"\n- question: \"You already have a status line: `{existingPreview}`. Replace it with claude-hud? settings.json is backed up first.\"\n- options: \"Replace it\" / \"Keep my current status line\"\n\nOn \"Keep\", stop without changing anything. Only ever show `existingPreview`, never the raw command, because it may contain secrets.\n\n## Step 4: Install\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" install --shell {SHELL}\n```\n\nThis does the following:\n\n- Copies a launcher to `<config dir>/plugins/claude-hud/statusline.mjs`. The launcher always runs the newest installed claude-hud, so plugin updates never need setup again.\n- On `gitbash`, writes a `statusline.cmd` shim next to it. Launching through cmd.exe stops Git Bash from stranding suspended `node.exe` processes.\n- Backs up settings.json to the reported `backupPath`.\n- Saves a replaced command to `previousCommandPath`.\n- Writes `statusLine` and keeps every other setting.\n\nTest the result with sample input:\n\n```bash\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":12,\"context_window_size\":200000}}' | {COMMAND}\n```\n\n`{COMMAND}` is the `command` from the report. On `powershell`, test the launcher directly instead: `'<json>' | & \"{RUNTIME}\" \"<config dir>\\plugins\\claude-hud\\statusline.mjs\"`.\n\nIt should print two HUD lines within a few seconds. If it errors or prints nothing:\n\n1. Show the output.\n2. Restore the backup by copying `backupPath` over `settingsPath`.\n3. Stop.\n\n## Step 5: Finish\n\nClaude Code runs the new command as soon as settings.json changes, so the HUD should already be showing below the input field. Ask with AskUserQuestion:\n\n- header: \"claude-hud\"\n- question: \"Setup complete! The HUD should be showing below your input field. Is it working?\"\n- options:\n  - \"Yes, and star the repo ⭐\": run `gh repo star jarrodwatts/claude-hud`. If `gh` is missing or lacks that subcommand, run `gh api -X PUT /user/starred/jarrodwatts/claude-hud`, or give them https://github.com/jarrodwatts/claude-hud.\n  - \"Yes, it's working\"\n  - \"No, something's wrong\"\n\n**If yes**, tell the user in one line that they can change anything by asking, for example \"show tool activity in the HUD\" or \"use the compact layout\", or with `/claude-hud:configure`.\n\n**If no**, check these in order:\n\n1. Run the Step 4 test again and show its output.\n2. If there's no output, check that the plugin is installed: `ls \"<config dir>/plugins/cache/\"*/claude-hud/`. The launcher prints nothing when it finds no install. If the directory is missing, reinstall with `/plugin install claude-hud`.\n3. If the runtime moved (nvm, mise, and asdf upgrades change the path), run setup again.\n4. On Windows, dozens of idle `node.exe` processes come from a setup that predates the cmd.exe shim. Kill them and run setup again.\n5. To go back to the previous status line, copy `backupPath` over `settingsPath`.\n"},"files":{".claude-plugin/plugin.json":"{\n  \"name\": \"claude-hud\",\n  \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n  \"version\": \"0.12.1\",\n  \"author\": {\n    \"name\": \"Jarrod Watts\",\n    \"url\": \"https://github.com/jarrodwatts\"\n  },\n  \"commands\": [\n    \"./commands/setup.md\",\n    \"./commands/configure.md\"\n  ],\n  \"homepage\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"repository\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"license\": \"MIT\",\n  \"keywords\": [\"hud\", \"monitoring\", \"statusline\", \"context\", \"tools\", \"agents\", \"todos\", \"claude-code\"]\n}\n",".claude-plugin/marketplace.json":"{\n  \"name\": \"claude-hud\",\n  \"owner\": {\n    \"name\": \"Jarrod Watts\",\n    \"email\": \"jarrodwattsyt@gmail.com\"\n  },\n  \"metadata\": {\n    \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n    \"version\": \"0.12.1\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"claude-hud\",\n      \"source\": \"./\",\n      \"description\": \"Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.\",\n      \"category\": \"monitoring\",\n      \"tags\": [\"hud\", \"statusline\", \"monitoring\", \"context\", \"tools\", \"agents\", \"todos\"]\n    }\n  ]\n}\n","CLAUDE.md":"# CLAUDE.md\n\nClaude HUD is a Claude Code plugin: a [status line](https://code.claude.com/docs/en/statusline) command that prints a two-line HUD (model, project, git, context, usage), plus opt-in lines for tools, agents, todos, and more.\n\n## Commands\n\n```bash\nnpm ci\nnpm test                           # builds dist/, then runs node --test\nnpm run test:update-snapshots      # regenerate tests/golden/expected.txt after an intended output change\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":45,\"context_window_size\":200000}}' | node dist/index.js\n```\n\n## How a render works\n\nClaude Code runs the command after each message, `/compact`, a mode change, a rate-limit reset, or a prompt-cache expiry (debounced 300ms), plus on `refreshInterval` if set. Each run is a fresh process:\n\n1. `stdin.ts` reads the payload. It targets Claude Code ≥ 2.1.260 and trusts its fields (`version`, `cost`, `prompt_cache`, `session_name`, `output_style`, `workspace.repo`, `rate_limits`) instead of deriving them.\n2. `config.ts` loads `plugins/claude-hud/config.json` plus the per-directory `claude-hud.json` override. `DEFAULT_CONFIG` is the schema; a rules table validates each key.\n3. `index.ts` gathers only what enabled elements need, in parallel: the transcript (`transcript.ts`), git or jj (`git.ts`, `jj.ts`), the extra command, memory, auth, config counts, the usage snapshot, the cost ledger, and speed state. All I/O and state writes happen here.\n4. `render/` turns that into lines without I/O. Each element has one implementation in `parts.ts`, `context.ts`, `usage.ts`, `vcs.ts`, `lines.ts`, and `activity.ts`. `expanded.ts` and `compact.ts` only arrange those parts, and `ansi.ts` measures and wraps.\n\n## Invariants\n\n- The default HUD is two lines. New display is opt-in; see the scope section of CONTRIBUTING.md.\n- Text from stdin, the transcript, git, or config is untrusted terminal input. Sanitize it (`utils/sanitize.ts`) before it's printed.\n- Rendering is pure: the clock and terminal width are sampled once in `renderLines`.\n- `tests/golden.test.js` pins end-to-end output. An output change must show up as a reviewed diff to `tests/golden/expected.txt`.\n- `dist/` is built by CI on main. Never commit it in a PR.\n- `README.md` and `README.zh.md` document every key in `DEFAULT_CONFIG`, and `tests/readme-options.test.js` enforces it.\n\n## Setup\n\n`/claude-hud:setup` (`commands/setup.md`) runs `scripts/setup.mjs`. That copies `scripts/statusline.mjs` to `<config dir>/plugins/claude-hud/` and points `statusLine.command` at it. The launcher runs the newest installed version, so plugin updates never need setup again. Plugins can't set `statusLine` themselves, so this step writes the user's `settings.json`.\n\nRuntime: Node.js 18+ or Bun. Build: TypeScript, ES2022, NodeNext modules.\n","commands/configure.md":"---\ndescription: Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides\nallowed-tools: Read, Write, AskUserQuestion\n---\n\n# Configure Claude HUD\n\n## Read the current config\n\nThe config directory is `$CLAUDE_CONFIG_DIR` when set, otherwise `~/.claude`. Read these files if they exist:\n\n1. `plugins/claude-hud/config.json`: the base config. This command writes only this file.\n2. `claude-hud.json` in the config directory: a manual per-directory override. It uses the same shape and its values win. Never write or delete it.\n\nThe effective config is the base with the override layered on top: nested objects merge key by key, and arrays and scalars are replaced. Missing keys use the defaults in the README's configuration table. Use the effective values when describing the current state.\n\n## Ask\n\nAsk these with AskUserQuestion, in two batches of up to four. Put the current value in each question. In multi-select questions, every listed item becomes `true` if selected and `false` if not.\n\n**Layout** (single select)\n- \"Expanded\": `lineLayout: \"expanded\"`, `showSeparators: false`\n- \"Compact\": `lineLayout: \"compact\"`, `showSeparators: false`\n- \"Compact + separators\": `lineLayout: \"compact\"`, `showSeparators: true`\n\n**Activity lines** (multi-select)\n- \"Tools\": `display.showTools`\n- \"Agents\": `display.showAgents`\n- \"Todos\": `display.showTodos`\n- \"Skills & MCP\": `display.showSkills`, `display.showMcp`\n\n**Session info** (multi-select)\n- \"Cost\": `display.showCost`\n- \"Duration\": `display.showDuration`\n- \"Session name\": `display.showSessionName`\n- \"Reasoning effort\": `display.showEffortLevel`\n\n**Usage limits** (single select)\n- \"Bar (default)\": `display.showUsage: true`, `display.usageBarEnabled: true`, `display.usageCompact: false`\n- \"Text\": `display.showUsage: true`, `display.usageBarEnabled: false`, `display.usageCompact: false`\n- \"Compact\": `display.showUsage: true`, `display.usageCompact: true`\n- \"Hidden\": `display.showUsage: false`\n\n**Git** (single select)\n- \"Branch + dirty (default)\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: false`\n- \"Branch only\": `gitStatus.enabled: true`, `showDirty: false`, `showAheadBehind: false`, `showFileStats: false`\n- \"Ahead/behind\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: true`, `showFileStats: false`\n- \"File stats\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: true`\n\n**Language** (single select)\n- \"Keep current\"\n- \"English\": `language: \"en\"`\n- \"简体中文\": `language: \"zh-Hans\"`\n- \"繁體中文\": `language: \"zh-Hant\"`\n\n**Custom line** (single select)\n- \"Keep current\"\n- \"Enter text\": ask for the text (max 80 characters) and save it as `display.customLine`\n- \"Remove\": shown only when one is set; saves `display.customLine: \"\"`\n\nIf the user cancels any question, say \"Configuration cancelled.\" and stop.\n\n## Preview and confirm\n\nCompute the changed keys by comparing against the effective config.\n\n- If nothing changed, say \"No changes needed - config unchanged.\" and stop.\n- Otherwise show each changed key as `key: old → new`.\n- If a changed key is also set in `claude-hud.json`, warn that the override still wins and show the effective value.\n\nThen ask \"Save these changes?\"\n\n## Write\n\nWrite `plugins/claude-hud/config.json`, creating directories as needed. Start from the existing base file and change only the selected keys. Keep every other key exactly as it was, including settings this command doesn't ask about, such as `colors`, thresholds, `elementOrder`, `mergeGroups`, and `display.externalUsage*`. Write valid JSON with 2-space indentation.\n\nThen say: \"Configuration saved! The HUD picks it up on its next refresh.\" Mention that the README documents every other option.\n","commands/setup.md":"---\ndescription: Configure claude-hud as your statusline\nallowed-tools: Bash, Read, AskUserQuestion\n---\n\nSet up claude-hud as the Claude Code status line. `${CLAUDE_PLUGIN_ROOT}` is this plugin's install directory. Placeholders in `{BRACES}` are values you fill in from earlier steps.\n\n## Step 1: Pick the shell\n\nClaude Code runs the statusLine command through bash on macOS, Linux, and WSL. On Windows it uses Git Bash when installed, otherwise PowerShell. Choose `{SHELL}` from the environment's `Platform:` and `Shell:`. On `win32`, also run `echo $OSTYPE` with the Bash tool.\n\n| Platform | Shell / OSTYPE | `{SHELL}` |\n|---|---|---|\n| `darwin`, `linux` (including WSL) | any | `posix` |\n| `win32` | Shell `bash`, or OSTYPE `msys` / `cygwin` | `gitbash` |\n| `win32` | anything else | `powershell` |\n\nWith `gitbash`, use bash syntax in every step: bash expands PowerShell's `$env:...` before PowerShell runs. In WSL, the plugin must be installed inside Linux, not on the Windows side.\n\n## Step 2: Find the runtime\n\n| `{SHELL}` | Command |\n|---|---|\n| `posix` | `command -v bun 2>/dev/null \\|\\| command -v node 2>/dev/null` |\n| `gitbash` | `command -v node 2>/dev/null` (Windows needs Node.js; don't use Bun) |\n| `powershell` | `(Get-Command node -ErrorAction SilentlyContinue).Source` |\n\nThe result is `{RUNTIME}`. The status line will run on the same runtime as the helper in the next steps.\n\nIf nothing is found, stop. Tell the user the current shell can't find Node.js (or Bun), even if Claude Code itself is installed. Point them to Node.js LTS from https://nodejs.org (`winget install OpenJS.NodeJS.LTS` on Windows) or Bun from https://bun.sh (macOS and Linux only). Then ask them to restart their shell and run `/claude-hud:setup` again.\n\n## Step 3: Inspect the current settings\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" inspect --shell {SHELL}\n```\n\nIn PowerShell, prefix the command with `&`. The helper prints JSON with:\n\n- `settingsPath`\n- `command`: the statusLine command it will install\n- `existing`: `none`, `claude-hud`, or `other`, for the current statusLine\n- `existingPreview`: a redacted preview of the current command\n\nIf it fails (for example, settings.json is not valid JSON), show the error and stop. Don't edit settings.json by hand.\n\nIf `existing` is `other`, ask with AskUserQuestion:\n\n- header: \"Existing statusline\"\n- question: \"You already have a status line: `{existingPreview}`. Replace it with claude-hud? settings.json is backed up first.\"\n- options: \"Replace it\" / \"Keep my current status line\"\n\nOn \"Keep\", stop without changing anything. Only ever show `existingPreview`, never the raw command, because it may contain secrets.\n\n## Step 4: Install\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" install --shell {SHELL}\n```\n\nThis does the following:\n\n- Copies a launcher to `<config dir>/plugins/claude-hud/statusline.mjs`. The launcher always runs the newest installed claude-hud, so plugin updates never need setup again.\n- On `gitbash`, writes a `statusline.cmd` shim next to it. Launching through cmd.exe stops Git Bash from stranding suspended `node.exe` processes.\n- Backs up settings.json to the reported `backupPath`.\n- Saves a replaced command to `previousCommandPath`.\n- Writes `statusLine` and keeps every other setting.\n\nTest the result with sample input:\n\n```bash\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":12,\"context_window_size\":200000}}' | {COMMAND}\n```\n\n`{COMMAND}` is the `command` from the report. On `powershell`, test the launcher directly instead: `'<json>' | & \"{RUNTIME}\" \"<config dir>\\plugins\\claude-hud\\statusline.mjs\"`.\n\nIt should print two HUD lines within a few seconds. If it errors or prints nothing:\n\n1. Show the output.\n2. Restore the backup by copying `backupPath` over `settingsPath`.\n3. Stop.\n\n## Step 5: Finish\n\nClaude Code runs the new command as soon as settings.json changes, so the HUD should already be showing below the input field. Ask with AskUserQuestion:\n\n- header: \"claude-hud\"\n- question: \"Setup complete! The HUD should be showing below your input field. Is it working?\"\n- options:\n  - \"Yes, and star the repo ⭐\": run `gh repo star jarrodwatts/claude-hud`. If `gh` is missing or lacks that subcommand, run `gh api -X PUT /user/starred/jarrodwatts/claude-hud`, or give them https://github.com/jarrodwatts/claude-hud.\n  - \"Yes, it's working\"\n  - \"No, something's wrong\"\n\n**If yes**, tell the user in one line that they can change anything by asking, for example \"show tool activity in the HUD\" or \"use the compact layout\", or with `/claude-hud:configure`.\n\n**If no**, check these in order:\n\n1. Run the Step 4 test again and show its output.\n2. If there's no output, check that the plugin is installed: `ls \"<config dir>/plugins/cache/\"*/claude-hud/`. The launcher prints nothing when it finds no install. If the directory is missing, reinstall with `/plugin install claude-hud`.\n3. If the runtime moved (nvm, mise, and asdf upgrades change the path), run setup again.\n4. On Windows, dozens of idle `node.exe` processes come from a setup that predates the cmd.exe shim. Kill them and run setup again.\n5. To go back to the previous status line, copy `backupPath` over `settingsPath`.\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/jarrodwatts/claude-hud/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\nClaude HUD is a Claude Code plugin: a [status line](https://code.claude.com/docs/en/statusline) command that prints a two-line HUD (model, project, git, context, usage), plus opt-in lines for tools, agents, todos, and more.\n\n## Commands\n\n```bash\nnpm ci\nnpm test                           # builds dist/, then runs node --test\nnpm run test:update-snapshots      # regenerate tests/golden/expected.txt after an intended output change\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":45,\"context_window_size\":200000}}' | node dist/index.js\n```\n\n## How a render works\n\nClaude Code runs the command after each message, `/compact`, a mode change, a rate-limit reset, or a prompt-cache expiry (debounced 300ms), plus on `refreshInterval` if set. Each run is a fresh process:\n\n1. `stdin.ts` reads the payload. It targets Claude Code ≥ 2.1.260 and trusts its fields (`version`, `cost`, `prompt_cache`, `session_name`, `output_style`, `workspace.repo`, `rate_limits`) instead of deriving them.\n2. `config.ts` loads `plugins/claude-hud/config.json` plus the per-directory `claude-hud.json` override. `DEFAULT_CONFIG` is the schema; a rules table validates each key.\n3. `index.ts` gathers only what enabled elements need, in parallel: the transcript (`transcript.ts`), git or jj (`git.ts`, `jj.ts`), the extra command, memory, auth, config counts, the usage snapshot, the cost ledger, and speed state. All I/O and state writes happen here.\n4. `render/` turns that into lines without I/O. Each element has one implementation in `parts.ts`, `context.ts`, `usage.ts`, `vcs.ts`, `lines.ts`, and `activity.ts`. `expanded.ts` and `compact.ts` only arrange those parts, and `ansi.ts` measures and wraps.\n\n## Invariants\n\n- The default HUD is two lines. New display is opt-in; see the scope section of CONTRIBUTING.md.\n- Text from stdin, the transcript, git, or config is untrusted terminal input. Sanitize it (`utils/sanitize.ts`) before it's printed.\n- Rendering is pure: the clock and terminal width are sampled once in `renderLines`.\n- `tests/golden.test.js` pins end-to-end output. An output change must show up as a reviewed diff to `tests/golden/expected.txt`.\n- `dist/` is built by CI on main. Never commit it in a PR.\n- `README.md` and `README.zh.md` document every key in `DEFAULT_CONFIG`, and `tests/readme-options.test.js` enforces it.\n\n## Setup\n\n`/claude-hud:setup` (`commands/setup.md`) runs `scripts/setup.mjs`. That copies `scripts/statusline.mjs` to `<config dir>/plugins/claude-hud/` and points `statusLine.command` at it. The launcher runs the newest installed version, so plugin updates never need setup again. Plugins can't set `statusLine` themselves, so this step writes the user's `settings.json`.\n\nRuntime: Node.js 18+ or Bun. Build: TypeScript, ES2022, NodeNext modules.\n","isInternal":false,"tokens":715,"sizeBytes":2817},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/jarrodwatts/claude-hud/HEAD/.claude-plugin/marketplace.json","title":"claude-hud","category":"marketplace","format":"json","content":"{\n  \"name\": \"claude-hud\",\n  \"owner\": {\n    \"name\": \"Jarrod Watts\",\n    \"email\": \"jarrodwattsyt@gmail.com\"\n  },\n  \"metadata\": {\n    \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n    \"version\": \"0.12.1\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"claude-hud\",\n      \"source\": \"./\",\n      \"description\": \"Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.\",\n      \"category\": \"monitoring\",\n      \"tags\": [\"hud\", \"statusline\", \"monitoring\", \"context\", \"tools\", \"agents\", \"todos\"]\n    }\n  ]\n}\n","frontmatter":{"name":"claude-hud","owner":{"name":"Jarrod Watts","email":"jarrodwattsyt@gmail.com"},"metadata":{"description":"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress","version":"0.12.1"},"plugins":[{"name":"claude-hud","source":"./","description":"Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.","category":"monitoring","tags":["hud","statusline","monitoring","context","tools","agents","todos"]}]},"isInternal":false,"tokens":181,"sizeBytes":662},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/jarrodwatts/claude-hud/HEAD/.claude-plugin/plugin.json","title":"claude-hud","category":"plugin-manifest","format":"json","content":"{\n  \"name\": \"claude-hud\",\n  \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n  \"version\": \"0.12.1\",\n  \"author\": {\n    \"name\": \"Jarrod Watts\",\n    \"url\": \"https://github.com/jarrodwatts\"\n  },\n  \"commands\": [\n    \"./commands/setup.md\",\n    \"./commands/configure.md\"\n  ],\n  \"homepage\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"repository\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"license\": \"MIT\",\n  \"keywords\": [\"hud\", \"monitoring\", \"statusline\", \"context\", \"tools\", \"agents\", \"todos\", \"claude-code\"]\n}\n","frontmatter":{"name":"claude-hud","description":"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress","version":"0.12.1","author":{"name":"Jarrod Watts","url":"https://github.com/jarrodwatts"},"commands":["./commands/setup.md","./commands/configure.md"],"homepage":"https://github.com/jarrodwatts/claude-hud","repository":"https://github.com/jarrodwatts/claude-hud","license":"MIT","keywords":["hud","monitoring","statusline","context","tools","agents","todos","claude-code"]},"isInternal":false,"tokens":180,"sizeBytes":592},{"name":"configure.md","path":"commands/configure.md","rawUrl":"https://raw.githubusercontent.com/jarrodwatts/claude-hud/HEAD/commands/configure.md","title":"Command: /configure","category":"command-prompt","format":"markdown","content":"---\ndescription: Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides\nallowed-tools: Read, Write, AskUserQuestion\n---\n\n# Configure Claude HUD\n\n## Read the current config\n\nThe config directory is `$CLAUDE_CONFIG_DIR` when set, otherwise `~/.claude`. Read these files if they exist:\n\n1. `plugins/claude-hud/config.json`: the base config. This command writes only this file.\n2. `claude-hud.json` in the config directory: a manual per-directory override. It uses the same shape and its values win. Never write or delete it.\n\nThe effective config is the base with the override layered on top: nested objects merge key by key, and arrays and scalars are replaced. Missing keys use the defaults in the README's configuration table. Use the effective values when describing the current state.\n\n## Ask\n\nAsk these with AskUserQuestion, in two batches of up to four. Put the current value in each question. In multi-select questions, every listed item becomes `true` if selected and `false` if not.\n\n**Layout** (single select)\n- \"Expanded\": `lineLayout: \"expanded\"`, `showSeparators: false`\n- \"Compact\": `lineLayout: \"compact\"`, `showSeparators: false`\n- \"Compact + separators\": `lineLayout: \"compact\"`, `showSeparators: true`\n\n**Activity lines** (multi-select)\n- \"Tools\": `display.showTools`\n- \"Agents\": `display.showAgents`\n- \"Todos\": `display.showTodos`\n- \"Skills & MCP\": `display.showSkills`, `display.showMcp`\n\n**Session info** (multi-select)\n- \"Cost\": `display.showCost`\n- \"Duration\": `display.showDuration`\n- \"Session name\": `display.showSessionName`\n- \"Reasoning effort\": `display.showEffortLevel`\n\n**Usage limits** (single select)\n- \"Bar (default)\": `display.showUsage: true`, `display.usageBarEnabled: true`, `display.usageCompact: false`\n- \"Text\": `display.showUsage: true`, `display.usageBarEnabled: false`, `display.usageCompact: false`\n- \"Compact\": `display.showUsage: true`, `display.usageCompact: true`\n- \"Hidden\": `display.showUsage: false`\n\n**Git** (single select)\n- \"Branch + dirty (default)\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: false`\n- \"Branch only\": `gitStatus.enabled: true`, `showDirty: false`, `showAheadBehind: false`, `showFileStats: false`\n- \"Ahead/behind\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: true`, `showFileStats: false`\n- \"File stats\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: true`\n\n**Language** (single select)\n- \"Keep current\"\n- \"English\": `language: \"en\"`\n- \"简体中文\": `language: \"zh-Hans\"`\n- \"繁體中文\": `language: \"zh-Hant\"`\n\n**Custom line** (single select)\n- \"Keep current\"\n- \"Enter text\": ask for the text (max 80 characters) and save it as `display.customLine`\n- \"Remove\": shown only when one is set; saves `display.customLine: \"\"`\n\nIf the user cancels any question, say \"Configuration cancelled.\" and stop.\n\n## Preview and confirm\n\nCompute the changed keys by comparing against the effective config.\n\n- If nothing changed, say \"No changes needed - config unchanged.\" and stop.\n- Otherwise show each changed key as `key: old → new`.\n- If a changed key is also set in `claude-hud.json`, warn that the override still wins and show the effective value.\n\nThen ask \"Save these changes?\"\n\n## Write\n\nWrite `plugins/claude-hud/config.json`, creating directories as needed. Start from the existing base file and change only the selected keys. Keep every other key exactly as it was, including settings this command doesn't ask about, such as `colors`, thresholds, `elementOrder`, `mergeGroups`, and `display.externalUsage*`. Write valid JSON with 2-space indentation.\n\nThen say: \"Configuration saved! The HUD picks it up on its next refresh.\" Mention that the README documents every other option.\n","frontmatter":{"description":"Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides","allowed-tools":"Read, Write, AskUserQuestion","allowedTools":["Read,","Write,","AskUserQuestion"]},"allowedTools":["Read,","Write,","AskUserQuestion"],"isInternal":false,"tokens":946,"sizeBytes":3823},{"name":"setup.md","path":"commands/setup.md","rawUrl":"https://raw.githubusercontent.com/jarrodwatts/claude-hud/HEAD/commands/setup.md","title":"Command: /setup","category":"command-prompt","format":"markdown","content":"---\ndescription: Configure claude-hud as your statusline\nallowed-tools: Bash, Read, AskUserQuestion\n---\n\nSet up claude-hud as the Claude Code status line. `${CLAUDE_PLUGIN_ROOT}` is this plugin's install directory. Placeholders in `{BRACES}` are values you fill in from earlier steps.\n\n## Step 1: Pick the shell\n\nClaude Code runs the statusLine command through bash on macOS, Linux, and WSL. On Windows it uses Git Bash when installed, otherwise PowerShell. Choose `{SHELL}` from the environment's `Platform:` and `Shell:`. On `win32`, also run `echo $OSTYPE` with the Bash tool.\n\n| Platform | Shell / OSTYPE | `{SHELL}` |\n|---|---|---|\n| `darwin`, `linux` (including WSL) | any | `posix` |\n| `win32` | Shell `bash`, or OSTYPE `msys` / `cygwin` | `gitbash` |\n| `win32` | anything else | `powershell` |\n\nWith `gitbash`, use bash syntax in every step: bash expands PowerShell's `$env:...` before PowerShell runs. In WSL, the plugin must be installed inside Linux, not on the Windows side.\n\n## Step 2: Find the runtime\n\n| `{SHELL}` | Command |\n|---|---|\n| `posix` | `command -v bun 2>/dev/null \\|\\| command -v node 2>/dev/null` |\n| `gitbash` | `command -v node 2>/dev/null` (Windows needs Node.js; don't use Bun) |\n| `powershell` | `(Get-Command node -ErrorAction SilentlyContinue).Source` |\n\nThe result is `{RUNTIME}`. The status line will run on the same runtime as the helper in the next steps.\n\nIf nothing is found, stop. Tell the user the current shell can't find Node.js (or Bun), even if Claude Code itself is installed. Point them to Node.js LTS from https://nodejs.org (`winget install OpenJS.NodeJS.LTS` on Windows) or Bun from https://bun.sh (macOS and Linux only). Then ask them to restart their shell and run `/claude-hud:setup` again.\n\n## Step 3: Inspect the current settings\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" inspect --shell {SHELL}\n```\n\nIn PowerShell, prefix the command with `&`. The helper prints JSON with:\n\n- `settingsPath`\n- `command`: the statusLine command it will install\n- `existing`: `none`, `claude-hud`, or `other`, for the current statusLine\n- `existingPreview`: a redacted preview of the current command\n\nIf it fails (for example, settings.json is not valid JSON), show the error and stop. Don't edit settings.json by hand.\n\nIf `existing` is `other`, ask with AskUserQuestion:\n\n- header: \"Existing statusline\"\n- question: \"You already have a status line: `{existingPreview}`. Replace it with claude-hud? settings.json is backed up first.\"\n- options: \"Replace it\" / \"Keep my current status line\"\n\nOn \"Keep\", stop without changing anything. Only ever show `existingPreview`, never the raw command, because it may contain secrets.\n\n## Step 4: Install\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" install --shell {SHELL}\n```\n\nThis does the following:\n\n- Copies a launcher to `<config dir>/plugins/claude-hud/statusline.mjs`. The launcher always runs the newest installed claude-hud, so plugin updates never need setup again.\n- On `gitbash`, writes a `statusline.cmd` shim next to it. Launching through cmd.exe stops Git Bash from stranding suspended `node.exe` processes.\n- Backs up settings.json to the reported `backupPath`.\n- Saves a replaced command to `previousCommandPath`.\n- Writes `statusLine` and keeps every other setting.\n\nTest the result with sample input:\n\n```bash\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":12,\"context_window_size\":200000}}' | {COMMAND}\n```\n\n`{COMMAND}` is the `command` from the report. On `powershell`, test the launcher directly instead: `'<json>' | & \"{RUNTIME}\" \"<config dir>\\plugins\\claude-hud\\statusline.mjs\"`.\n\nIt should print two HUD lines within a few seconds. If it errors or prints nothing:\n\n1. Show the output.\n2. Restore the backup by copying `backupPath` over `settingsPath`.\n3. Stop.\n\n## Step 5: Finish\n\nClaude Code runs the new command as soon as settings.json changes, so the HUD should already be showing below the input field. Ask with AskUserQuestion:\n\n- header: \"claude-hud\"\n- question: \"Setup complete! The HUD should be showing below your input field. Is it working?\"\n- options:\n  - \"Yes, and star the repo ⭐\": run `gh repo star jarrodwatts/claude-hud`. If `gh` is missing or lacks that subcommand, run `gh api -X PUT /user/starred/jarrodwatts/claude-hud`, or give them https://github.com/jarrodwatts/claude-hud.\n  - \"Yes, it's working\"\n  - \"No, something's wrong\"\n\n**If yes**, tell the user in one line that they can change anything by asking, for example \"show tool activity in the HUD\" or \"use the compact layout\", or with `/claude-hud:configure`.\n\n**If no**, check these in order:\n\n1. Run the Step 4 test again and show its output.\n2. If there's no output, check that the plugin is installed: `ls \"<config dir>/plugins/cache/\"*/claude-hud/`. The launcher prints nothing when it finds no install. If the directory is missing, reinstall with `/plugin install claude-hud`.\n3. If the runtime moved (nvm, mise, and asdf upgrades change the path), run setup again.\n4. On Windows, dozens of idle `node.exe` processes come from a setup that predates the cmd.exe shim. Kill them and run setup again.\n5. To go back to the previous status line, copy `backupPath` over `settingsPath`.\n","frontmatter":{"description":"Configure claude-hud as your statusline","allowed-tools":"Bash, Read, AskUserQuestion","allowedTools":["Bash,","Read,","AskUserQuestion"]},"allowedTools":["Bash,","Read,","AskUserQuestion"],"isInternal":false,"tokens":1376,"sizeBytes":5236}],"systemPromptSnippet":"<yakaai_skills repo=\"jarrodwatts/claude-hud\">\n<!-- File: CLAUDE.md (Tokens: ~715 | Category: claude-rule) -->\n# CLAUDE.md\n\nClaude HUD is a Claude Code plugin: a [status line](https://code.claude.com/docs/en/statusline) command that prints a two-line HUD (model, project, git, context, usage), plus opt-in lines for tools, agents, todos, and more.\n\n## Commands\n\n```bash\nnpm ci\nnpm test                           # builds dist/, then runs node --test\nnpm run test:update-snapshots      # regenerate tests/golden/expected.txt after an intended output change\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":45,\"context_window_size\":200000}}' | node dist/index.js\n```\n\n## How a render works\n\nClaude Code runs the command after each message, `/compact`, a mode change, a rate-limit reset, or a prompt-cache expiry (debounced 300ms), plus on `refreshInterval` if set. Each run is a fresh process:\n\n1. `stdin.ts` reads the payload. It targets Claude Code ≥ 2.1.260 and trusts its fields (`version`, `cost`, `prompt_cache`, `session_name`, `output_style`, `workspace.repo`, `rate_limits`) instead of deriving them.\n2. `config.ts` loads `plugins/claude-hud/config.json` plus the per-directory `claude-hud.json` override. `DEFAULT_CONFIG` is the schema; a rules table validates each key.\n3. `index.ts` gathers only what enabled elements need, in parallel: the transcript (`transcript.ts`), git or jj (`git.ts`, `jj.ts`), the extra command, memory, auth, config counts, the usage snapshot, the cost ledger, and speed state. All I/O and state writes happen here.\n4. `render/` turns that into lines without I/O. Each element has one implementation in `parts.ts`, `context.ts`, `usage.ts`, `vcs.ts`, `lines.ts`, and `activity.ts`. `expanded.ts` and `compact.ts` only arrange those parts, and `ansi.ts` measures and wraps.\n\n## Invariants\n\n- The default HUD is two lines. New display is opt-in; see the scope section of CONTRIBUTING.md.\n- Text from stdin, the transcript, git, or config is untrusted terminal input. Sanitize it (`utils/sanitize.ts`) before it's printed.\n- Rendering is pure: the clock and terminal width are sampled once in `renderLines`.\n- `tests/golden.test.js` pins end-to-end output. An output change must show up as a reviewed diff to `tests/golden/expected.txt`.\n- `dist/` is built by CI on main. Never commit it in a PR.\n- `README.md` and `README.zh.md` document every key in `DEFAULT_CONFIG`, and `tests/readme-options.test.js` enforces it.\n\n## Setup\n\n`/claude-hud:setup` (`commands/setup.md`) runs `scripts/setup.mjs`. That copies `scripts/statusline.mjs` to `<config dir>/plugins/claude-hud/` and points `statusLine.command` at it. The launcher runs the newest installed version, so plugin updates never need setup again. Plugins can't set `statusLine` themselves, so this step writes the user's `settings.json`.\n\nRuntime: Node.js 18+ or Bun. Build: TypeScript, ES2022, NodeNext modules.\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~181 | Category: marketplace) -->\n{\n  \"name\": \"claude-hud\",\n  \"owner\": {\n    \"name\": \"Jarrod Watts\",\n    \"email\": \"jarrodwattsyt@gmail.com\"\n  },\n  \"metadata\": {\n    \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n    \"version\": \"0.12.1\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"claude-hud\",\n      \"source\": \"./\",\n      \"description\": \"Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.\",\n      \"category\": \"monitoring\",\n      \"tags\": [\"hud\", \"statusline\", \"monitoring\", \"context\", \"tools\", \"agents\", \"todos\"]\n    }\n  ]\n}\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~180 | Category: plugin-manifest) -->\n{\n  \"name\": \"claude-hud\",\n  \"description\": \"Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress\",\n  \"version\": \"0.12.1\",\n  \"author\": {\n    \"name\": \"Jarrod Watts\",\n    \"url\": \"https://github.com/jarrodwatts\"\n  },\n  \"commands\": [\n    \"./commands/setup.md\",\n    \"./commands/configure.md\"\n  ],\n  \"homepage\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"repository\": \"https://github.com/jarrodwatts/claude-hud\",\n  \"license\": \"MIT\",\n  \"keywords\": [\"hud\", \"monitoring\", \"statusline\", \"context\", \"tools\", \"agents\", \"todos\", \"claude-code\"]\n}\n\n<!-- File: commands/configure.md (Tokens: ~946 | Category: command-prompt) -->\n---\ndescription: Configure HUD display options (layout, language, presets, display elements) while preserving advanced manual overrides\nallowed-tools: Read, Write, AskUserQuestion\n---\n\n# Configure Claude HUD\n\n## Read the current config\n\nThe config directory is `$CLAUDE_CONFIG_DIR` when set, otherwise `~/.claude`. Read these files if they exist:\n\n1. `plugins/claude-hud/config.json`: the base config. This command writes only this file.\n2. `claude-hud.json` in the config directory: a manual per-directory override. It uses the same shape and its values win. Never write or delete it.\n\nThe effective config is the base with the override layered on top: nested objects merge key by key, and arrays and scalars are replaced. Missing keys use the defaults in the README's configuration table. Use the effective values when describing the current state.\n\n## Ask\n\nAsk these with AskUserQuestion, in two batches of up to four. Put the current value in each question. In multi-select questions, every listed item becomes `true` if selected and `false` if not.\n\n**Layout** (single select)\n- \"Expanded\": `lineLayout: \"expanded\"`, `showSeparators: false`\n- \"Compact\": `lineLayout: \"compact\"`, `showSeparators: false`\n- \"Compact + separators\": `lineLayout: \"compact\"`, `showSeparators: true`\n\n**Activity lines** (multi-select)\n- \"Tools\": `display.showTools`\n- \"Agents\": `display.showAgents`\n- \"Todos\": `display.showTodos`\n- \"Skills & MCP\": `display.showSkills`, `display.showMcp`\n\n**Session info** (multi-select)\n- \"Cost\": `display.showCost`\n- \"Duration\": `display.showDuration`\n- \"Session name\": `display.showSessionName`\n- \"Reasoning effort\": `display.showEffortLevel`\n\n**Usage limits** (single select)\n- \"Bar (default)\": `display.showUsage: true`, `display.usageBarEnabled: true`, `display.usageCompact: false`\n- \"Text\": `display.showUsage: true`, `display.usageBarEnabled: false`, `display.usageCompact: false`\n- \"Compact\": `display.showUsage: true`, `display.usageCompact: true`\n- \"Hidden\": `display.showUsage: false`\n\n**Git** (single select)\n- \"Branch + dirty (default)\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: false`\n- \"Branch only\": `gitStatus.enabled: true`, `showDirty: false`, `showAheadBehind: false`, `showFileStats: false`\n- \"Ahead/behind\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: true`, `showFileStats: false`\n- \"File stats\": `gitStatus.enabled: true`, `showDirty: true`, `showAheadBehind: false`, `showFileStats: true`\n\n**Language** (single select)\n- \"Keep current\"\n- \"English\": `language: \"en\"`\n- \"简体中文\": `language: \"zh-Hans\"`\n- \"繁體中文\": `language: \"zh-Hant\"`\n\n**Custom line** (single select)\n- \"Keep current\"\n- \"Enter text\": ask for the text (max 80 characters) and save it as `display.customLine`\n- \"Remove\": shown only when one is set; saves `display.customLine: \"\"`\n\nIf the user cancels any question, say \"Configuration cancelled.\" and stop.\n\n## Preview and confirm\n\nCompute the changed keys by comparing against the effective config.\n\n- If nothing changed, say \"No changes needed - config unchanged.\" and stop.\n- Otherwise show each changed key as `key: old → new`.\n- If a changed key is also set in `claude-hud.json`, warn that the override still wins and show the effective value.\n\nThen ask \"Save these changes?\"\n\n## Write\n\nWrite `plugins/claude-hud/config.json`, creating directories as needed. Start from the existing base file and change only the selected keys. Keep every other key exactly as it was, including settings this command doesn't ask about, such as `colors`, thresholds, `elementOrder`, `mergeGroups`, and `display.externalUsage*`. Write valid JSON with 2-space indentation.\n\nThen say: \"Configuration saved! The HUD picks it up on its next refresh.\" Mention that the README documents every other option.\n\n<!-- File: commands/setup.md (Tokens: ~1376 | Category: command-prompt) -->\n---\ndescription: Configure claude-hud as your statusline\nallowed-tools: Bash, Read, AskUserQuestion\n---\n\nSet up claude-hud as the Claude Code status line. `${CLAUDE_PLUGIN_ROOT}` is this plugin's install directory. Placeholders in `{BRACES}` are values you fill in from earlier steps.\n\n## Step 1: Pick the shell\n\nClaude Code runs the statusLine command through bash on macOS, Linux, and WSL. On Windows it uses Git Bash when installed, otherwise PowerShell. Choose `{SHELL}` from the environment's `Platform:` and `Shell:`. On `win32`, also run `echo $OSTYPE` with the Bash tool.\n\n| Platform | Shell / OSTYPE | `{SHELL}` |\n|---|---|---|\n| `darwin`, `linux` (including WSL) | any | `posix` |\n| `win32` | Shell `bash`, or OSTYPE `msys` / `cygwin` | `gitbash` |\n| `win32` | anything else | `powershell` |\n\nWith `gitbash`, use bash syntax in every step: bash expands PowerShell's `$env:...` before PowerShell runs. In WSL, the plugin must be installed inside Linux, not on the Windows side.\n\n## Step 2: Find the runtime\n\n| `{SHELL}` | Command |\n|---|---|\n| `posix` | `command -v bun 2>/dev/null \\|\\| command -v node 2>/dev/null` |\n| `gitbash` | `command -v node 2>/dev/null` (Windows needs Node.js; don't use Bun) |\n| `powershell` | `(Get-Command node -ErrorAction SilentlyContinue).Source` |\n\nThe result is `{RUNTIME}`. The status line will run on the same runtime as the helper in the next steps.\n\nIf nothing is found, stop. Tell the user the current shell can't find Node.js (or Bun), even if Claude Code itself is installed. Point them to Node.js LTS from https://nodejs.org (`winget install OpenJS.NodeJS.LTS` on Windows) or Bun from https://bun.sh (macOS and Linux only). Then ask them to restart their shell and run `/claude-hud:setup` again.\n\n## Step 3: Inspect the current settings\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" inspect --shell {SHELL}\n```\n\nIn PowerShell, prefix the command with `&`. The helper prints JSON with:\n\n- `settingsPath`\n- `command`: the statusLine command it will install\n- `existing`: `none`, `claude-hud`, or `other`, for the current statusLine\n- `existingPreview`: a redacted preview of the current command\n\nIf it fails (for example, settings.json is not valid JSON), show the error and stop. Don't edit settings.json by hand.\n\nIf `existing` is `other`, ask with AskUserQuestion:\n\n- header: \"Existing statusline\"\n- question: \"You already have a status line: `{existingPreview}`. Replace it with claude-hud? settings.json is backed up first.\"\n- options: \"Replace it\" / \"Keep my current status line\"\n\nOn \"Keep\", stop without changing anything. Only ever show `existingPreview`, never the raw command, because it may contain secrets.\n\n## Step 4: Install\n\n```bash\n\"{RUNTIME}\" \"${CLAUDE_PLUGIN_ROOT}/scripts/setup.mjs\" install --shell {SHELL}\n```\n\nThis does the following:\n\n- Copies a launcher to `<config dir>/plugins/claude-hud/statusline.mjs`. The launcher always runs the newest installed claude-hud, so plugin updates never need setup again.\n- On `gitbash`, writes a `statusline.cmd` shim next to it. Launching through cmd.exe stops Git Bash from stranding suspended `node.exe` processes.\n- Backs up settings.json to the reported `backupPath`.\n- Saves a replaced command to `previousCommandPath`.\n- Writes `statusLine` and keeps every other setting.\n\nTest the result with sample input:\n\n```bash\necho '{\"model\":{\"display_name\":\"Opus\"},\"context_window\":{\"used_percentage\":12,\"context_window_size\":200000}}' | {COMMAND}\n```\n\n`{COMMAND}` is the `command` from the report. On `powershell`, test the launcher directly instead: `'<json>' | & \"{RUNTIME}\" \"<config dir>\\plugins\\claude-hud\\statusline.mjs\"`.\n\nIt should print two HUD lines within a few seconds. If it errors or prints nothing:\n\n1. Show the output.\n2. Restore the backup by copying `backupPath` over `settingsPath`.\n3. Stop.\n\n## Step 5: Finish\n\nClaude Code runs the new command as soon as settings.json changes, so the HUD should already be showing below the input field. Ask with AskUserQuestion:\n\n- header: \"claude-hud\"\n- question: \"Setup complete! The HUD should be showing below your input field. Is it working?\"\n- options:\n  - \"Yes, and star the repo ⭐\": run `gh repo star jarrodwatts/claude-hud`. If `gh` is missing or lacks that subcommand, run `gh api -X PUT /user/starred/jarrodwatts/claude-hud`, or give them https://github.com/jarrodwatts/claude-hud.\n  - \"Yes, it's working\"\n  - \"No, something's wrong\"\n\n**If yes**, tell the user in one line that they can change anything by asking, for example \"show tool activity in the HUD\" or \"use the compact layout\", or with `/claude-hud:configure`.\n\n**If no**, check these in order:\n\n1. Run the Step 4 test again and show its output.\n2. If there's no output, check that the plugin is installed: `ls \"<config dir>/plugins/cache/\"*/claude-hud/`. The launcher prints nothing when it finds no install. If the directory is missing, reinstall with `/plugin install claude-hud`.\n3. If the runtime moved (nvm, mise, and asdf upgrades change the path), run setup again.\n4. On Windows, dozens of idle `node.exe` processes come from a setup that predates the cmd.exe shim. Kill them and run setup again.\n5. To go back to the previous status line, copy `backupPath` over `settingsPath`.\n</yakaai_skills>"}