From super-radical-powers
Use when your human partner asks to execute an implementation plan while spending local GPU/Ollama compute instead of Claude API tokens — triggers: "offload", "local model", "ollama", "use my GPU", "save tokens", "spend local compute instead of API".
How this skill is triggered — by the user, by Claude, or both
Slash command
/super-radical-powers:offloading-to-local-modelsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute an implementation plan exactly like `super-radical-powers:subagent-driven-development`, but route the *simple, self-contained, verifiable* tasks to a local Ollama model running in a background worker — in parallel with Claude's work on the hard tasks. The local worker writes the files and runs each task's `verifyCommand` itself, so Claude spends near-zero tokens on offloaded tasks. Ever...
README.mdconfig.example.jsonoffload-task-prompt.mdoffload/__init__.pyoffload/cli.pyoffload/contracts.pyoffload/gate.pyoffload/ollama_client.pyoffload/prompt.pyoffload/queue.pyoffload/runner.pyoffload_worker.pyrun_tests.pytests/__init__.pytests/base.pytests/fake_ollama.pytests/test_cli.pytests/test_contracts.pytests/test_gate.pytests/test_integration.pyExecute an implementation plan exactly like super-radical-powers:subagent-driven-development, but route the simple, self-contained, verifiable tasks to a local Ollama model running in a background worker — in parallel with Claude's work on the hard tasks. The local worker writes the files and runs each task's verifyCommand itself, so Claude spends near-zero tokens on offloaded tasks. Every offloaded result is gated by its own verify; on any failure it falls back to a normal Claude implementer subagent.
This is an opt-in variant, not a replacement. It does NOT fork subagent-driven-development — it reuses it for the Claude lane and for every review gate. If you do not have a working local Ollama, you are doing plain subagent-driven-development. Offload is a $0 add-on lane, never a corner you cut.
Core principle: Swap the expensive implementer's generation tokens for Ollama's $0 — and reuse the review gates already in place as the safety net. The local model is fast and free but weak: it hallucinates APIs confidently with no uncertainty signal. The verify run is the only thing standing between its output and your codebase. Trust nothing it says about its own work.
Use this INSTEAD of subagent-driven-development only when ALL of these hold:
.tasks.json (same input as subagent-driven-development).If the local model is unreachable, or your human partner has not asked to offload, use super-radical-powers:subagent-driven-development directly. This skill degrades to exactly that.
digraph when_to_use {
"Have a plan + .tasks.json?" [shape=diamond];
"Human wants to offload easy tasks to a local model?" [shape=diamond];
"Ollama health check passes?" [shape=diamond];
"offloading-to-local-models (this skill)" [shape=box style=filled fillcolor=lightgreen];
"subagent-driven-development (no offload)" [shape=box];
"brainstorm / write a plan first" [shape=box];
"Have a plan + .tasks.json?" -> "Human wants to offload easy tasks to a local model?" [label="yes"];
"Have a plan + .tasks.json?" -> "brainstorm / write a plan first" [label="no"];
"Human wants to offload easy tasks to a local model?" -> "Ollama health check passes?" [label="yes"];
"Human wants to offload easy tasks to a local model?" -> "subagent-driven-development (no offload)" [label="no"];
"Ollama health check passes?" -> "offloading-to-local-models (this skill)" [label="yes"];
"Ollama health check passes?" -> "subagent-driven-development (no offload)" [label="no — degrade"];
}
You are the orchestrator. You walk the plan's task DAG and route each ready task (its blockedBy satisfied) through an eligibility gate into one of two lanes that advance concurrently:
subagent-driven-development does, including its two-stage review gates (spec compliance, then code quality) and .tasks.json sync.verifyCommand — all without spending Claude tokens.Parallelism is real: while a Claude implementer subagent grinds on a hard task, the worker is already churning the GPU on the easy ones. The Ollama lane obeys the same blockedBy + disjoint-file-ownership discipline as subagent-driven-development's parallel waves — treat it as a "$0 local wave."
All commands below take the form (run from the repo root):
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> <subcommand>
digraph process {
rankdir=TB;
"Announce skill" [shape=box];
"health: Ollama up?" [shape=diamond];
"Degrade to subagent-driven-development (no offload)" [shape=box];
"Read plan + .tasks.json, build task list with blockedBy deps" [shape=box];
"run --concurrency N (launch background worker once)" [shape=box];
"Pick ready tasks (blockedBy satisfied)" [shape=box];
"gate --task <job.json> → verdict" [shape=box];
"verdict?" [shape=diamond];
"needs_review: your judgment (simple+allowed?)" [shape=diamond];
"enqueue --file <job.json> (Ollama lane)" [shape=box];
"Dispatch Claude implementer subagent (Claude lane)" [shape=box];
"Poll: status --job-id N | --all" [shape=box];
"job state?" [shape=diamond];
"done + verify_passed: git add + commit, review gate" [shape=box];
"error: worker already restored tree → FALLBACK to Claude implementer" [shape=box];
"All tasks complete?" [shape=diamond];
"Stop worker, clean .offload/ working files, keep jobs log" [shape=box];
"Final code review (whole-impl reachability check)" [shape=box];
"super-radical-powers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Announce skill" -> "health: Ollama up?";
"health: Ollama up?" -> "Degrade to subagent-driven-development (no offload)" [label="no — exit != 0"];
"health: Ollama up?" -> "Read plan + .tasks.json, build task list with blockedBy deps" [label="yes — exit 0"];
"Read plan + .tasks.json, build task list with blockedBy deps" -> "run --concurrency N (launch background worker once)";
"run --concurrency N (launch background worker once)" -> "Pick ready tasks (blockedBy satisfied)";
"Pick ready tasks (blockedBy satisfied)" -> "gate --task <job.json> → verdict";
"gate --task <job.json> → verdict" -> "verdict?";
"verdict?" -> "enqueue --file <job.json> (Ollama lane)" [label="eligible"];
"verdict?" -> "Dispatch Claude implementer subagent (Claude lane)" [label="ineligible"];
"verdict?" -> "needs_review: your judgment (simple+allowed?)" [label="needs_review"];
"needs_review: your judgment (simple+allowed?)" -> "enqueue --file <job.json> (Ollama lane)" [label="yes"];
"needs_review: your judgment (simple+allowed?)" -> "Dispatch Claude implementer subagent (Claude lane)" [label="no / unsure"];
"enqueue --file <job.json> (Ollama lane)" -> "Poll: status --job-id N | --all";
"Poll: status --job-id N | --all" -> "job state?";
"job state?" -> "done + verify_passed: git add + commit, review gate" [label="done"];
"job state?" -> "error: worker already restored tree → FALLBACK to Claude implementer" [label="error"];
"job state?" -> "Poll: status --job-id N | --all" [label="pending/running"];
"done + verify_passed: git add + commit, review gate" -> "All tasks complete?";
"error: worker already restored tree → FALLBACK to Claude implementer" -> "All tasks complete?";
"Dispatch Claude implementer subagent (Claude lane)" -> "All tasks complete?";
"All tasks complete?" -> "Pick ready tasks (blockedBy satisfied)" [label="no"];
"All tasks complete?" -> "Stop worker, clean .offload/ working files, keep jobs log" [label="yes"];
"Stop worker, clean .offload/ working files, keep jobs log" -> "Final code review (whole-impl reachability check)";
"Final code review (whole-impl reachability check)" -> "super-radical-powers:finishing-a-development-branch";
}
Announce you are using offloading-to-local-models. Then probe Ollama:
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> health
super-radical-powers:subagent-driven-development (no offload) and execute the plan with that skill instead. Never block the plan because the local model is unavailable.Read the plan and <plan-path>.tasks.json. Build the task list with blockedBy dependencies — identical to subagent-driven-development. This is the DAG you will walk.
Start the worker as a backgrounded Bash run so it drains the queue while you keep working. Use concurrency from .offload/config.json (default 1; a 16GB GPU supports up to 2):
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> run --concurrency <N>
Launch it once. The worker claims pending jobs, calls Ollama, writes files, runs verify, and either records a done result or restores the tree and records an error. It exits on its own after the queue is idle.
For each ready task (its blockedBy satisfied), write the task metadata to a small job JSON file (task_id, model optional, target_files, spec, verify_command, plus any category/offload_eligible hint from the plan), then ask the gate:
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> gate --task <job.json>
It prints {"verdict": "...", "reason": "..."}. Route on the verdict:
eligible → enqueue it (Ollama lane):
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> enqueue --file <job.json>
This prints the new job id. Record it against the task.
Model selection: the worker uses payload["model"] if set, otherwise falls back to config["workhorse_model"]. quality_model (the slower, higher-quality model) is a convenience config value — it is NOT auto-selected. To use it for a latency-tolerant task that needs higher quality, set "model": <config["quality_model"]> in the job JSON before enqueuing. All other jobs default to workhorse_model.
ineligible → dispatch a Claude implementer subagent (Claude lane), exactly as subagent-driven-development does. The gate has mechanically blocked this task for one of: no verifyCommand; not exactly one target file (zero or multiple files are both ineligible); modify target over the line threshold; or an excluded category (security, algorithmic, concurrency, architecture, migration). Do not override it.
needs_review → your judgment. The category is unknown. Offload it ONLY if it is a genuinely simple, self-contained artifact in an allowed category — boilerplate, config, fixtures, format-conversion (e.g. JSON↔YAML), docstrings, test-scaffold, or utility/regex. Otherwise route it to the Claude lane. When unsure, choose the Claude lane. A wrong offload costs a verify + fallback; a wrong Claude-lane choice costs only tokens.
Disjoint-file ownership (non-negotiable). Never let an offloaded job and a concurrent Claude-lane task — or two concurrent offloaded jobs — write the same file. Before enqueuing, confirm the task's target_files overlap no other in-flight work. If they overlap, serialize: wait for the conflicting lane to finish, or route to the Claude lane. Same discipline as subagent-driven-development's parallel waves.
Poll job status:
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> status --job-id <N>
# or, to sweep all jobs:
python skills/offloading-to-local-models/offload_worker.py --project <repo-root> status --all
The status JSON field is one of pending, running, done, or error.
done with verify_passed: 1 → the worker already wrote the files (listed in files_written) AND ran the task's verifyCommand successfully. The work is real and verified. Just git add those files and commit, then run a review gate. Because this code passed its own verify and came from a constrained category, a lighter single-pass spec+quality review is acceptable; do not skip review entirely.error → verify failed, the model errored, or Ollama choked. The worker has already restored the tree (the files are back to their pre-job state — nothing half-written is left behind). Fall back: dispatch a Claude implementer subagent for that task, exactly as subagent-driven-development does. A failed offload is never left half-done and is never integrated.Sync .tasks.json after every status change — mark each task completed (offloaded-and-verified, or Claude-implemented-and-reviewed) and update lastUpdated, same as subagent-driven-development. This keeps cross-session resume correct.
Keep both lanes advancing until every task is done. Then stop the worker, clean the .offload/ working files (the per-run job JSONs and queue.db WAL artifacts), but keep the jobs log rows — they record which task types were actually worth offloading (token/latency/verify-pass data for tuning).
Dispatch the final code reviewer for the entire implementation, including the end-to-end wiring / reachability check (offloaded artifacts are easy to build and never wire up — trace them from a real entry point). Then hand off to super-radical-powers:finishing-a-development-branch.
These are the hard rules. They exist because local 7B–32B models fail in specific, well-documented ways. Do not relax them under pressure.
confidence field — it is decorative, not evidence.ineligible. You must not override the gate to force them through.Never:
done with verify_passed (NEVER trust unverified local output)confidence field instead of the verify result ("it said high confidence" is not a gate)ineligible gate verdict to force a hard task onto the local modelneeds_review task you are unsure about — when unsure, choose the Claude laneRationalizations to reject:
An offloaded task that reaches done with verify_passed has already had its verifyCommand run by the worker, so you may collapse the two-stage review into a single spec+quality pass for local-origin code. It does NOT mean skipping review. Spec compliance (did it build the right thing, nothing extra?) and code quality still apply — verify proves the tests pass, not that the code is right or clean. Claude-lane tasks keep the full two-stage review unchanged.
Required sub-skill (the spine of this workflow):
.tasks.json sync. This skill adds only the Ollama lane and the scheduler on top of it.Also used:
offloadEligible hints) that this skill executes.Degradation target:
npx claudepluginhub radicaldo/super-radical-powers --plugin super-radical-powersCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.