By SeamusMullan
Real-time cost guardrails for Claude Code. Intercepts expensive habits, shows live spend.
Launch the proompt-police TUI dashboard — live spend, cache efficiency, habit scoreboard, top cost turns.
Control proompt-police cost guards. Show status, toggle rules on/off, set budget. Usage: /proompt-police:thrift [status|on <id>|off <id>|budget <usd>|add]
Stop expensive Claude Code habits before they hit your bill.
Guards intercept the four biggest output-token cost drivers in real time and ask for the cheap path. A live statusline badge shows cost, tokens, cache hit rate, and recent guard fires.
| Guard | Trigger | What it asks |
|---|---|---|
raw-log-dump | gh run view --log, cat *.log, journalctl, docker logs with no filter pipe | Re-run piped to grep/tail |
subagent-bloat | Agent/Task prompt containing "thorough", "comprehensive", "everything", etc. | Rewrite for bullet-point output, cap 150 lines |
write-over-edit | Write of >4000 chars onto an existing file | Use Edit for the changed regions instead |
opus-on-routine | Trivial grep/find/ls/cat while on Opus | Advisory only — statusline shows Opus⚠, no block |
All guards use ask mode — you can approve or have Claude retry the cheap way. Nothing is hard-blocked.
claude plugin marketplace add SeamusMullan/proompt-police
claude plugin install proompt-police@proompt-police
claude --plugin-dir /path/to/proompt-police
proompt-police adds a statusline segment:
$0.42 ⬆12.3k ⬇48.1k cache 91% Sonnet 4.6 guards:4
If you have the caveman plugin, wire the compositor into ~/.claude/settings.json once to show both segments:
{
"statusLine": {
"type": "command",
"command": "node \"/path/to/proompt-police/bin/statusline-compositor.js\""
}
}
The compositor auto-discovers caveman's statusline script — no hardcoded paths.
Without caveman, point directly at the proompt-police statusline:
{
"statusLine": {
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/statusline.js\""
}
}
Note: Claude Code supports one
statusLinecommand. If your global~/.claude/settings.jsonalready defines one, it takes precedence over the plugin'ssettings.json. Use the compositor to combine them.
/proompt-police:thrift — show guard status, spend, budget
/proompt-police:thrift off <id> — disable a guard (live, no restart)
/proompt-police:thrift on <id> — re-enable
/proompt-police:thrift budget <usd> — set statusline amber/red threshold
/proompt-police:thrift add — scaffold a custom rule
thrift-dashboard <path/to/transcript.jsonl>
Shows: cumulative spend, output-token sparkline, cost by model, cache efficiency, habit scoreboard (which guards fire most), top output-token turns.
The transcript path is available via CLAUDE_TRANSCRIPT_PATH env, or printed by the SessionStart hook on init.
Drop a ~/.claude/proompt-police/rules.json file. Rules here overlay the builtins — same id overrides, new id appends. Takes effect on the next tool call, no restart needed.
[
{
"id": "my-rule",
"enabled": true,
"tools": ["Bash"],
"when": {
"field": "command",
"matchesAny": ["my-expensive-command"]
},
"ask": "Reason shown in the permission prompt."
}
]
Predicate vocabulary: matchesAny, matchesAll, andNot (regex on a field), minLength, maxLength, fileExists.
Disable a builtin without touching the file:
/proompt-police:thrift off raw-log-dump
~/.claude/proompt-police/state.json — written by the /thrift skill:
{ "disabled": ["raw-log-dump"], "budgetUsd": 5 }
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub seamusmullan/proompt-police --plugin proompt-policeUltra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.