init
Creates a project-local copy of the Gearbox routing policy. Optional — only needed if you want to customize the policy for this repo.
Self-check the Gearbox installation and print a PASS/WARN/FAIL report
> /plugin marketplace add Adityaraj0421/gearbox > /plugin install gearbox@gearbox
How it fires
How this command gets triggered: by you, by Claude, or both.
/doctorContext preview
What this command does when you run it.
Self-check the Gearbox installation and print a PASS/WARN/FAIL report
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:
python3 -c "
import json, os, pathlib
root = os.environ.get('CLAUDE_PLUGIN_ROOT','')
if not root:
print('NO_PLUGIN_ROOT')
exit()
p = pathlib.Path(root) / '.claude-plugin' / 'plugin.json'
if not p.exists():
print('NO_PLUGIN_JSON')
exit()
d = json.loads(p.read_text())
print(d.get('version','unknown'))
"**Step B** — fetch latest from GitHub (5-second timeout; skip on failure):
curl -s --max-time 5 "https://raw.githubusercontent.com/Adityaraj0421/gearbox/main/.claude-plugin/plugin.json" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('version','unknown'))" \
2>/dev/null || echo "NETWORK_FAIL"Evaluate:
Gearbox 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.
Repo: Adityaraj0421/gearbox
Creates a project-local copy of the Gearbox routing policy. Optional — only needed if you want to customize the policy for this repo.