local-agency

local-agency is a skill for Claude Code, Codex from ShaftHQ/SHAFT_ENGINE. It costs 34 tokens per session (2,035 once invoked), scanned A, original, MIT.

Guidance for delegating coding work to agents running on a local AI model instead of using cloud-based session agents. It covers connecting OpenCode to an already running local model service.

In plain words
What is it for?
Use it when sending coding tasks to OpenCode or another local open-source model through services such as Ollama, LM Studio, or a compatible local server.
Why use it?
It keeps delegation on the local runtime when requested and prevents accidental use of other providers or permanent configuration files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions AGENTS.md; mentions OpenCode.

Good fit Use it when sending coding tasks to OpenCode or another local open-source model through services such as Ollama, LM Studio, or a compatible local server.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shafthq/shaft_engine/local-agency
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShaftHQ/SHAFT_ENGINE --skill local-agency
Clone the repo
git clone --depth 1 https://github.com/ShaftHQ/SHAFT_ENGINE

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-agency

README.md
[![agentmods](https://agentmods.dev/badge/skills/shafthq/shaft_engine/local-agency/github.svg)](https://agentmods.dev/skills/shafthq/shaft_engine/local-agency)
Your own site
<a href="https://agentmods.dev/skills/shafthq/shaft_engine/local-agency"><img src="https://agentmods.dev/badge/skills/shafthq/shaft_engine/local-agency/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-agency

Your own site · 80×15
<a href="https://agentmods.dev/skills/shafthq/shaft_engine/local-agency"><img src="https://agentmods.dev/badge/skills/shafthq/shaft_engine/local-agency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.02035
Opus 5.5 $0.00014 $0.00814
Sonnet 5.5 $0.00007 $0.00407
Haiku 4.5 $0.00003 $0.00203

Measured 14d ago against content hash dbd66b8a19c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

local-agency scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/assert_parent_rog_shell.py, scripts/design_turn_gate.py, scripts/dispatch.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

chaos-engine/skills/local-agency/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Local agency (OpenCode)

Optional local coding agency path. Not a workflow owner; select the canonical workflow in execution workflows first.

Local agency vs session agents

Path When Owner
Session subagents / Task Default orchestrator labor on the host Host adapter + delegation
Local agency (this skill) Adopter asked for OpenCode / local OSS agency against local weights This skill + READY runtime

Hard rails (never regress)

  • Prefer a READY local runtime: FreeToken (:1919), then Ollama / LM Studio / llamacpp via local-openai-compat, then Colibri (:8000) via colibri (frontier MoE; prefer FreeToken for coding agency).
  • Configure OpenCode with ephemeral OPENCODE_CONFIG / OPENCODE_CONFIG_CONTENT that sets enabled_providers to the READY local provider. OpenCode merges global config; the allowlist keeps other providers out of that process. --pure only disables external plugins.
  • Never write into durable ~/.config/opencode (helper refuses those paths), never ft launch / ft serve, never start local servers from CE.
  • Do not silently fall back to cloud OmniRoute. Missing local runtime: tell the operator; continue with session agents / SOLO / OmniRoute only when the adopter explicitly asked for that path.
  • Do not install OpenCode from this skill. Operator install stays on vendor docs (README third-party table).
  • Installer / doctor / status must not fail because OpenCode or a local runtime is missing.
  • Never bind or probe a non-loopback URL from ChaosEngine.
  • ROG FreeToken bind: Task/box writers must not claim FreeToken. dispatch.py resolve --prefer freetoken and require_rog_freetoken.py fail closed unless the hostname looks like ROG, cwd is the operator ROG checkout (see local-agency guide (repo-only chaos-engine/guides/local-agency.md)), or CE_ALLOW_BOX_LOCAL_AGENCY=1. Process-owner Shell with machineId on ROG is mandatory for ROG FreeToken/OpenCode writers. Do not dispatch those writers via Task until Grok Bot exposes machineId to Task/executor Shell. Diagnostic: assert_parent_rog_shell.py. Clear error when FreeToken is not READY on this host.

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · +3 lines dbd66b8a19c4
  2. 16d ago Changed · -50 lines 2d1e4fb60c66
  3. 20d ago Changed 2211628a7629
  4. 21d ago Changed · +8 lines 6cb4400a6bb9
  5. 23d ago Changed · +3 lines 0b3a2152df75
  6. 24d ago Changed · +9 lines d55c73387067
  7. 25d ago Changed · +61 lines 48550b147f78
  8. 26d ago Changed · +19 lines 7523282942b1
  9. 27d ago Changed · +4 lines 741ee070ed8c
  10. 28d ago First seen · 108 lines · 34 tokens per session scan A 1b1830f97b07

Subscribe to this mod's changes

local-agency is a skill published in the GitHub repository ShaftHQ/SHAFT_ENGINE (414 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,035 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-17.