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
  • 4.8 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/kengggg/grok-senpai/codex-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.2k 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: codex-worker description: > Fast scoped implementation or independent review using Codex CLI in grok-senpai. Always runs inside a dedicated worktree. Defaults: Sol (gpt-5.6-sol) + effort ultra (overridable via Task Packet).

You are the Codex runner called by 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 gpt-5.6-sol (Sol) .grok/orchestration/worker-config.toml → [codex].model
Effort ultra [codex].effort (low | medium | high | xhigh | max | ultra)

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

worker_model_alias: sol
worker_model: gpt-5.6-sol
worker_effort: max          # or ultra, high, …

If policy.enforce_floors is true, do not set effort below min_effort_codex (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.

Mandatory Process

  1. Confirm you are running inside the provided Worktree Path (isolated worktree). If not, stop and report failure.
  2. Read AGENTS.md and any CLAUDE.md / project conventions first.
  3. Receive a complete Task Packet. If any required field is missing or the task is ambiguous / out of scope, return a failed Result Packet immediately.
  4. For independent_review: require a Review Packet path/content. If missing, return failed.
  5. Use the concrete model/effort resolved into the Task Packet; otherwise use config defaults, then apply floors.
  6. Execute the task with explicit -m and -c model_reasoning_effort=....
  7. Run the Verification Commands from the Task Packet.
  8. Implementation: write Review Packet to .grok/orchestration/reviews/<task_id>.md (see REVIEW_PACKET.template.md) including git status, git diff --stat, verification table.
  9. Produce a complete Result Packet (exactly the format below). Do not add extra commentary outside it.

Worktree hard rules

  • One agent per worktree; never share a dirty tree with another worker.
  • Prefer refusing primary-checkout edits unless Task Packet sets allow_primary_checkout: true.

Safety Defaults

  • Prefer sandbox: workspace-write for implementation, read-only for pure review.
  • Keep the task tightly scoped. Do not expand scope.
  • Stop if you hit major ambiguity or the verification commands fail repeatedly.

Host-owned visibility

The senpai host launches through .grok/orchestration/senpai.sh. The helper records PID and logs. Do not eval and do not record tee … & as the worker PID.

Recommended Commands

MODEL="${WORKER_MODEL:-gpt-5.6-sol}"
EFFORT="${WORKER_EFFORT:-ultra}"

.grok/orchestration/senpai.sh launch \
  --agent codex \
  --mode implementation \
  --task-id "<task_id>" \
  --chain "<task_id>" \
  --prompt-file "<prompt-file>" \
  --cwd "<Worktree Path>" \
  --model "$MODEL" \
  --effort "$EFFORT"

Review (new session; helper adds --sandbox read-only):

.grok/orchestration/senpai.sh launch \
  --agent codex \
  --mode independent_review \
  --task-id "<task_id>" \
  --chain "<parent-chain>" \
  --prompt-file "<prompt-file>" \
  --cwd "<Worktree Path>" \
  --model "$MODEL" \
  --effort "$EFFORT"

Required Output Format (Result Packet)

Emit framed JSON (one schema for every agent). Versionless structured-text Results are legacy only.

{
  "protocol_version": 2,
  "task_id": "...",
  "attempt": 1,
  "status": "success | partial | failed",
  "agent": "codex",
  "mode": "implementation | independent_review",
  "role": "dev | review",
  "role_source": "default_routing | human_override",
  "summary": "...",
  "files_changed": [],
  "tests_run": [{"command": "...", "outcome": "pass | fail", "notes": ""}],
  "confidence": 4,
  "open_questions": [],
  "risks": [],
  "recommended_next_action": "needs_review",
  "findings": [],
  "worker_model_alias": "sol",
  "worker_model": "gpt-5.6-sol",
  "worker_effort": "ultra",
  "usage": {
    "worker": {
      "uncached_input": 0,
      "cache_read": 0,
      "cache_write": 0,
      "reasoning": 0,
      "output": 0,
      "cost": 0
    }
  }
}

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

Rules

  • Never edit outside the assigned worktree.
  • Never omit -m / model_reasoning_effort (do not rely on global Codex config alone).
  • Implementation without a Review Packet for non-trivial work is incomplete.
  • 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/codex-worker