init
CommandCreates a project-local copy of the Gearbox routing policy. Optional — only needed if you want to customize the policy for this…
Self-check the Gearbox installation and print a PASS/WARN/FAIL report
> /plugin marketplace add Adityaraj0421/gearbox> /plugin install gearbox@gearbox
name: doctor description: "Self-check the Gearbox installation and print a PASS/WARN/FAIL report"
Run the following checks IN ORDER. Execute each step via Bash (or by introspection where noted). Do NOT print results as you go — collect each result silently, then print only the final table at the end.
For each check, record one of: **PASS**, **WARN**, or **FAIL**, plus a brief evidence/fix string.
---
echo "${CLAUDE_PLUGIN_ROOT}"---
command -v python3 && echo "python3 ok" || echo "python3 missing" command -v git && echo "git ok" || echo "git missing"
---
Introspect without reading any files: is the Gearbox tier table (T0/T1/T2 with gearbox:scout / gearbox:grunt / gearbox:builder / gearbox:architect) present in your context right now?
---
Introspect your available subagent types. Check for all five: `gearbox:scout`, `gearbox:grunt`, `gearbox:builder`, `gearbox:architect`, `gearbox:verifier`.
---
python3 - <<'EOF'
import json, pathlib, sys
p = pathlib.Path.home() / ".claude/plugins/installed_plugins.json"
if not p.exists():
print(f"MISSING:{p}")
sys.exit(0)
data = json.loads(p.read_text())
entries = []
for key, installs in data.get("plugins", {}).items():
if "gearbox" in key.lower():
entries.extend(installs)
if not entries:
print("NOT_FOUND")
sys.exit(0)
scopes = [e.get("scope","?") for e in entries]
print("SCOPES:" + ",".join(scopes))
EOF---
mkdir -p .claude && touch .claude/.gearbox-doctor-test && rm .claude/.gearbox-doctor-test && echo "ok" || echo "fail"
---
This is the only token-spending check.
**Step A** — note the current line count of `.claude/gearbox-log.jsonl`:
python3 -c "
import pathlib
p = pathlib.Path('.claude/gearbox-log.jsonl')
print(sum(1 for _ in p.open()) if p.exists() else 0)
"Record this as BEFORE_COUNT.
**Step B** — delegate to `gearbox:scout` (model: haiku) with exactly this prompt: `Reply with exactly: GEARBOX DOCTOR OK. Use no tools.`
**Step C** — re-read the log and count lines again (AFTER_COUNT).
python3 -c "
import json, pathlib
p = pathlib.Path('.claude/gearbox-log.jsonl')
if not p.exists():
print('NO_LOG')
exit()
lines = [json.loads(l) for l in p.open() if l.strip()]
print(len(lines))
# newest DELEGATION only; skip event records (no tool_name) so a trailing
# verdict/escalation line cannot false-WARN
delegs = [r for r in lines if 'event' not in r]
if delegs:
last = delegs[-1]
print('tool_name=' + repr(last.get('tool_name','')))
print('subagent_type=' + repr(last.get('subagent_type','')))
print('model=' + repr(last.get('model','')))
"Evaluate:
---
# Check for pre-plugin agent files test -f ".claude/agents/scout.md" && echo "AGENTS_DIR_FOUND" || echo "agents_dir_clean" # Check for @.claude/routing.md reference in CLAUDE.md grep -l "@.claude/routing.md" CLAUDE.md 2>/dev/null && echo "CLAUDE_MD_FOUND" || echo "claude_md_clean"
---
**Step A** — read installed version. The plugin root is passed as an argument, not read from the environment: `${CLAUDE_PLUGIN_ROOT}` is expanded in this command's text, but it is usually NOT exported to the Bash shell, so `os.environ` inside Python sees nothing (that made this check answer `NO_PLUGIN_ROOT` on healthy 0.2.3 installs). If the argument still comes out empty, re-run with the path CHECK 0 recorded.
python3 - "${CLAUDE_PLUGIN_ROOT}" <<'PY'
import json, sys, pathlib
root = sys.argv[1] if len(sys.argv) > 1 else ''
if not root:
print('NO_PLUGIN_ROOT'); raise SystemExit
p = pathlib.Path(root) / '.claude-plugin' / 'plugin.json'
if not p.exists():
print('NO_PLUGIN_JSON'); raise SystemExit
print(json.lGearbox is a Claude Code plugin that automatically routes subagent delegations to the cheapest model tier that can handle the work — haiku for search and mechanical edits, sonnet for standard implementation, opus for hard architectural problems.
Creates a project-local copy of the Gearbox routing policy. Optional — only needed if you want to customize the policy for this…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.