From phobos
Enforces token-efficient coding discipline: triages task size, writes minimal correct code, gives terse-but-complete answers, reduces round-trips, and keeps context lean. Activated on every turn to cut token usage without losing correctness. Invoke via "/phobos", "be efficient", "save tokens", "minimal", or "shortest path".
How this skill is triggered — by the user, by Claude, or both
Slash command
/phobos:phobosThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Goal: the fewest tokens that still **fully** answer. Efficient is not careless — you compress the *packaging*, never the *correctness*.
ACTIVATION.mdhooks/benchmark.shhooks/context-warn.shhooks/doctor.shhooks/guard-cmd.shhooks/guard-reads.shhooks/log-activity.shhooks/pre-compact.shhooks/savings.shhooks/session-end.shhooks/session-start.shhooks/state.shhooks/statusline.shhooks/stop.shhooks/update.shreferences/context-hygiene.mdreferences/memory.mdreferences/routing.mdGoal: the fewest tokens that still fully answer. Efficient is not careless — you compress the packaging, never the correctness.
Do this before anything else. It is the difference between a greeting costing 20 tokens and 13,000.
| Turn | Do | Don't |
|---|---|---|
| Trivial — greeting, thanks, yes/no, a fact you know, one-line lookup | Answer in one line. | Read files, recall memory, consult routing, or load any reference. |
| Simple — one edit, single-file question, short command | Apply the output contract + code ladder from memory; ≤1 targeted read. | Open references/. |
| Substantive — multi-file, feature, debugging, design | Load the reference files the task needs (below). | Read files the change doesn't touch "to be safe". |
⚠. If a genuine risk is essential to the answer, fold it into a plain sentence — correctness is never dropped, but it's never dressed up as a warning block either.Climb the ladder, stop at the first rung that holds — but only after you understand the problem:
<input type=date>)? Use it.assert-based demo()/__main__ or one small test.The ledger is written automatically by a Stop hook (hooks/stop.sh) — after a turn that edited files, it appends one edited: a, b line to .claude/phobos-activity.log. Do not run a logging command yourself — a per-turn tool call is exactly the round-trip latency phobos exists to cut. Turns that change nothing log nothing.
hooks/session-start.sh tails the last 8 lines after the activation card, so a new session or post-/clear turn re-orients without re-reading history. Mid-session, tail .claude/phobos-activity.log beats re-deriving "what have we been doing".hooks/log-activity.sh still exists for a manual note when the user explicitly asks you to record something — not for routine per-turn logging..claude/phobos-activity.log to .gitignore — ephemeral breadcrumbs, not project memory (contrast references/memory.md).Benchmark history is separate and automatic: the SessionEnd hook records real per-session output/input/cache tokens + wall time to .claude/phobos-benchmark.jsonl. When the user asks "how much have I used / saved / is this getting cheaper", run one of these directly — don't estimate from memory and don't go hunting for the script:
bash ~/.claude/skills/phobos/hooks/benchmark.shbash ~/.claude/skills/phobos/hooks/savings.shBoth need bash + jq. On Windows that means running inside Git Bash (see the repo's install requirements); if the command isn't found, that's the fix — don't retry blindly.
Some phobos rules are enforced by hooks, not left to discipline. When you hit one, cooperate with it:
hooks/guard-reads.sh, PreToolUse): the path was node_modules/lockfile/minified/build-output/git-internals, or an unbounded huge read (by size or line count). Don't retry the identical call and don't route around it with cat. Follow the deny reason — Grep the symbol, Read with offset/limit, or use the suggested CLI. If the read is genuinely required, tell the user to add a regex line to .claude/phobos-guard-allow (or set PHOBOS_GUARD=off).hooks/guard-cmd.sh, PreToolUse): the call would flood the window or waste a turn — an unbounded content Grep (add head_limit), a recursive ls/grep or unbounded git log (bound it or pipe to head), or a command you've already run that failed the same way with nothing edited since. Take the steer in the deny reason; for a repeat-failure, read the actual error and fix the root cause instead of re-running. Disable with PHOBOS_CMD_GUARD=off (or PHOBOS_GUARD=off for all guards).hooks/context-warn.sh, UserPromptSubmit): the window is nearly full and every turn re-sends it. Finish the current step, then suggest /compact (or /clear on a topic change) in one line. See references/context-hygiene.md..claude/phobos-state.md at session start (hooks/state.sh, via Stop/PreCompact): a small current-state handoff — git SHA + dirty count, working set, recent activity — that survives /compact and /clear so you re-orient from it instead of re-reading the transcript. It is stamped with the git state it was generated from; treat everything in it as true as of that SHA and re-verify a named file/line against the live tree before acting.hooks/pre-compact.sh): entries above it predate the summary — re-verify any file/flag named above that line before acting on it.bash ~/.claude/skills/phobos/hooks/doctor.sh — it self-tests the install and prints the fix./compact: references/context-hygiene.mdSibling skills (load when installed):
phobos:max: maximum prose compression — drop articles, pleasantries, hedges; keep full technical accuracy.bash ~/.claude/skills/phobos/hooks/update.sh (fast-forward pull, then restart the session).npx claudepluginhub broisnischal/phobosReduces token waste by 40-60% via anti-sycophancy rules, tool-call budgets, one-pass coding, task profiles, and read-before-write enforcement.
Always-on operational standard enforcing concise responses, parallel tool execution, and proactive context compression. Applied automatically at session start.
Optimizes Claude Code sessions for Max-plan token limits via response compression, tool output filtering, drift prevention, and planning for broad tasks.