一键导入
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Authorized pentest planning with mandatory ROE scope gate. Synthesizes phase checklists and findings. NOT for static audit (security-scanner), CTF labs (ctf-*), or C2/webshell tooling.
Operate MCPHub groups, endpoints, compression, and CLI from repo registry. Use for hub preflight, group picking, tunnel vs local exposure. NOT harness sync.
Use for session, scoped, PR, range, full audit, simplification, and source/provenance reviews with evidence-first findings. NOT for feature implementation or benchmarking.
Deep multi-source research with reviewable plans, source-support auditing, and confidence scoring. Use for technical, academic, market, fact-checking investigation. NOT for code review or simple Q&A.
Extract clean article text and metadata from URLs or HTML with trafilatura CLI. Use for single-page extraction, piped/local HTML, bounded discovery. NOT for research synthesis (research), PDFs (docling), raw fetch (fetch), video (yt-dlp).
Plan cross-harness skills sync dry-run steps before any live install. Use when reconciling harness skill inventory. NOT for --apply or npx installs.
| name | grok-delegate |
| description | 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. |
| license | MIT |
| metadata | {"author":"wyattowalsh","version":"1.3.0"} |
| user-invocable | true |
Cross-harness orchestration of Grok Build native CLI only. Parent harness owns the macro graph; Grok executes micro nodes.
| $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 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 |
-r <sessionId> tune passes on an existing ledger row.trivial by default when fast preflight ok, grok-auth-expiry is ok, 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.grok -p Tier-T dispatch fails for a parent work item, stop Tier-T for that item and continue locally.wave/patterns for valid multi-node Grok graphs.wave without 0|1|2 is invalid; show valid tiers or the empty-args gallery. Never invent a default wave.preflightbash scripts/preflight.sh from any cwd (bundled doctor.py; optional --cwd for target repo).ok is false or any grok-auth-* / grok-binary check is fail.warn as advisory; any grok-auth-expiry fail (expired, missing, or malformed expires_at) blocks fleet dispatch and Tier-T offload.authpreflight.sh; inspect grok-auth-* checks in JSON output.references/auth.md for OAuth-primary remediation (grok login).bash scripts/auth_verify.sh --cwd <target>.trivialok: true and grok-auth-expiry: ok (OAuth healthy).grok --no-auto-update \
-p "<bounded self-contained task>" \
--cwd "<absolute-repo-path>" \
--output-format json \
--max-turns 10
wave <0|1|2>-w w<wave>-<role>-<n> names and non-overlapping file ownership for wave 1.tune-r <sessionId>.Tune:; cap parent_tune_count at 3 per node_id.--always-approve.leadergrok leader kill after graph completion.ledgerpatterns/orchestrator Pattern A–F.| 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 |
bin/gk, MCP control server, or custom headless wrapper scripts.scripts/preflight.sh before fleet dispatch or Tier-T offload.grok login default; API key only on explicit user request.--always-approve for cross-harness delegation.--no-auto-update and explicit --cwd on automation paths.grok-auth-expiry pass.-r <sessionId>.-w worktrees or hypothesis --best-of-n./harness-master.--apply unless maintainer requests).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).
/orchestrator or OpenCode Ensemble owns waves and gates.-p, -r, worktrees, leader, optional grok agent stdio.| 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.
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. Append ledger row per references/session-ledger.md.
grok --no-auto-update \
-r "<sessionId>" \
-p "Tune: <delta only>" \
--cwd "<same cwd>" \
--output-format json \
--max-turns 10
Cap parent_tune_count at 3 per node_id.
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.
grok agent leader --no-exit-on-disconnect --no-auto-update
Clients attach with grok agent --leader. Details: references/leader-lifecycle.md.
failed.--output-format plain triage.grok leader list; restart pool.grok login; re-run preflight; stop fleet until grok-auth-* checks pass.ok: truegrok leader killcheck.py runs skill validation, eval validation, audit, doctor smoke, and parse_grok_json 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
| File | Content |
|---|---|
| wave-dag.md | Wave gates on bash dispatch |
| graph-patterns.md | Orchestrator A–F + Tier-T mapping |
| command-templates.md | Copy-paste invocations |
| output-json.md | Headless JSON fields |
| session-ledger.md | Ledger schema |
| agent-map.md | Repo agents → --agent |
| concurrency.md | Budgets, naming |
| leader-lifecycle.md | Leader start/stop |
| acp-driver.md | Official ACP stdio excerpt |
| safety-permissions.md | Permission matrix |
| auth.md | OAuth-primary auth and remediation |
| doctor-output.md | Bundled doctor JSON |
Official docs: https://docs.x.ai/build/cli/headless-scripting
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.