By broisnischal
Always-on efficiency discipline for Claude Code — triage token spend to task size, write minimal correct code, take fewer round-trips, keep context lean. Ships three skills plus guard/state/status hooks.
Coding discipline — minimal correct code with zero slop and zero wasted round-trips. Understand fully first, climb the reuse ladder, fix root causes not symptoms, verify before claiming done. Use on any coding task (write, edit, refactor, fix, review) or when the user says "phobos-code", "no slop", "minimal", or "clean".
Analyze the user's request before acting — extract every ask, resolve ambiguity in one batch, order work by dependency and risk, and decide what to do first. Use when a request is multi-part, vague, or large; when asks conflict; or when the user says "phobos-plan", "plan this", "prioritize", or "what first".
Always-on efficiency discipline — triage token spend to task size, write minimal correct code, answer terse-but-complete, take fewer round-trips, keep context lean, use memory, and route to the right tool. Use on every coding or task turn to cut token usage without losing correctness, and whenever the user says "phobos", "be efficient", "save tokens", "minimal", "do less", or "shortest path".
Executes bash commands
Hook triggers when Bash tool is used
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.
Skills and hooks for Claude Code that cut down on wasted tokens. Skills steer the model, hooks enforce it. Nothing runs in the request path.

git clone https://github.com/broisnischal/phobos.git ~/src/phobos
bash ~/src/phobos/install.sh
On Windows, run this from Git Bash. Restart Claude Code after.
Check the install any time:
bash ~/.claude/skills/phobos/hooks/doctor.sh
Flags: --skills-only, --settings-only, --no-guard, --no-cmd-guard, --no-statusline, --quiet.
phobos is also a Claude Code plugin marketplace. Inside Claude Code:
/plugin marketplace add broisnischal/phobos
/plugin install phobos@phobos
This installs all three skills (phobos, phobos-code, phobos-plan) and wires every hook automatically — no settings.json edits, updated with /plugin marketplace update.
One difference from install.sh: a plugin can't set the main status line — Claude Code only lets plugins define agent/subagentStatusLine, and the plugin's cache path is versioned and ephemeral. To get the cost/context gauge shown above, run install.sh (which wires it for you), or point your own settings.json statusLine at a stable clone: bash "$HOME/.claude/skills/phobos/hooks/statusline.sh".
Denies reads of:
node_modules/, vendor/, .venv/, __pycache__/, .cache/dist/, build/, .next/, .nuxt/, .output/, coverage/package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, poetry.lock, uv.lock, go.sum*.min.js, *.map, *.pyc, *.so, fonts, other binaries.git/ internalsImages and PDFs always pass.
Unbounded reads are also capped by line count (default 2000), not just size — a file can be small in bytes but thousands of lines long.
echo 'node_modules/my-patched-pkg' >> .claude/phobos-guard-allow # per-repo allowlist
PHOBOS_GUARD=off claude # off for one session
bash ~/src/phobos/install.sh --no-guard # never install it
A second PreToolUse guard, on Bash and Grep — same idea, stop the waste before it lands in context:
content mode with no head_limit — denied; add a limit, or locate with files_with_matches first.ls, recursive grep, unbounded git log — denied unless piped or redirected; the reason gives the bounded form.PHOBOS_CMD_GUARD=off claude # off for one session
bash ~/src/phobos/install.sh --no-cmd-guard # never install it
# phobos state
_generated 2026-07-09T09:20Z · git a1b2c3d (main), 3 uncommitted — a snapshot, re-verify before acting._
## Working set (uncommitted)
- src/api.ts
- src/api.test.ts
Written to .claude/phobos-state.md on edit turns and before every compaction, and injected at session start — so a new session (or a post-/compact//clear turn) re-orients from a small stamped snapshot instead of the transcript. The git stamp is the staleness flag: trust it as of that SHA, then verify.
edited: api.ts, api.test.ts · 1.4k out
— context compacted (auto) —
edited: README.md · 0.6k out
Written to .claude/phobos-activity.log, tailed into every new session.
bash ~/.claude/skills/phobos/hooks/benchmark.sh # real measured tokens and estimated cost
bash ~/.claude/skills/phobos/hooks/savings.sh # an estimate of tokens/cost saved
when model turns out in cacheR cacheW hit% est$ time
2026-07-05T10:11 claude-opus-4-8 12 8200 4100 210000 9000 98% $0.39 7m0s
2026-07-06T14:02 claude-sonnet-5 40 15500 9000 880000 30000 98% $0.64 30m30s
---
totals: 2 sessions · 23700 out tok · 13100 in tok · 1090000 cache-read tok · 39000 cache-write tok · ~$1.02 est.
averages: 11850 out tok/session · 1125s/session
trend: ▄█ (out tokens per session, oldest → newest)
Dollar figures are estimates, not an invoice.
bash ~/.claude/skills/phobos/hooks/update.sh
npx claudepluginhub broisnischal/phobosGovernor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.
Automatic context engineering — observes your coding sessions and generates rules, suggestions, skills, and hooks so Claude gets smarter on your codebase over time
45% cost reduction measured. Cache expiry prevention, SubTask auto-delegation, zero-cost context restoration, real-time cost dashboard. The only Claude Code plugin built from CC source analysis.
Real-time session dashboard for Claude Code — cost tracking, analytics, and smart alerts
Opus 4.8-aware context optimization: cache-aware real costs & cache-break detection, session baseline audit (/cco-overhead), auto .contextignore, self-calibrating estimates, delegation advisor, ru/en prompt coach
Commands for syncing CLAUDE.md, permissions allowlist, and refreshing context. Hooks for marketplace-to-plugin sync.