CAP

skill
Security Audit
Fail
Health Warn
  • License Ò€” License: MIT
  • Description Ò€” Repository has a description
  • Active repo Ò€” Last push 0 days ago
  • Low visibility Ò€” Only 7 GitHub stars
Code Fail
  • fs module Ò€” File system access in scripts/setup-statusline.sh
  • rm -rf Ò€” Recursive force deletion command in scripts/uninstall.sh
  • fs module Ò€” File system access in scripts/uninstall.sh
  • execSync Ò€” Synchronous shell command execution in scripts/usage-hud.mjs
  • process.env Ò€” Environment variable access in scripts/usage-hud.mjs
  • network request Ò€” Outbound network request in scripts/usage-hud.mjs
Permissions Pass
  • Permissions Ò€” No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

🧒 CAP β€” Claude Allowance Pulse. Simple Claude Code HUD Plugin.

README.md

Claude Code Plugin Version Zero Dependencies License

🧒 CAP

Claude Allowance Pulse

A lightweight Claude Code statusline plugin that displays
usage limits, context window, cost, and update alerts in real time.

Zero bloat. Zero dependencies. Just the statusline.


πŸ™ Opus 4.6 β”‚ 🧺 73%(4h32m) β”‚ πŸ“… Week: 45%(3d21h)
πŸ—ƒοΈ 42% ctx β”‚ πŸ’° $0.47 β”‚ Update πŸ‘Ύ

πŸ‡°πŸ‡· ν•œκ΅­μ–΄ λ¬Έμ„œ


What It Shows

Segment Description
πŸ™ Opus 4.6 Current model (Opus=πŸ™, Sonnet=β˜„οΈ, Haiku=πŸ’¨)
🧺 73%(4h32m) 5-hour window utilization + time until reset
πŸ“… Week: 45%(3d21h) 7-day window utilization + time until reset
πŸ—ƒοΈ 42% ctx Context window usage
πŸ’° $0.47 Session cost so far
Update πŸ‘Ύ Shown only when a new version is available

Line 1 displays model, 5-hour session usage (with reset countdown), and weekly usage.

Line 2 displays context window percentage, accumulated session cost, and update alerts.

Color Coding

Usage percentages change color as they increase:

Utilization Color
< 50% 🟒 Green
50–69% 🟑 Yellow
70–84% 🟑 Yellow (Bold)
>= 85% πŸ”΄ Red (Bold)

Installation

Inside Claude Code:

/plugin marketplace add PeterCha90/CAP
/plugin install cap

Then apply the statusline with one of these methods:

  1. Run /cap:setup inside Claude Code (recommended β€” works on all platforms)
  2. Run /reload-plugins to reload plugins
  3. Restart Claude Code

The HUD will appear at the bottom of your terminal.


Customization

Edit scripts/usage-hud.mjs:

Setting Default Description
USAGE_TTL 60000 (60s) How long to cache Usage API responses. Increase to 120000 if you hit 429 rate limits.
UPDATE_TTL 21600000 (6h) How often to check for new versions
Color thresholds 50/70/85% Breakpoints for green/yellow/red color transitions

Uninstall

Inside Claude Code:

/cap:uninstall

Or manually:

bash ~/.claude/plugins/cap/scripts/uninstall.sh

This will:

  • Restore your previous statusLine setting (if a backup exists)
  • Remove all cache files
  • Delete the plugin directory

Restart Claude Code after running the script.


Troubleshooting

Problem Solution
HUD not showing Run /cap:setup to configure the statusline, then restart Claude Code
HUD not showing after /reload-plugins (Windows) /reload-plugins may not configure the statusline on Windows. Run /cap:setup instead
Usage shows -- OAuth token not found β€” verify with security find-generic-password -s "Claude Code-credentials" -w
Frequent 429 errors Increase USAGE_TTL to 120000 or higher
Stale data Delete cache files in ~/.claude/hud/ and restart

Project Structure

cap/
β”œβ”€β”€ .claude-plugin/
β”‚   β”œβ”€β”€ plugin.json          # Plugin manifest
β”‚   └── marketplace.json     # Marketplace manifest
β”œβ”€β”€ commands/
β”‚   β”œβ”€β”€ setup.md             # /cap:setup
β”‚   β”œβ”€β”€ status.md            # /cap:status
β”‚   └── uninstall.md         # /cap:uninstall
β”œβ”€β”€ hooks/
β”‚   └── hooks.json           # SessionStart hook
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ usage-hud.mjs        # Main statusline script
β”‚   β”œβ”€β”€ setup-statusline.sh  # Auto-config on session start
β”‚   └── uninstall.sh         # Clean uninstall script
β”œβ”€β”€ skills/
β”‚   └── usage-hud/
β”‚       └── SKILL.md         # HUD configuration skill
β”œβ”€β”€ package.json
└── LICENSE

License

MIT


Made by Peter Cha

Reviews (0)

No results found