delegate-to-opencodelisted
Install: claude install-skill T0mSIlver/skills
# Delegate to opencode (CLI)
Run `opencode run` non-interactively for a second opinion, review, or a
delegated edit worker. Model default: `-m zai-coding-plan/glm-5.2` (verify the
slug with `opencode models | grep glm`; don't hard-code `temperature`).
## Happy path
1. **Isolate and install agents.** Copy the bundled agents (they are
`mode: all`, required for direct `--agent` launches) into
`.opencode/agents/` of the checkout the run will use — opencode resolves
`--agent` against `--dir`, so the agent must live there. Read-only review
runs in the current checkout:
```bash
slug="opencode-$(date +%Y%m%d-%H%M%S)"
skill_dir="<directory containing this SKILL.md>"
run_dir="/tmp/opencode-$slug"
mkdir -p "$run_dir" .opencode/agents
cp "$skill_dir/assets/reviewer.md" .opencode/agents/
```
Edit work gets its own worktree instead (opencode never creates one):
```bash
slug="opencode-$(date +%Y%m%d-%H%M%S)"
skill_dir="<directory containing this SKILL.md>"
worktree="../$(basename "$PWD")-$slug"
git worktree add -b "agent/opencode/$slug" "$worktree" HEAD
run_dir="$worktree/.agent-runs/$slug"
mkdir -p "$run_dir" "$worktree/.opencode/agents"
cp "$skill_dir/assets/editor.md" "$worktree/.opencode/agents/"
```
2. **Write the brief** to `$run_dir/prompt.md`:
context, exact task, constraints, acceptance criteria, verification commands,
required final output. It reaches opencode inline as the positional message —
`"$(cat