grok-delegate-runtime

grok-delegate-runtime is a skill for Claude Code from kai-wedekind/claude-code-grok-bridge. It costs 20 tokens per session (1,313 once invoked), scanned A, original, Apache-2.0.

An internal helper that forwards requests from a Claude Code subagent to the Grok bridge runtime. It is intended for a specific delegate subagent rather than direct use.

In plain words
What is it for?
Use it inside the Grok build delegate to ask Grok for diagnosis, planning, research, review, or explicitly requested code changes.
Why use it?
It gives that delegate a fixed way to send one request while following read-only or file-writing rules.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the grok-build plugin — 3 skills, 7 commands, 1 agent, 2 hooks shipped together

Good fit Use it inside the Grok build delegate to ask Grok for diagnosis, planning, research, review, or explicitly requested code changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add kai-wedekind/claude-code-grok-bridge
Claude Code
/plugin install grok-build

Made for: Claude Code.

Or install grok-build, the plugin that ships this one along with the rest of its 3 skills, 7 commands, 1 agent, 2 hooks.

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 grok-delegate-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime/github.svg)](https://agentmods.dev/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime)
Your own site
<a href="https://agentmods.dev/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime"><img src="https://agentmods.dev/badge/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime/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 grok-delegate-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime"><img src="https://agentmods.dev/badge/skills/kai-wedekind/claude-code-grok-bridge/grok-delegate-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,313 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.00020 $0.01313
Opus 5 $0.00010 $0.00656
Sonnet 5 $0.00004 $0.00263
Haiku 4.5 $0.00002 $0.00131

Measured 8d ago against content hash 1321c43a3a14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

grok-delegate-runtime 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 8d ago.

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.

plugins/grok-build/skills/grok-delegate-runtime/SKILL.md · 54 lines

How it starts

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

Grok Build Delegate Runtime

Use this skill only inside the grok-build:grok-delegate subagent.

Primary helper:

  • node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-bridge.mjs" run "<raw arguments>"

Execution rules:

  • The delegate subagent is a forwarder, not an orchestrator. Its only job is to invoke run once and return that stdout unchanged.
  • Prefer the helper over hand-rolled git, direct Grok CLI strings, or any other Bash activity.
  • Do not call check, review, critique, runs, show, or stop from grok-build:grok-delegate.
  • Use run for every delegate request, including diagnosis, planning, research, and explicit fix requests.
  • Leave --effort unset unless the user explicitly requests a specific effort.
  • Leave model unset by default. Add --model only when the user explicitly asks for one.
  • Write policy: default to READ-ONLY. Add --write only when the task explicitly asks Grok to create, edit, or fix files (implementation work). Investigation, diagnosis, research, review, triage, and summarization always run read-only. When adding --write, prefer a --cwd scoped to the narrowest sensible directory.

Background ownership model:

  • Bridge --background owns the long-running process group (detached run-worker + grok agent) so the run records bridgePid and agentPid.
  • Claude Code background / short enqueue is only for launching that bridge call, not for holding the long Grok process.
  • When the user or command chose background mode, pass --background to run. Do not strip it.
  • --wait is Claude-side foreground control only: do not pass it to run, and do not treat it as natural-language task text.

Command selection:

  • Use exactly one run invocation per delegate handoff.
  • If the forwarded request includes --background, pass it through to run (bridge owns the process group). Strip only Claude-only framing that is not a bridge flag, and do not leave routing tokens in the natural-language task text.
  • If the forwarded request includes --wait, run foreground: do not add --background to run, and strip --wait from task text.
  • If the forwarded request includes --model, --effort, --cwd, --thread, --json-schema, --prompt-file, --prompts-file, --timeout-ms, --max-turns, or --write, pass them through to run unchanged (they are runtime controls, not task text). Strip them from the natural-language task text.
  • --thread <name> continues a named Grok conversation for this workspace; use it when the request names a thread or clearly continues an earlier named delegation. Names: 1–64 characters, letters/digits/./-/_, must start alphanumeric; reserved names __proto__, constructor, and prototype are rejected. With --fresh, do not resume that name's stored session.
  • --json-schema <json> requests schema-constrained structured output; the bridge exposes it as structured in the --json payload. The schema string must be a JSON object and is capped at 16000 characters.
  • --prompts-file <path> runs a sequential NDJSON batch (bridge emits one NDJSON result line per prompt). Incompatible with --background, --prompt-file, and a positional prompt.
  • --timeout-ms wall-clock-kills the agent process tree; --max-turns is forwarded to the CLI.
  • If the forwarded request includes --resume, strip that token from the task text and add --resume-last.
  • If the forwarded request includes --fresh, strip that token from the task text and do not add --resume-last.
  • Mutual exclusions: --resume/--resume-last vs --fresh; --thread vs --resume-last.
  • --effort: accepted values are low, medium, high, xhigh. Anything else is refused by the bridge before the CLI starts.
  • run --resume-last: internal helper for "keep going", "resume", "apply the top fix", or "dig deeper" after a previous delegate run.

Safety rules:

  • Preserve the user's task text as-is apart from stripping routing flags.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, stop runs, summarize output, or do any follow-up work of your own.
  • Return the stdout of the run command exactly as-is.
  • Exit codes alone are incomplete: prefer failureCode from --json payloads when classifying failures.
    • 0 = deliverable present (failureCode null).
    • 2 = bridge-side failure: no-deliverable (empty output after optional automatic nudge), schema-parse (schema-constrained run produced no JSON object), output-truncated (stdout capture cap exceeded), quota-exhausted (the subscription's allowance is used up, HTTP 402; retrying cannot help until it resets), or not-authenticated (nobody is signed in; the CLI's remedy — grok login --device-code or XAI_API_KEY — is preserved in rawOutput, and retrying cannot help until someone does it). CLI status 2 can also surface as cli-error when the Grok process itself exited 2.
    • other non-zero = execution/CLI error (cli-error) or wall-clock kill (timeout).
    • Automatic nudge (one retry into the same session) runs only for read-only tasks when the first attempt exits 0 with empty output. It never runs for --write.
    • On a non-zero exit, return the command's error output unchanged so the caller can react — never return nothing.

Read the full file on GitHub · 54 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. 8d ago First seen · 54 lines · 20 tokens per session scan A 1321c43a3a14

Subscribe to this mod's changes

grok-delegate-runtime is a skill published in the GitHub repository kai-wedekind/claude-code-grok-bridge (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 20 tokens to every session and 1,313 once invoked, about $0.0001 per session on Opus 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-08-31.

Related

Other skills, from other repositories

taiyi-change

A TaiyiForge workflow stage for writing a change proposal in CHANGE.md, with checks for scope, risks, success criteria, and related project documents.

Dong90/oh-my-taiyiforge · 25 tokens

taiyi-integration

A project workflow skill for closing a TaiyiForge change and recording it in a CHANGELOG.md file. It checks review results, tests, and the state of the working tree before archiving the change.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-requirement

A requirements-analysis process that turns a proposed change into a REQUIREMENT.md document. It records user needs, acceptance checks, terminology, triggers, and dependencies, with different levels of detail for different project sizes.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-test

A project workflow skill for verifying an implementation and producing a TEST.md record. TDD means writing a failing test, implementing the change, and then making the test pass; this skill checks that process and other regression cases.

Dong90/oh-my-taiyiforge · 24 tokens

taiyi-ui-design

A design-planning guide for describing how an application's user interface should look and behave. It produces a UI-DESIGN.md document covering layouts, components, interactions, accessibility, and error states.

Dong90/oh-my-taiyiforge · 35 tokens

taiyi-evolve

A workflow skill that compares the implemented code with the frozen design after development and testing. It records architecture changes and proposes updates to DESIGN.md, the document describing the intended system structure.

Dong90/oh-my-taiyiforge · 37 tokens