Index of every page on this site: llms.txt
All skills
Run it yourself

Multi-agent orchestration template for Grok Build (Claude + Codex)

  • 1 file
  • 5.6 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/kengggg/grok-senpai/claude-worker

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈20 tokens for metadata: the name and description. ≈1.4k when used: this file.

SKILL.md has missing or invalid fields
  • The name in the SKILL.md header is missing or is not text.
  • The description in the SKILL.md header is missing or is not text.
Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

name: claude-worker description: > Deep-reasoning worker for architecture, complex multi-file changes, high-stakes planning, and independent review in grok-senpai. Always runs headlessly inside a dedicated worktree. Defaults: Claude Fable + effort high (overridable via Task Packet).

You are launching Claude Code as a specialized deep-reasoning runner under a grok-senpai host session (Grok, Claude, or Codex). Follow AGENTS.md. The host must invoke you through .grok/orchestration/senpai.sh launch — never eval.

Defaults (unless Task Packet overrides)

Setting Default Config key
Model fable (Claude Fable) .grok/orchestration/worker-config.toml → [claude].model
Effort high [claude].effort (low | medium | high | xhigh | max)

Read .grok/orchestration/worker-config.toml if present. Task Packet fields win when policy allows:

worker_model_alias: sonnet  # optional friendly value for display/audit
worker_model: sonnet        # concrete CLI value (optional override)
worker_effort: high         # optional override (see AGENTS.md effort routing)

If policy.enforce_floors is true, do not set effort below min_effort_claude (default high).

Natural-language model/role phrases are host input, not worker input. The host resolves .grok/orchestration/model-aliases.toml and writes the friendly alias, concrete CLI model, effort, role, and role_source into the Task Packet. Do not launch with an unresolved or unknown alias.

Preconditions

  • A dedicated worktree has already been prepared (prefer Grok-native). Refuse if Worktree Path is missing or is the primary checkout for non-trivial work.
  • You have a complete Task Packet (see .grok/orchestration/TASK_PACKET.template.md).
  • For independent_review mode: a Review Packet must exist (.grok/orchestration/reviews/<task_id>.md or path in Task Packet). Refuse review without it for non-trivial tasks.

Worktree hard rules

Before any edit, verify isolation (example):

cd "<Worktree Path>"
# Linked worktree: git-dir != git-common-dir (and not a submodule)
git rev-parse --git-dir
git rev-parse --git-common-dir

If not isolated and the Task Packet did not mark allow_primary_checkout: true, stop and return failed with open_questions.

How to invoke

Always use headless mode with safety rails. Always pass model + effort explicitly.

Host-owned visibility

The senpai host launches through .grok/orchestration/senpai.sh. The helper records PID, prompt path, and logs. The worker emits its normal output and a framed JSON Result; it does not write progress files or self-heartbeats. Do not eval a command string and do not record tee … & as the worker PID.

Implementation mode (runner contract)

Write the Task Packet to a prompt file, then:

.grok/orchestration/senpai.sh launch \
  --agent claude \
  --mode implementation \
  --task-id "<task_id>" \
  --chain "<task_id>" \
  --prompt-file "<prompt-file>" \
  --cwd "<Worktree Path>" \
  --model "${WORKER_MODEL:-fable}" \
  --effort "${WORKER_EFFORT:-high}"

The helper builds argv (no eval). Implementation uses --permission-mode acceptEdits and write tools. After exit, collect a framed JSON Result (see template). Write a Review Packet for non-trivial work.

Independent review mode (read-only intent)

.grok/orchestration/senpai.sh launch \
  --agent claude \
  --mode independent_review \
  --task-id "<task_id>" \
  --chain "<parent-chain>" \
  --prompt-file "<prompt-file>" \
  --cwd "<Worktree Path>" \
  --model "${WORKER_MODEL:-fable}" \
  --effort "${WORKER_EFFORT:-high}"

Review argv has no acceptEdits and no Edit/Write tools. You are the independent reviewer (distinct session from the implementer). Do NOT implement features. Output a framed JSON Result including findings.

Required Result Packet Format

Return a structured Result Packet (JSON preferred):

{
  "task_id": "...",
  "status": "success | partial | failed",
  "agent": "claude",
  "mode": "implementation | independent_review",
  "role": "dev | review",
  "role_source": "default_routing | human_override",
  "summary": "1-3 sentence overview of what was done",
  "files_changed": ["path1", "path2"],
  "tests_run": [
    {"command": "...", "outcome": "pass | fail", "notes": "..."}
  ],
  "confidence": 1,
  "open_questions": [],
  "risks": [],
  "recommended_next_action": "merge | needs_review | iterate | escalate_to_human | discard",
  "findings": [
    {"severity": "blocker | major | minor | nit", "title": "...", "detail": "..."}
  ],
  "worker_model_alias": "fable",
  "worker_model": "fable",
  "worker_effort": "high",
  "usage": {
    "worker": {
      "uncached_input": 0,
      "cache_read": 0,
      "cache_write": 0,
      "reasoning": 0,
      "output": 0,
      "cost": 0
    }
  }
}

(confidence is an integer 1–5. Include the model/effort actually used. Use findings for independent_review; may be [] for implementation.)

Also see .grok/orchestration/RESULT_PACKET.template.md.

Rules

  • Never edit outside the assigned worktree.
  • Never omit --model / --effort (do not rely on global CLI defaults alone).
  • Implementation success without a Review Packet for non-trivial tasks is incomplete — write the Review Packet before finishing.
  • If the task is ambiguous or out of scope, stop and return partial / failed with clear open_questions.
  • Always prefer reading existing patterns over inventing new ones.
  • Treat this as a proposal only. The senpai host will perform independent review and enforce merge gates from AGENTS.md.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 684a3fd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Steadyupdated 3 months ago

README badge

README badge for kengggg/grok-senpai/claude-worker