/gabbe-brain:cost-benefit-routerfrom gabbe-brain
Routes tasks to local or remote models based on complexity, privacy, and context size. Useful for cost-aware model selection and handling sensitive data.
Ships in gabbe-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Purpose: Decide the most efficient execution path for a given task. Philosophy: "Don't use a cannon to kill a mosquito."
This 0–10 banding is an illustrative conceptual scale; the actual gabbe route CLI scores
0–100 against a single threshold and returns one LOCAL/REMOTE verdict. Analyze the prompt/task:
| Score | Privacy | Context | Decision | Rationale |
|---|---|---|---|---|
| Low | Any | Low | LOCAL | Speed, Free, Good enough. |
| Med | Low | Med | REMOTE (small tier) | Fast, cheap cloud models. |
| Med | High | Any | LOCAL (large) | The largest local model available. |
| High | Low | High | REMOTE (top tier) | Needs the most capable model; ask the human first. |
| High | High | Any | LOCAL (Max) | Best available local quantization. |
Input:
{
"task": "Fix a typo in README_FULL.md",
"files": ["README_FULL.md"],
"user_preference": "auto"
}
Output:
{
"route": "LOCAL",
"model": "smallest local model",
"reason": "Low complexity task, no reasoning required."
}
Conceptual framing vs the actual CLI. The implemented
gabbe routecommand returns a one-shot binary decision (LOCAL/REMOTE) by scoring complexity on a 0–100 scale against a threshold, with a PII/DLP override that forcesLOCAL. The richer behaviors described below — the multi-tier ladder, the self-correction / escalation loop, the per-task heuristic updates, and autonomy-gating (ask/auto/hybrid) — are conceptual framing for how an agent should route work, not features the one-shot CLI performs. Treat them as guidance for the orchestrator's own loop, and don't claim the router "guarantees" the optimal/cheapest path. Seeguides/ai/self-evolving-skills.md.
In GABBE the router is designed to behave self-adaptively end to end: it scores task complexity,
layers in privacy (a PII/DLP hit forces LOCAL, overriding any complexity score), and weighs
context size to pick the cheapest path that can still do the job. Conceptually it is gated by
autonomy level (GABBE_AUTONOMY = ask | auto | hybrid): ask confirms each route,
auto routes silently, hybrid auto-routes the safe cases and asks on the rest. The framing also
includes self-correction — when a LOCAL attempt fails, the orchestrator escalates up the tier
ladder to a remote model (re-checking privacy first) and updates its heuristics for next time —
though the bare gabbe route CLI returns only the single LOCAL/REMOTE verdict (the loop lives in
the calling agent).
If a routed task FAILS (e.g., Local model produces garbage):
gabbe route returns only LOCAL or REMOTE.The JSON verdict shown under Usage: route, model (a tier, not a product name) and reason.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
model-routing, cost-optimization, privacy, local-model, remote-model
npx claudepluginhub andreibesleaga/gabbe --plugin gabbe-brain16 skills in this plugin
/active-inferenceFrames an agent's predict, act, compare loop as surprise minimisation (conceptual, not a solver). Use when a tool result contradicts the agent's expectation and it must choose between probing and fixing./brain-modeAdds a plan-and-review layer over the normal work loop. Picks the cheapest strategy that passes, watches a Loki run, and records one decision-log entry. Use when the human says "brain mode" or "activate brain" for a task that needs a chosen strategy and cost control./cognitive-architecturesDescribes SOAR, ACT-R and LIDA patterns (propose, evaluate, select; activation-based retrieval; workspace broadcast) as ideas for agent design. Use when designing an agent's reasoning cycle or memory retrieval and you want a named pattern as a starting point./cognitive-testingTests cognitive and agentic loops by invariants, convergence, memory integrity and loop guards instead of exact output. Use when you must test an autonomous loop whose output varies, or check that its guards fire./consciousness-loopAdds an explicit observe, orient, decide, act trace with a breakout after 3 idle spins. Use when an agent keeps reasoning without calling a tool, or when a decision trace is needed./episodic-consolidationTurns a finished task's audit log into reusable rules and prunes scratch files. Use at the end of a long task to record lessons and to detect drift in the project's world model. Use when: episodic consolidation, consolidate lessons, end of long task, prune scratch files, world model drift.Other plugins' skills for the same job