Back to list
yonatangross

claude-hud

by yonatangross

The Complete AI Development Toolkit for Claude Code — 159 skills, 34 agents, 20 commands, 144 hooks. Production-ready patterns for FastAPI, React 19, LangGraph, security, and testing.

29🍴 4📅 Jan 23, 2026

SKILL.md


name: claude-hud description: Configure Claude Code statusline with context window monitoring using CC 2.1.6 fields. Use when configuring statusline, monitoring context, displaying HUD. context: inherit version: 1.0.0 author: OrchestKit tags: [statusline, hud, context, monitoring, cc216] user-invocable: true

Claude HUD - Status Line Configuration

Overview

Use this skill when you need to:

  • Monitor context window usage in real-time
  • Configure statusline display for Claude Code
  • Set up visual thresholds for context management
  • Track session costs and duration

Configure Claude Code's statusline to display real-time context window usage and session information using CC 2.1.6 fields.

Quick Setup

Add to your .claude/settings.json:

{
  "statusline": {
    "enabled": true,
    "template": "[CTX: {{context_window.used_percentage}}%] {{session.cost}}"
  }
}

Available Fields (CC 2.1.6)

FieldDescriptionExample
context_window.used_percentageCurrent context usage as percentage45
context_window.remaining_percentageAvailable context as percentage55
session.costCurrent session cost$0.23
session.durationSession duration15m

CC 2.1.7 New Fields

FieldDescriptionExample
turn.durationCurrent turn duration2.3s
context_window.effectiveEffective window size160000
context_window.effective_percentageUsage vs effective window28
mcp.deferredMCP tools deferred statustrue

Turn Duration Display (CC 2.1.7)

Enable turn duration tracking in your statusline:

{
  "statusline": {
    "enabled": true,
    "showTurnDuration": true,
    "template": "[CTX: {{context_window.used_percentage}}%] [Turn: {{turn.duration}}]"
  }
}

Effective Context Window

CC 2.1.7 uses the effective context window rather than the static maximum:

Static Max:    200,000 tokens (theoretical limit)
Effective:     160,000 tokens (actual usable after overhead)
Your Usage:     45,000 tokens (28% of effective)

Visual States

Context usage thresholds help you know when to act.

CC 2.1.14 Context Window Fix: Claude Code now uses 98% of the context window (previously capped at ~65%). Thresholds below are calculated against the effective window (160K tokens for 200K max after ~20% system overhead).

[CTX: 45%] ████████░░░░░░░░ - GREEN:  Plenty of room, work freely
[CTX: 72%] ██████████████░░ - YELLOW: Watch usage, consider chunking
[CTX: 89%] █████████████████ - ORANGE: Consider compacting soon
[CTX: 97%] ██████████████████ - RED:    COMPACT NOW or lose context

Note: These percentages are of the effective window (~160K tokens), not the static 200K max. A 50% reading means ~80K tokens used.

StateUsageAction
GREEN< 60%Normal operation
YELLOW60-80%Break large tasks into chunks
ORANGE80-95%Use /context-compression or summarize
RED> 95%COMPACT IMMEDIATELY

Configuration Options

Basic Template

{
  "statusline": {
    "enabled": true,
    "template": "[{{context_window.used_percentage}}%]"
  }
}

With Cost Tracking

{
  "statusline": {
    "enabled": true,
    "template": "[CTX: {{context_window.used_percentage}}%] Cost: {{session.cost}}"
  }
}

With Progress Bar

{
  "statusline": {
    "enabled": true,
    "template": "[CTX: {{context_window.used_percentage}}%]",
    "elements": {
      "context_bar": {
        "field": "context_window.used_percentage",
        "format": "bar",
        "thresholds": {
          "normal": 60,
          "warning": 80,
          "critical": 95
        }
      }
    }
  }
}

Integration with OrchestKit

Automatic Context Management

OrchestKit's hooks can automatically suggest compression when context gets high:

# In hooks/posttool/context-monitor.sh
if [ "$CONTEXT_USED_PCT" -gt 80 ]; then
  echo "SUGGESTION: Consider using /ork:context-compression"
fi

Progressive Loading Optimization

When context is above 60%, OrchestKit automatically:

  1. Uses Tier 1 discovery more aggressively
  2. Loads smaller reference files
  3. Suggests skill completion before loading new skills

Troubleshooting

Statusline Not Showing

  1. Verify CC version: claude --version (need >= 2.1.6)
  2. Check settings.json syntax
  3. Restart Claude Code session

Incorrect Percentages

Context percentages are calculated from:

  • System prompt size
  • Conversation history
  • Loaded skills and context files
  • Pending tool outputs

If numbers seem off, check for large files loaded in context.

VSCode Integration (CC 2.1.14)

When using Claude Code in VSCode, additional features are available:

/usage Command

Display current plan usage directly in VSCode:

/usage

Shows:

  • Tokens used in current billing period
  • Cost breakdown by model
  • Remaining quota (if applicable)

VSCode Status Bar

The statusline integrates with VSCode's status bar. Configure in VSCode settings:

{
  "claudeCode.statusBar.enabled": true,
  "claudeCode.statusBar.position": "right"
}
  • context-compression: Reduce context when hitting limits
  • context-engineering: Optimize what goes in context
  • brainstorming: Use before loading heavy context

Version Requirements

  • Claude Code: >= 2.1.14
  • Fields Available: CC 2.1.6 + CC 2.1.7 (turn.duration, context_window.effective, mcp.deferred)
  • VSCode Features: CC 2.1.14 (/usage command)

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon