2026-01-03 20:31:52 +11:00
# Claude HUD
Real-time statusline showing context usage, active tools, running agents, and todo progress.
---
## For Humans
2026-01-03 21:51:51 +11:00
**Step 1: Add the marketplace**
```
/plugin marketplace add jarrodwatts/claude-hud
2026-01-03 20:31:52 +11:00
```
2026-01-03 21:51:51 +11:00
**Step 2: Install the plugin**
```
2026-01-03 22:49:07 +11:00
/plugin install claude-hud
2026-01-03 21:51:51 +11:00
```
2026-01-03 22:49:07 +11:00
**Step 3: Configure the statusline**
```
/claude-hud:setup
```
2026-01-03 21:51:51 +11:00
2026-03-20 06:15:33 +05:30
Done. Restart Claude Code to load the new statusLine config, then the HUD will appear.
2026-01-03 20:31:52 +11:00
---
## For LLM Agents
If you're an LLM agent helping a user install or work with Claude HUD, follow these steps.
<agent_workflow>
### Step 1: Check Prerequisites
Verify Claude Code version is 1.0.80 or later:
```bash
claude --version
```
If not installed or outdated, direct user to https://claude.ai/code
2026-01-03 21:51:51 +11:00
### Step 2: Add the Marketplace
2026-01-03 20:31:52 +11:00
2026-01-03 21:51:51 +11:00
Run this command in Claude Code:
```
/plugin marketplace add jarrodwatts/claude-hud
2026-01-03 20:31:52 +11:00
```
2026-01-03 21:51:51 +11:00
### Step 3: Install the Plugin
2026-01-03 20:31:52 +11:00
2026-01-03 21:51:51 +11:00
Run this command in Claude Code:
```
2026-01-03 22:49:07 +11:00
/plugin install claude-hud
2026-01-03 21:51:51 +11:00
```
2026-01-03 22:49:07 +11:00
### Step 4: Configure the Statusline
2026-01-03 21:51:51 +11:00
Run this command in Claude Code:
```
2026-01-03 22:49:07 +11:00
/claude-hud:setup
2026-01-03 20:31:52 +11:00
```
2026-01-03 22:49:07 +11:00
This adds the statusLine configuration to the user's settings.json.
2026-01-03 20:31:52 +11:00
2026-01-03 21:51:51 +11:00
### Step 5: Inform User
2026-01-03 20:31:52 +11:00
Tell the user:
- Installation complete
2026-03-20 06:15:33 +05:30
- Restart Claude Code to load the statusline config, then the HUD will appear
2026-01-03 20:31:52 +11:00
- It shows: context usage, active tools, running agents, and todo progress
2026-01-03 21:51:51 +11:00
### Step 6: Ask About Starring (Optional)
2026-01-03 20:31:52 +11:00
Ask the user: "Would you like to star the repository to support the project?"
Only if they explicitly agree, run:
```bash
2026-04-04 13:41:56 +11:00
if gh help repo 2>/dev/null | grep -q "star:"; then
gh repo star jarrodwatts/claude-hud
else
gh api -X PUT /user/starred/jarrodwatts/claude-hud
fi
2026-01-03 20:31:52 +11:00
```
Never run this automatically without user consent.
</agent_workflow>
---
## Reference
Technical documentation for agents who need to understand, modify, or debug Claude HUD.
2026-01-03 20:23:59 +11:00
<plugin>
<name>Claude HUD</name>
2026-01-03 20:27:46 +11:00
<description>Real-time statusline showing context usage, active tools, running agents, and todo progress. Always visible below your input, zero config required.</description>
2026-01-03 20:23:59 +11:00
<repository>github.com/jarrodwatts/claude-hud</repository>
2026-01-03 20:27:46 +11:00
<license>MIT</license>
2026-01-03 20:23:59 +11:00
</plugin>
<requirements>
2026-01-03 20:27:46 +11:00
<runtime>Node.js 18+ or Bun</runtime>
<claude_code>v1.0.80 or later</claude_code>
<build>TypeScript 5, ES2022 target, NodeNext modules</build>
2026-01-03 20:23:59 +11:00
</requirements>
2026-01-03 20:27:46 +11:00
<architecture>
<overview>
Claude HUD is a statusline plugin invoked by Claude Code every ~300ms.
2026-03-23 14:47:39 +11:00
It reads official statusline data from stdin plus local transcript/config data, renders up to 4 lines, and outputs to stdout.
2026-01-03 20:27:46 +11:00
</overview>
<data_flow>
Claude Code invokes the plugin →
Plugin reads JSON from stdin (model, context, tokens) →
Plugin parses transcript JSONL file (tools, agents, todos) →
Plugin reads config files (MCPs, hooks, rules) →
Plugin renders lines to stdout →
Claude Code displays the statusline
</data_flow>
<data_sources>
<stdin_json description="Native accurate data from Claude Code">
<field path="model.display_name">Current model name (Opus, Sonnet, Haiku)</field>
<field path="context_window.current_usage.input_tokens">Current token count</field>
<field path="context_window.context_window_size">Maximum context size</field>
2026-03-23 14:47:39 +11:00
<field path="rate_limits.five_hour.used_percentage">Subscriber 5-hour rate limit usage when provided</field>
<field path="rate_limits.five_hour.resets_at">5-hour rate limit reset timestamp when provided</field>
<field path="rate_limits.seven_day.used_percentage">Subscriber 7-day rate limit usage when provided</field>
<field path="rate_limits.seven_day.resets_at">7-day rate limit reset timestamp when provided</field>
2026-01-03 20:27:46 +11:00
<field path="transcript_path">Path to session transcript JSONL file</field>
<field path="cwd">Current working directory</field>
</stdin_json>
<transcript_jsonl description="Parsed from transcript file">
<item>tool_use blocks → tool name, target file, start time</item>
<item>tool_result blocks → completion status, duration</item>
<item>Running tools = tool_use without matching tool_result</item>
<item>TodoWrite calls → current todo list</item>
<item>Task calls → agent type, model, description</item>
</transcript_jsonl>
<config_files description="Read from Claude configuration">
<item>~/.claude/settings.json → mcpServers count, hooks count</item>
<item>CLAUDE.md files in cwd and ancestors → rules count</item>
<item>.mcp.json files → additional MCP count</item>
</config_files>
</data_sources>
</architecture>
<file_structure>
<directory name="src">
<file name="index.ts" purpose="Entry point, orchestrates data flow">
Reads stdin, parses transcript, counts configs, calls render.
Exports main() for testing with dependency injection.
</file>
<file name="stdin.ts" purpose="Parse JSON from stdin">
Reads and validates Claude Code's JSON input.
Returns StdinData with model, context, transcript_path.
</file>
<file name="transcript.ts" purpose="Parse transcript JSONL">
Parses the session transcript file line by line.
Extracts tools, agents, todos, and session start time.
Matches tool_use to tool_result by ID to calculate status.
</file>
<file name="config-reader.ts" purpose="Count configuration items">
Counts CLAUDE.md files, rules, MCP servers, and hooks.
feat: config system + usage API + bug fixes (supersedes #32) (#35)
* feat: display last 3 path segments first in session line
Shows the last 3 segments of the working directory path at the
beginning of the session line for quick project identification.
Before: [Opus 4.5] ████░░░░░░ 19% | my-project git:(main) | ...
After: dev/apps/my-project git:(main) | [Opus 4.5] ████░░░░░░ 19% | ...
This helps distinguish between projects with similar names in
different locations and puts the most relevant info first.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: configurable path levels (1-3) and git status toggle
- Add config system at ~/.claude/plugins/claude-hud/config.json
- Default path display to 1 level (was hardcoded at 3)
- Add pathLevels option: 1, 2, or 3 directory segments
- Add gitStatus.enabled toggle to show/hide git branch
- Add interactive CLI: npx claude-hud-configure
- Add comprehensive tests for config and path levels
- Update README with configuration documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: handle cross-platform path separators
- Split paths by both / and \ for Windows compatibility
- Always output forward slashes for consistent display
- Add tests for Windows paths, UNC paths, and mixed separators
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: show existing config when reconfiguring
- Display current values when config file exists
- Prompt user that Enter keeps current values
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: interactive CLI with arrow-key selection
- Add @inquirer/prompts for better UX
- Arrow keys to select path levels
- Visual feedback with checkmarks
- Cleaner, more compact output
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add dirty indicator and ahead/behind git status
- Add gitStatus.showDirty option (default: true)
- Add gitStatus.showAheadBehind option (default: false)
- Update getGitStatus to return isDirty, ahead, behind
- Update CLI to configure new options with preview
- Add tests for dirty and ahead/behind display
- Update README with new options
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add configurable display options for all HUD elements
- Add display configuration object with 8 boolean options:
- showModel: Toggle model name display [Opus]
- showContextBar: Toggle visual context bar ████░░░░░░
- showConfigCounts: Toggle CLAUDE.md, rules, MCPs, hooks counts
- showDuration: Toggle session duration display
- showTokenBreakdown: Toggle token details at high context (85%+)
- showTools: Toggle tools activity line
- showAgents: Toggle agents activity line
- showTodos: Toggle todos progress line
- All options default to true for backward compatibility
- Enhanced CLI preview with colors matching actual HUD output
- Added 5 new tests for display configuration (87 total)
- Updated README with complete configuration reference
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add configurable layout options (default, condensed, separators)
- Add layout config option with three styles:
- default: All info on first line (original behavior)
- condensed: Model/context top, project bottom
- separators: Condensed with visual separator lines
- Create project-line.ts for rendering project path in split layouts
- Add renderSessionLineMinimal for condensed/separators layouts
- Interactive CLI preview shows selected layout style
- All 87 tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add interactive HUD preview and folder icon
- Add live preview that updates as config options are selected
- Show initial preview on startup based on existing/default config
- Add folder icon (📁) in front of project path
- Extract preview generation to separate module for reuse
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: update README with folder icon and live preview
- Add folder icon (📁) to all path examples
- Document live preview feature in interactive CLI section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add menu-based navigation to configure CLI
- Replace linear flow with main menu loop
- Show current values in menu (layout, path levels, git status, etc.)
- Users can edit any section and return to menu
- Preview updates after each section change
- Save & Exit or Exit without saving options
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: update tests for folder icon and config structure
- Update integration test expected output with folder icon
- Make config test environment-independent (validates structure, not specific values)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add comprehensive config loading tests
Add 23 new tests for config system validation:
- DEFAULT_CONFIG structure (layout, gitStatus, 8 display options)
- Layout validation (default, condensed, separators)
- PathLevels validation (1, 2, or 3)
- Git status configuration defaults
- Display configuration (booleans, defaults to true, count)
- loadConfig behavior (complete fields, valid values)
- getConfigPath structure tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add usage API, config enhancements, and bug fixes
This PR combines and enhances the config system from PR #32 with new features
and bug fixes addressing the owner's review feedback.
## New Features
- Usage API integration showing 5h/7d limits for Pro/Max/Team users
- Interactive `/claude-hud:configure` skill for in-Claude-Code configuration
- Hybrid showUsage toggle (env var + config for privacy control)
## Bug Fixes (addressing #32 review feedback)
- Fix git status spacing: `main*↑2↓1` → `main* ↑2 ↓1`
- Fix root path rendering: show `/` instead of empty folder icon
- Fix Windows path normalization in truncatePath
- Fix duplicate dependencies key in package.json
- Fix multiSelect for mutually exclusive options in configure skill
## Credits
- Config system, layouts, path levels, git toggle, CLI by @Tsopic (PR #32)
- Usage API, configure skill, bug fixes by @melon-hub
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Tsopic <Tsopic@users.noreply.github.com>
* fix: move configure command to correct location
- Move configure.md from .claude-plugin/skills/ to commands/
- Remove skills array from plugin.json (commands are auto-discovered)
Commands must be in the commands/ directory at plugin root,
not inside .claude-plugin/. This matches the existing setup.md pattern.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: layout order, remove condensed, redesign configure flow
Render fixes (per PR feedback):
- Fix element order: model first, project second
- Remove condensed layout (only default/separators remain)
- Separators: single line below header only when activity exists
- Delete project-line.ts (no longer needed)
- Remove renderSessionLineMinimal() function
Configure skill redesign:
- Context-aware tab order (returning users start on Turn Off)
- Explicit Turn Off/Turn On questions (no toggle ambiguity)
- Git Style question for dirty/ahead-behind options
- Combined Layout/Reset tab for returning users
- Duration now toggleable
- Guards against empty submissions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: rename 'Returning User' to 'Update Config' in configure flow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: fix tests for new element order and removed function
- Update render-basic.txt expected output (model first, project second)
- Remove renderSessionLineMinimal import and test (function was deleted)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: update documentation for usage API, config flow, and troubleshooting
- Remove stale CLAUDE_HUD_SHOW_USAGE env var references (now config-based)
- Add usage API data sources to CLAUDE.md
- Add new source files to file structure (config.ts, git.ts, usage-api.ts)
- Update README with usage limits section and requirements
- Add troubleshooting sections for config, git, and usage issues
- Standardize output examples across all documentation files
- Remove condensed layout references (only default/separators now)
- Update configure skill reference (npx CLI → /claude-hud:configure)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: remove dist/ from PR and update outdated comment
- Reset dist/ to main branch (dist will be built by CI after merge)
- Update comment: "requires env var opt-in AND config" → "shown when enabled in config"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove internal design doc from release
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove CLI and runtime dependency
- Remove src/bin/configure.ts and src/bin/preview.ts
- Remove @inquirer/prompts dependency (plugins don't run npm install)
- Remove bin field from package.json
- Users configure via /claude-hud:configure skill instead
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: bump version to 0.0.4
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use file-based cache for usage API
HUD runs as a new process every ~300ms, so in-memory cache was useless.
Now caches to ~/.claude/plugins/claude-hud/.usage-cache.json.
This reduces API calls from ~10,800/hour to max 60/hour.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use consistent homeDir/now in getUsage
Avoids potential divergence if deps functions are non-deterministic.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add real tests for usage API file cache
- Test credential parsing with mock HOME directory
- Test cache TTL behavior (success and failure)
- Test apiUnavailable flag handling
- Replace placeholder assert.ok(true) with actual assertions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Martin Kask <martin@industrial.ninja>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: melon-hub <melon-hub@users.noreply.github.com>
Co-authored-by: Tsopic <Tsopic@users.noreply.github.com>
Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>
2026-01-07 16:00:32 +11:00
Searches cwd, ~/.claude/, and project .claude/ directories.
</file>
<file name="config.ts" purpose="Load and validate user configuration">
Reads config.json from ~/.claude/plugins/claude-hud/.
Validates and merges user settings with defaults.
Exports HudConfig interface and loadConfig function.
</file>
<file name="git.ts" purpose="Git repository status">
Gets branch name, dirty state, and ahead/behind counts.
Uses execFile with array args for safe command execution.
</file>
2026-01-03 20:27:46 +11:00
<file name="types.ts" purpose="TypeScript interfaces">
StdinData, ToolEntry, AgentEntry, TodoItem, TranscriptData, RenderContext.
</file>
</directory>
<directory name="src/render">
<file name="index.ts" purpose="Main render coordinator">
Calls each line renderer and outputs to stdout.
Conditionally shows lines based on data presence.
</file>
<file name="session-line.ts" purpose="Line 1: Session info">
2026-03-23 14:47:39 +11:00
Renders: [Model] █████░░░░░ 45% | project git:(branch) | 2 CLAUDE.md | 5h: 25% | ⏱️ 5m
2026-01-03 20:31:52 +11:00
Context bar colors: green (<70%), yellow (70-85%), red (>85%).
2026-01-03 20:27:46 +11:00
</file>
<file name="tools-line.ts" purpose="Line 2: Tool activity">
Renders: ◐ Edit: auth.ts | ✓ Read × 3 | ✓ Grep × 2
Shows running tools with spinner, completed tools aggregated.
</file>
<file name="agents-line.ts" purpose="Line 3: Agent status">
Renders: ◐ explore [haiku]: Finding auth code (2m 15s)
Shows agent type, model, description, elapsed time.
</file>
<file name="todos-line.ts" purpose="Line 4: Todo progress">
Renders: ▸ Fix authentication bug (2/5)
Shows current in_progress task and completion count.
</file>
<file name="colors.ts" purpose="ANSI color helpers">
Functions: green(), yellow(), red(), dim(), bold(), reset().
Used for colorizing output based on status/thresholds.
</file>
</directory>
</file_structure>
<output_format>
<line number="1" name="session" always_shown="true">
2026-03-23 14:47:39 +11:00
[Model] █████░░░░░ 45% | project git:(branch) | 2 CLAUDE.md | 5h: 25% | ⏱️ 5m
2026-01-03 20:27:46 +11:00
</line>
<line number="2" name="tools" shown_if="any tools used">
◐ Edit: auth.ts | ✓ Read × 3 | ✓ Grep × 2
</line>
<line number="3" name="agents" shown_if="agents active">
◐ explore [haiku]: Finding auth code (2m 15s)
</line>
<line number="4" name="todos" shown_if="todos exist">
▸ Fix authentication bug (2/5)
</line>
</output_format>
<context_thresholds>
<threshold range="0-70%" color="green" meaning="Healthy" />
<threshold range="70-85%" color="yellow" meaning="Warning" />
2026-01-05 14:48:21 +11:00
<threshold range="85%+" color="red" meaning="Critical, shows token breakdown" />
2026-01-03 20:27:46 +11:00
</context_thresholds>
<plugin_configuration>
2026-01-03 22:49:07 +11:00
<manifest>.claude-plugin/plugin.json</manifest>
<manifest_content>
{
"name": "claude-hud",
"description": "Real-time statusline HUD for Claude Code",
2026-01-03 23:51:45 +11:00
"version": "0.0.1",
2026-01-03 22:49:07 +11:00
"author": { "name": "Jarrod Watts", "url": "https://github.com/jarrodwatts" }
}
</manifest_content>
<note>The plugin.json contains metadata only. statusLine is NOT a valid plugin.json field.</note>
<statusline_config>
2026-01-03 23:51:45 +11:00
The /claude-hud:setup command adds statusLine to ~/.claude/settings.json with an auto-updating command that finds the latest installed version.
Updates are automatic - no need to re-run setup after updating the plugin.
2026-01-03 22:49:07 +11:00
</statusline_config>
2026-01-03 20:27:46 +11:00
</plugin_configuration>
<development>
<setup>
git clone https://github.com/jarrodwatts/claude-hud
cd claude-hud
npm ci
npm run build
</setup>
<test_commands>
npm test # Run all tests
npm run build # Compile TypeScript to dist/
</test_commands>
<manual_testing>
# Test with sample stdin data:
echo '{"model":{"display_name":"Opus"},"context_window":{"current_usage":{"input_tokens":45000},"context_window_size":200000}}' | node dist/index.js
# Test with transcript path:
echo '{"model":{"display_name":"Sonnet"},"transcript_path":"/path/to/transcript.jsonl","context_window":{"current_usage":{"input_tokens":90000},"context_window_size":200000}}' | node dist/index.js
</manual_testing>
</development>
<customization>
<extending description="How to add new features">
<step>Add new data extraction in transcript.ts or stdin.ts</step>
<step>Add new interface fields in types.ts</step>
<step>Create new render file in src/render/ or modify existing</step>
<step>Update src/render/index.ts to include new line</step>
<step>Run npm run build and test</step>
</extending>
<modifying_thresholds>
Edit src/render/session-line.ts to change context threshold values.
Look for the percentage checks that determine color coding.
</modifying_thresholds>
<adding_new_line>
1. Create src/render/new-line.ts with a render function
2. Import and call it from src/render/index.ts
3. Add any needed types to src/types.ts
4. Add data extraction logic to transcript.ts if needed
</adding_new_line>
</customization>
<troubleshooting>
<issue name="Statusline not appearing">
2026-01-03 22:49:07 +11:00
<cause>Plugin not installed or statusLine not configured</cause>
2026-01-03 21:51:51 +11:00
<solution>Run: /plugin marketplace add jarrodwatts/claude-hud</solution>
2026-01-03 22:49:07 +11:00
<solution>Run: /plugin install claude-hud</solution>
<solution>Run: /claude-hud:setup</solution>
2026-01-03 20:27:46 +11:00
<solution>Ensure Claude Code is v1.0.80 or later</solution>
</issue>
<issue name="Shows [claude-hud] Initializing...">
<cause>No stdin data received (normal on first invocation)</cause>
<solution>This is expected briefly on startup, should resolve automatically</solution>
</issue>
<issue name="Context percentage seems wrong">
<cause>Data comes directly from Claude Code - it's accurate</cause>
2026-03-23 12:14:05 +11:00
<solution>Claude HUD uses Claude Code's native context_window.used_percentage when available, then falls back to token-based calculation for older versions.</solution>
2026-01-03 20:27:46 +11:00
</issue>
<issue name="Tools/agents not showing">
<cause>No tools used yet or transcript not being parsed</cause>
<solution>Lines only appear when there's data to show</solution>
</issue>
<issue name="Build errors">
<solution>Ensure Node.js 18+ installed</solution>
<solution>Run npm ci to reinstall dependencies</solution>
<solution>Delete dist/ and node_modules/, then npm ci && npm run build</solution>
</issue>
</troubleshooting>
<key_interfaces>
<interface name="StdinData">
transcript_path?: string
cwd?: string
model?: { id?: string, display_name?: string }
2026-03-23 12:14:05 +11:00
context_window?: { used_percentage?: number, context_window_size?: number, current_usage?: { input_tokens?: number } }
2026-01-03 20:27:46 +11:00
</interface>
<interface name="ToolEntry">
id: string
name: string
target?: string
status: 'running' | 'completed' | 'error'
startTime: Date
endTime?: Date
</interface>
<interface name="AgentEntry">
id: string
type: string
model?: string
description?: string
status: 'running' | 'completed'
startTime: Date
endTime?: Date
</interface>
<interface name="TodoItem">
content: string
status: 'pending' | 'in_progress' | 'completed'
</interface>
<interface name="RenderContext">
stdin: StdinData
transcript: TranscriptData
claudeMdCount: number
rulesCount: number
mcpCount: number
hooksCount: number
sessionDuration: string
</interface>
</key_interfaces>
<task_instructions>
<install>
2026-01-03 20:31:52 +11:00
Follow the agent_workflow steps above.
2026-01-03 20:27:46 +11:00
</install>
<modify>
If the user wants to modify Claude HUD:
1. Clone the repo or navigate to the plugin directory
2. Make changes following the file_structure section
3. Run npm run build to compile
4. Restart Claude Code to see changes
</modify>
<debug>
If the user reports issues:
1. Check troubleshooting section first
2. Verify Claude Code version (needs v1.0.80+)
2026-01-03 20:31:52 +11:00
3. Check if plugin is listed: claude /plugin list
2026-01-03 20:27:46 +11:00
4. Test manually with echo command from development section
</debug>
<understand>
If the user asks how something works:
1. Reference the architecture and data_flow sections
2. Point to specific files in file_structure
3. Explain the data sources and how they're combined
</understand>
</task_instructions>