Install command
Not provided
Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics.
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Not provided
Config snippet
Provided
Copy snippet
Provided
Prerequisites
6 to clear
Platforms
1 listed
Difficulty
7/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Prerequisite readiness
6 prerequisites to line up before setup.
Safety & privacy surface
1 safety and 1 privacy notes across 1 risk area. Review closely: credentials & tokens.
#!/usr/bin/env bash
# AI Model Performance Dashboard for Claude Code
# Displays: Occupancy % | Truncation | TTFT | Tokens/min | Model Limits
# Read JSON from stdin
read -r input
# Extract values
model=$(echo "$input" | jq -r '.model // "unknown"')
prompt_tokens=$(echo "$input" | jq -r '.session.promptTokens // 0')
completion_tokens=$(echo "$input" | jq -r '.session.completionTokens // 0')
total_tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
session_start=$(echo "$input" | jq -r '.session.startTime // ""')
# Model context limits (2025 verified)
case "$model" in
*"claude-sonnet-4"*|*"claude-4"*)
context_limit=1000000
model_display="Claude Sonnet 4"
;;
*"claude-3.5"*|*"claude-sonnet-3.5"*)
context_limit=200000
model_display="Claude 3.5 Sonnet"
;;
*"gpt-4.1"*|*"gpt-4-turbo"*)
context_limit=1000000
model_display="GPT-4.1 Turbo"
;;
*"gpt-4o"*)
context_limit=128000
model_display="GPT-4o"
;;
*"gemini-1.5-pro"*)
context_limit=2000000
model_display="Gemini 1.5 Pro"
;;
*"gemini-2"*)
context_limit=1000000
model_display="Gemini 2.x"
;;
*"grok-3"*)
context_limit=1000000
model_display="Grok 3"
;;
*"grok-4"*)
context_limit=256000
model_display="Grok 4"
;;
*"llama-4"*)
context_limit=10000000
model_display="Llama 4 Scout"
;;
*)
context_limit=100000
model_display="$model"
;;
esac
# Calculate occupancy percentage
if [ $context_limit -gt 0 ]; then
occupancy=$((prompt_tokens * 100 / context_limit))
else
occupancy=0
fi
# Occupancy color coding
if [ $occupancy -lt 50 ]; then
OCC_COLOR="\033[38;5;46m" # Green: < 50%
elif [ $occupancy -lt 80 ]; then
OCC_COLOR="\033[38;5;226m" # Yellow: 50-80%
else
OCC_COLOR="\033[38;5;196m" # Red: > 80%
fi
# Truncation warning (models fail before advertised limits)
reliable_limit=$((context_limit * 65 / 100)) # 65% of claimed limit
if [ $prompt_tokens -gt $reliable_limit ]; then
truncation="⚠ TRUNCATION RISK"
TRUNC_COLOR="\033[38;5;196m"
else
truncation="✓ Safe"
TRUNC_COLOR="\033[38;5;46m"
fi
# Calculate tokens per minute
if [ -n "$session_start" ]; then
current_time=$(date +%s)
start_epoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$session_start" +%s 2>/dev/null || echo "$current_time")
elapsed_seconds=$((current_time - start_epoch))
if [ $elapsed_seconds -gt 0 ]; then
tokens_per_min=$((total_tokens * 60 / elapsed_seconds))
else
tokens_per_min=0
fi
else
tokens_per_min=0
fi
# Format numbers with commas
formatNumber() {
printf "%'d" "$1" 2>/dev/null || echo "$1"
}
# TTFT simulation (Time to First Token - would need actual timing)
# For demo purposes, estimate based on tokens
if [ $prompt_tokens -gt 50000 ]; then
ttft="~2.5s"
TTFT_COLOR="\033[38;5;226m"
elif [ $prompt_tokens -gt 10000 ]; then
ttft="~1.2s"
TTFT_COLOR="\033[38;5;46m"
else
ttft="~0.8s"
TTFT_COLOR="\033[38;5;46m"
fi
RESET="\033[0m"
BOLD="\033[1m"
# Build dashboard (multi-line for comprehensive view)
echo -e "${BOLD}📊 ${model_display}${RESET}"
echo -e "${OCC_COLOR}Occupancy: ${occupancy}%${RESET} ($(formatNumber $prompt_tokens)/$(formatNumber $context_limit) tokens) | ${TRUNC_COLOR}${truncation}${RESET}"
echo -e "${TTFT_COLOR}TTFT: ${ttft}${RESET} | Rate: ${tokens_per_min} tok/min | Total: $(formatNumber $total_tokens)"{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/ai-model-performance-dashboard.sh"
}
}{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/ai-model-performance-dashboard.sh"
}
}
Extended version with cost per token and total cost metrics
#!/usr/bin/env bash
# Enhanced AI Model Performance Dashboard with Cost Tracking
input=$(cat)
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"')
prompt_tokens=$(echo "$input" | jq -r '.session.promptTokens // 0')
total_tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
session_start=$(echo "$input" | jq -r '.session.startTime // ""')
# Model context limits and pricing (2025)
case "$model" in
*"claude-sonnet-4"*|*"claude-opus-4"*)
context_limit=1000000
model_display="Claude Sonnet 4"
cost_per_1k_input=0.003
cost_per_1k_output=0.015
;;
*"gpt-4.1"*|*"gpt-4-turbo"*)
context_limit=1000000
model_display="GPT-4.1 Turbo"
cost_per_1k_input=0.01
cost_per_1k_output=0.03
;;
*)
context_limit=100000
model_display="$model"
cost_per_1k_input=0.001
cost_per_1k_output=0.002
;;
esac
occupancy=$((prompt_tokens * 100 / context_limit))
reliable_limit=$((context_limit * 65 / 100))
if [ $prompt_tokens -gt $reliable_limit ]; then
truncation="⚠ TRUNCATION RISK"
TRUNC_COLOR="\033[38;5;196m"
else
truncation="✓ Safe"
TRUNC_COLOR="\033[38;5;46m"
fi
if [ $occupancy -lt 50 ]; then
OCC_COLOR="\033[38;5;46m"
elif [ $occupancy -lt 80 ]; then
OCC_COLOR="\033[38;5;226m"
else
OCC_COLOR="\033[38;5;196m"
fi
# Calculate tokens/min
if [ -n "$session_start" ]; then
current_time=$(date +%s)
start_epoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$session_start" +%s 2>/dev/null || date -d "$session_start" +%s 2>/dev/null || echo "$current_time")
elapsed_seconds=$((current_time - start_epoch))
tokens_per_min=$((elapsed_seconds > 0 ? total_tokens * 60 / elapsed_seconds : 0))
else
tokens_per_min=0
fi
formatNumber() { printf "%'d" "$1" 2>/dev/null || echo "$1"; }
RESET="\033[0m"
BOLD="\033[1m"
echo -e "${BOLD}📊 ${model_display}${RESET}"
echo -e "${OCC_COLOR}Occupancy: ${occupancy}%${RESET} ($(formatNumber $prompt_tokens)/$(formatNumber $context_limit)) | ${TRUNC_COLOR}${truncation}${RESET}"
echo -e "Rate: $(formatNumber $tokens_per_min) tok/min | Cost: $${cost} | Total: $(formatNumber $total_tokens)"
Configurable truncation threshold for different risk tolerances
#!/usr/bin/env bash
# AI Model Performance Dashboard with Custom Reliable Limit
# Configure via RELIABLE_LIMIT_PERCENT environment variable (default 65%)
input=$(cat)
RELIABLE_LIMIT_PERCENT=${RELIABLE_LIMIT_PERCENT:-65}
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"')
prompt_tokens=$(echo "$input" | jq -r '.session.promptTokens // 0')
total_tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
# Model context limits
case "$model" in
*"claude-sonnet-4"*|*"claude-opus-4"*)
context_limit=1000000
model_display="Claude Sonnet 4"
;;
*"gpt-4.1"*|*"gpt-4-turbo"*)
context_limit=1000000
model_display="GPT-4.1 Turbo"
;;
*"gemini-1.5-pro"*)
context_limit=2000000
model_display="Gemini 1.5 Pro"
;;
*)
context_limit=100000
model_display="$model"
;;
esac
occupancy=$((prompt_tokens * 100 / context_limit))
reliable_limit=$((context_limit * RELIABLE_LIMIT_PERCENT / 100))
if [ $prompt_tokens -gt $reliable_limit ]; then
truncation="⚠ TRUNCATION RISK"
TRUNC_COLOR="\033[38;5;196m"
else
truncation="✓ Safe"
TRUNC_COLOR="\033[38;5;46m"
fi
if [ $occupancy -lt 50 ]; then
OCC_COLOR="\033[38;5;46m"
elif [ $occupancy -lt 80 ]; then
OCC_COLOR="\033[38;5;226m"
else
OCC_COLOR="\033[38;5;196m"
fi
formatNumber() { printf "%'d" "$1" 2>/dev/null || echo "$1"; }
RESET="\033[0m"
BOLD="\033[1m"
echo -e "${BOLD}📊 ${model_display}${RESET}"
echo -e "${OCC_COLOR}Occupancy: ${occupancy}%${RESET} ($(formatNumber $prompt_tokens)/$(formatNumber $context_limit)) | ${TRUNC_COLOR}${truncation}${RESET} (limit: ${RELIABLE_LIMIT_PERCENT}%)"
echo -e "Total: $(formatNumber $total_tokens) tokens"
Complete setup script with model limit updates
#!/bin/bash
# Installation script for AI Model Performance Dashboard
mkdir -p .claude/statuslines
cat > .claude/statuslines/ai-model-performance-dashboard.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash
# Paste the full statusline script from the primary example above before running this installer.
SCRIPT_EOF
chmod +x .claude/statuslines/ai-model-performance-dashboard.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/ai-model-performance-dashboard.sh"}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/ai-model-performance-dashboard.sh"}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "AI Model Performance Dashboard installed successfully!"
echo "Note: Update model context limits in script as new models are released."
Verify session.promptTokens exists in JSON: jq .session.promptTokens. Check context_limit set correctly for model. Test calculation: echo $((100000 * 100 / 1000000)) (should be 10). Ensure integer division working. Verify prompt_tokens is numeric: echo "$prompt_tokens" | grep -E '^[0-9]+$'.
Check model string extraction: jq -r '.model.id // .model.display*name'. Verify case statement matches model name pattern. Test model matching: echo "$model" | grep -i 'claude-sonnet-4'. Add custom model: Add case for *"your-model"_) context_limit=X ;; before default case. Check model name format in Claude Code JSON output.
Verify session.startTime format: jq -r '.session.startTime'. Check date parsing works: macOS (date -j -f '%Y-%m-%dT%H:%M:%SZ' '2025-10-23T10:00:00Z' +%s) or Linux (date -d '2025-10-23T10:00:00Z' +%s). Ensure elapsed_seconds > 0. Check timezone handling. Verify session_start is not empty.
Check printf thousands separator support: printf "%'d" 1000000. If unsupported, formatNumber falls back to raw echo. Enable locale: export LC_NUMERIC=en_US.UTF-8. Test: locale | grep LC_NUMERIC. Verify printf supports ' flag (POSIX extension). Use alternative: sed 's/([0-9]{1,3})$/\1/' for basic formatting.
Adjust reliable_limit calculation (currently 65% of context_limit). Research shows models fail 30-35% before claimed limits. Increase for conservative: reliable_limit=$((context_limit * 50 / 100)). Decrease for aggressive: reliable_limit=$((context_limit * 75 / 100)). Set via environment variable: export RELIABLE_LIMIT_PERCENT=70. Test with known token counts.
TTFT is estimated based on prompt_tokens, not actual measured latency. For accurate TTFT, integrate with Claude Code API response timing. Current estimation: <10k tokens (~0.8s), 10k-50k (~1.2s), >50k (~2.5s). Consider adding actual timing measurement if Claude Code exposes response start time in JSON.
Verify terminal supports 256-color mode: echo $TERM (should include '256color' or 'xterm-256color'). Check ANSI code format: Use \033[38;5;Xm for 256-color mode. Test colors: echo -e '\033[38;5;46mGreen\033[0m'. Verify echo -e flag is used. Check terminal emulator color support settings.
Verify echo -e flag is used for escape sequence interpretation. Check terminal supports multi-line statuslines (Claude Code feature). Test: echo -e "Line 1\nLine 2". Some terminals may collapse multi-line output. Consider single-line format if multi-line not supported.
Show that AI Model Performance Dashboard - Statuslines is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/statuslines/ai-model-performance-dashboard)AI Model Performance Dashboard - Statuslines side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
1 trust signal differ across this comparison (Submitter).
| Field | Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics. Open dossier | Claude Code statusline that estimates context pressure from local session token counts and a configurable context limit, then prints a compact risk tier. Open dossier | Claude Code statusline that reads the active model identifier from session input and displays real-time token usage as a percentage of the context window, with green/yellow/red color-coded warnings. Open dossier | A Claude Code statusline that reads the session JSON on stdin and splits total_duration_ms into API processing time versus network/waiting time (total minus API). Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| SubmitterDiffers | — | MkDev11 | — | — |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | — |
| Category | statuslines | statuslines | statuslines | statuslines |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | MkDev11 | JSONbored | JSONbored |
| Added | 2025-10-23 | 2026-06-04 | 2025-10-16 | 2025-10-25 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Context percentage is only as accurate as the configured limit and the usage fields available in the statusline input. Use the warning as a cue to summarize or checkpoint work before context pressure affects reasoning quality. Do not treat a low percentage as proof that all relevant files, instructions, or tool results are still in scope. | ✓Reads session JSON from stdin and writes formatted text to stdout only; does not modify files or make network calls. | ✓Configured as a command-type statusline, so the script runs automatically on every status update. The Examples "Installation" script writes .claude/statuslines/api-latency-breakdown.sh and edits .claude/settings.json, and runs brew/apt-get/yum to install bc. |
| Privacy notes | ✓Reads the Claude Code statusline JSON from stdin (model, token usage, context occupancy) and renders it in the local terminal; it does not send data off-machine. | ✓The script reads local session counters and does not inspect prompt text, files, or transcript contents. Token counts and configured limits can still reveal workload size in screenshots or shared terminal logs. Teams should avoid placing customer names or project identifiers in shell variables that appear in debugging output. | ✓Processes token counts and model identifiers from the local Claude Code session input; no data is sent externally. | ✓The Examples "Enhanced P95" variant appends every measured network time to /tmp/claude_latency_history.txt, leaving session timing data on disk until manually cleared. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Production quickstart for the Claude Agent SDK with bootstrap and guardrails.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.