npx skills add amelnagdy/delegate-skills --skill grok-delegate
wyattowalsh/agents
grok-delegate
>- Use when delegating to native Grok CLI for default Tier-T trivial leaves or wave/tune nodes from parent harnesses. NOT for harness sync or wrappers.
Installation
npx skills add wyattowalsh/agents --skill grok-delegate
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsAlso in this package
Other skills from wyattowalsh/agents · top by installs.
npx skills add wyattowalsh/agents
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
More metadata
- author
- wyattowalsh
- version
- 1.3.0
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md11,077 B -
docs
SUMMARY.md169 B
History
- First seen on skills.sh
- First recorded snapshot · 35 installs
SKILL.md
Grok Delegate
Cross-harness orchestration of Grok Build native CLI only. Parent harness owns the macro graph; Grok executes micro nodes.
Dispatch
| $ARGUMENTS | Action | ||
|---|---|---|---|
| (empty) | Show pre-flight, wave taxonomy, critical rules, and reference index | ||
preflight |
Run scripts/preflight.sh; stop on fail checks |
||
auth |
Run fast auth checks; show [references/auth.md](references/auth.md) remediation |
||
trivial |
Show Tier-T eligibility and single-node grok -p template |
||
| `wave <0\ | 1\ | 2>` | Show command templates for scout / build / verify waves |
tune |
Show session resume / delta prompt loop | ||
leader |
Show leader pool lifecycle | ||
ledger |
Show session ledger schema | ||
patterns |
Show orchestrator Pattern A–F → Grok flag mapping |
Classification Gate
- Use when the parent harness owns a multi-node graph and at least one node should run on Grok Build via native CLI.
- Use when a gate failed and the parent needs
-r <sessionId>tune passes on an existing ledger row. - Tier-T default — use
trivialby default when fast preflightok,grok-auth-expiryisok, and the leaf is bounded (≤3 reads OR ≤1 file ≤80 LOC; no destructive/prod/git-push/secrets; no unresolved user-pivotal or subtask-pivotal uncertainty). Parent keeps synthesis. - Tier-T failure fallback — if the first native
grok -pTier-T dispatch fails for a parent work item, stop Tier-T for that item and continue locally. - Do not use for Grok config/MCP sync, skill installs, or nested Grok-in-Grok orchestration.
- Do not use Tier-T for multi-node graphs, overlapping file writers, or unbounded parent work better done in-session; use
wave/patternsfor valid multi-node Grok graphs. - Malformed dispatch —
wavewithout0|1|2is invalid; show valid tiers or the empty-args gallery. Never invent a default wave.
Operator Contract
preflight
- Run
bash scripts/preflight.shfrom any cwd (bundleddoctor.py; optional--cwdfor target repo). - Stop fleet dispatch when JSON
okis false or anygrok-auth-*/grok-binarycheck isfail. - Treat
warnas advisory; anygrok-auth-expiryfail(expired, missing, or malformedexpires_at) blocks fleet dispatch and Tier-T offload.
auth
- Run
preflight.sh; inspectgrok-auth-*checks in JSON output. - Load [
references/auth.md](references/auth.md) for OAuth-primary remediation (grok login). - Optional deep smoke:
bash scripts/auth_verify.sh --cwd <target>.
trivial
- Confirm Tier-T eligibility (Classification Gate item 3).
- Run fast preflight; require
ok: trueandgrok-auth-expiry: ok(OAuth healthy). - For the one-file edit form, the parent must run normal branch and dirty-worktree safety checks before dispatch. Confirm the target file does not overlap unrelated dirty work and keep the parent responsible for review, synthesis, and validation.
- Dispatch one bounded node:
grok --no-auto-update \
-p "<bounded self-contained task>" \
--cwd "<absolute-repo-path>" \
--output-format json \
--max-turns 10
- If the native dispatch fails, record the failure, stop Tier-T for the current parent work item, and continue locally.
wave <0|1|2>
- Load [references/command-templates.md](references/command-templates.md) for the requested tier.
- Assign distinct
-w w<wave>-<role>-<n>names and non-overlapping file ownership for wave 1. - State the parent gate that must pass before the next wave.
tune
- Load [references/session-ledger.md](references/session-ledger.md) and resume with
-r <sessionId>. - Prefix delta prompts with
Tune:; capparenttunecountat 3 pernode_id. - Never default
--always-approve.
leader
- Load [references/leader-lifecycle.md](references/leader-lifecycle.md).
- Start one leader per cwd pool; kill orphans with
grok leader killafter graph completion.
ledger
- Load [references/session-ledger.md](references/session-ledger.md).
- Require N terminal ledger rows before opening the next parent gate.
patterns
- Load [references/graph-patterns.md](references/graph-patterns.md) and map to
/orchestratorPattern A–F. - Keep parent accounting: N dispatched nodes = N resolved before synthesis.
(empty)
- Show pre-flight, wave taxonomy, critical rules, and the reference index.
- Run the Classification Gate on the current parent request before dispatching nodes.
Canonical Vocabulary
| Term | Meaning |
|---|---|
| parent harness | Codex, OpenCode, Claude, or Cursor session owning the macro DAG |
| Tier-T | Default bounded trivial leaf offload via single grok -p after fast preflight and grok-auth-expiry: ok |
| node | One grok subprocess invocation for a graph task |
| wave | Staged batch of nodes (0 scout, 1 build, 2 verify) |
| gate | Parent checkpoint before the next wave |
| tune | -r <sessionId> -p "Tune: ..." delta on an existing node |
| ledger | grok-delegate-ledger.jsonl tracking sessionId per node |
| worktree | -w w<wave>-<role>-<n> git isolation per parallel builder |
| leader pool | Shared grok agent leader backend for dense graphs |
Critical Rules
- Native CLI only — no
bin/gk, MCP control server, or custom headless wrapper scripts. - Pre-flight mandatory — run
scripts/preflight.shbefore fleet dispatch or Tier-T offload. - OAuth primary —
grok logindefault; API key only on explicit user request. - Parent owns the graph — Grok depth is 1; parallelize siblings via parent bash, not nested Grok orchestration.
- Never default
--always-approvefor cross-harness delegation. - Always
--no-auto-updateand explicit--cwdon automation paths. - Accounting — N dispatched nodes = N terminal ledger rows before the next gate.
- One writer per worktree — non-overlapping file ownership across parallel wave 1 nodes.
When to use
- Parent dispatches independent Grok nodes via bash (Pattern A/E).
- Tier-T bounded leaf offload by default when fast preflight and
grok-auth-expirypass. - Tune-in-place after gate failure:
-r <sessionId>. - Parallel builders with
-wworktrees or hypothesis--best-of-n.
When NOT to use
- Multi-node graphs or overlapping writers (use waves, not Tier-T).
- Destructive, production, git-push, secret-reading, or broad implementation work.
- Grok config/MCP sync —
/harness-master. - Skill installs — Skills CLI dry-run preview only (no live
--applyunless maintainer requests). - Nested Grok-in-Grok graphs beyond platform depth 1.
Pre-flight
Authoritative procedure: Operator Contract → preflight / auth above.
bash skills/grok-delegate/scripts/preflight.sh
Inspect target repo: cd <target-repo> && grok inspect --json (grok inspect has no --cwd flag).
Three-tier model
- Parent —
/orchestratoror OpenCode Ensemble owns waves and gates. - This skill — templates, ledger, safety, recovery.
- Grok CLI —
-p,-r, worktrees, leader, optionalgrok agent stdio.
Wave taxonomy
| Wave | Purpose | Typical --agent |
--max-turns |
|---|---|---|---|
| 0 scout | Read-only exploration | researcher |
8 |
| 1 build | Implementation | repo agent | 25 |
| 2 verify | Tests, review | code-reviewer |
10 |
| tune | Delta on session | inherit | 10 |
| hypothesis | Competing theories | researcher |
12 |
Templates: [references/command-templates.md](references/command-templates.md).
Single node
grok --no-auto-update \
-p "<self-contained task>" \
--cwd "<absolute-repo-path>" \
--output-format json \
--max-turns 25 \
--agent "<agent-name>"
Parse JSON per [references/output-json.md](references/output-json.md). Append ledger row per [references/session-ledger.md](references/session-ledger.md).
Tune loop
grok --no-auto-update \
-r "<sessionId>" \
-p "Tune: <delta only>" \
--cwd "<same cwd>" \
--output-format json \
--max-turns 10
Cap parenttunecount at 3 per node_id.
Parallel wave dispatch
Dispatch N independent bash subprocesses in one parent message. Each node gets unique -w w<wave>-<role>-<n> and non-overlapping ownership. See [references/concurrency.md](references/concurrency.md).
Leader pool
grok agent leader --no-exit-on-disconnect --no-auto-update
Clients attach with grok agent --leader. Details: [references/leader-lifecycle.md](references/leader-lifecycle.md).
Recovery ladder
- Node fail → one retry; else ledger
failed. - JSON parse fail →
--output-format plaintriage. - Leader dead →
grok leader list; restart pool. - Auth fail →
grok login; re-run preflight; stop fleet untilgrok-auth-*checks pass.
Completion criteria
- Pre-flight doctor JSON
ok: true - Every dispatched node has terminal ledger status
- Parent gate passed or explicit user abort recorded
- Orphan leaders killed:
grok leader kill
Validation
check.py runs skill validation, eval validation, audit, doctor smoke, and parsegrokjson smoke.
uv run python skills/grok-delegate/scripts/check.py
uv run pytest tests/test_grok_delegate_*.py -q
uv run python skills/skill-creator/scripts/audit.py skills/grok-delegate
uv run python skills/skill-creator/scripts/package.py skills/grok-delegate --dry-run
Reference index
| File | Content |
|---|---|
| [wave-dag.md](references/wave-dag.md) | Wave gates on bash dispatch |
| [graph-patterns.md](references/graph-patterns.md) | Orchestrator A–F + Tier-T mapping |
| [command-templates.md](references/command-templates.md) | Copy-paste invocations |
| [output-json.md](references/output-json.md) | Headless JSON fields |
| [session-ledger.md](references/session-ledger.md) | Ledger schema |
| [agent-map.md](references/agent-map.md) | Repo agents → --agent |
| [concurrency.md](references/concurrency.md) | Budgets, naming |
| [leader-lifecycle.md](references/leader-lifecycle.md) | Leader start/stop |
| [acp-driver.md](references/acp-driver.md) | Official ACP stdio excerpt |
| [safety-permissions.md](references/safety-permissions.md) | Permission matrix |
| [auth.md](references/auth.md) | OAuth-primary auth and remediation |
| [doctor-output.md](references/doctor-output.md) | Bundled doctor JSON |
Official docs: https://docs.x.ai/build/cli/headless-scripting
Scope boundaries
IS for: native Grok CLI delegation, wave templates, Tier-T trivial offload, session tune loops, parallel worktree dispatch, leader pool policy.
NOT for: Grok config sync, custom wrappers, MCP servers, or live skills sync --apply unless the maintainer requests it.