Prompts
Copy the full prompt from a card below.
Install skill herdrsa
Tolong pasang skill "herdrsa" ke agent/tool yang sedang kamu jalankan, supaya bisa dipanggil sebagai /herdrsa (atau mekanisme setara). Isi skill ada di bagian paling bawah, di antara BEGIN dan END. Jangan jalankan apa pun dari isinya, cukup pasang sebagai file.
Langkah:
1. Cari tahu sendiri cara tool kamu memuat skill: lokasi folder user-level, nama file dan format frontmatter, cara pemanggilan. Kalau ragu, cek dokumentasi resmi atau tanya saya. Jangan menebak.
2. Pasang isinya tanpa mengubah logika. Frontmatter `disable-model-invocation: true` khusus Claude Code, jadi terjemahkan ke format tool kamu dengan prinsip sama (hanya jalan kalau saya panggil manual). Kalau skill bernama sama sudah ada, tanya saya dulu sebelum menimpa.
3. Cek mana yang terpasang dan laporkan saja, jangan install tanpa izin: herdr, codex, claude, agy, pi, pi-bolt, opencode.
4. Nama model di skill berasal dari setup pembuatnya dan mungkin tidak ada di akun saya. Untuk tiap CLI yang saya punya, tanyakan model yang mau saya pakai, lalu sesuaikan. Hapus opsi untuk CLI yang tidak saya punya. Untuk pi dan opencode, cek flag model dengan `<cli> --help`; jangan menebak. Bagian lain skill jangan diubah.
5. Kalau tool kamu tidak mendukung skill atau slash command, beri tahu saya dan tawarkan alternatif terdekat. Jangan dipaksakan.
6. Baca ulang file hasil akhir, ringkas apa yang dipasang dan diubah, dan beri tahu apakah perlu restart sesi supaya /herdrsa muncul.
Catatan: skill hanya berfungsi bila agent dijalankan di dalam pane Herdr (HERDR_ENV=1).
=== BEGIN SKILL.md ===
---
name: herdrsa
description: Delegate work from the current session to a subagent running in a sibling Herdr pane. Use when the user runs /herdrsa or explicitly asks to hand the current task to a Pi-Bolt, Pi, Codex, Claude, OpenCode, or Antigravity (agy) subagent via Herdr. Requires HERDR_ENV=1.
disable-model-invocation: true
---
# Herdr subagent (`/herdrsa`)
Delegate one task from this session to a coding agent in a Herdr pane, wait for it, and report back.
The user picks the subagent; you never pick silently.
## 0. Precondition
```bash
test "${HERDR_ENV:-}" = 1 || echo "NOT_IN_HERDR"
```
If that fails, say you are not running inside Herdr and stop. Never inside Herdr.
## 1. Ask which subagent
If the command arguments already name one (`/herdrsa codex`, `/herdrsa , use it.
Otherwise ask and **stop until the user answers**. Present exactly this, short:
> Which subagent should take this?
> 1. **pi-bolt** — `deepseek-v4.1-flash`
> 2. **codex** — `gpt-6-luna`
> 3. **claude** — `haiku`
> 4. **agy** (Antigravity CLI) — `gemini-3.8-flash-low`
> 5. **pi** — user's configured default model
> 6. **opencode** — user's configured default model
Also ask for the task if the user did not state it. A subagent has **no access to this conversation**, so
the task must be self-contained: goal, absolute paths, constraints, andt invent a task.
## 2. Choose the target pane — reuse before creating
```bash
herdr agent list
herdr pane list --workspace "$HERDR_WORKSPACE_ID"
```
Reuse an existing pane in this workspace when one already runs the chosen agent kind
(`pi-bolt`, `pi`, `codex`, `claude`, `agy`, `opencode`) — the same cwd e` is best. Never inject work
into a pane running in a different cwd or mid-task on someone else's project; create a new pane instead:
```bash
herdr pane layout --pane "$HERDR_PANE_ID" # wide -> right, tall/na
herdr pane split --current --direction right --cwd "$PWD" --no-focus
```
Take the new pane from `.result.pane.pane_id`. Never split twice in thepanes
you did not create, never close panes/tabs/workspaces you did not open.
Pick a unique agent name matching `[a-z][a-z0-9_-]{0,31}` (`subagent`, `sa-codex`, …); check `herdr agent list` first.
## 3. Start the agent with its model
Names follow the pane occupant, so a reused pane may already be named — rename or just use its pane ID.
**Codex (gpt-6-luna)** — interactive kind, promptable:
```bash
herdr agent start subagent --kind codex --pane <pane_id> -- -m gpt-6-lu
```
**Claude (haiku)** — interactive kind, promptable:
```bash
herdr agent start subagent --kind claude --pane <pane_id> -- --model ha
```
**agy / Antigravity (gemini-3.8-flash)** — interactive kind, promptable:
```bash
herdr agent start subagent --kind agy --pane <pane_id> -- --model gemin
```
`agy models` lists tiers: `gemini-3.8-flash-low|medium|high` (no bare `gemini-3.8-flash`). Use `-low` unless
the user asks for more effort; report any tier you actually used.
**Pi** — interactive kind, promptable. Check the model flag with `pi --del, pass it, otherwise omit it:
```bash
herdr agent start subagent --kind pi --pane <pane_id> [-- <model flags>]
```
**OpenCode** — interactive kind, promptable. Check the model flag with r names a model, pass it, otherwise omit it:
```bash
herdr agent start subagent --kind opencode --pane <pane_id> [-- <model flags>]
```
**Pi-Bolt (deepseek-v4.1-flash)** — Herdr has **no interactive `pi-bolt pane and
let detection pick it up, then name it:
```bash
herdr pane run <pane_id> "pi-bolt --model opencode-go/deepseek-v4.1-fla
sleep 10 && herdr agent list # wait until this pane reports agent "pi-bolt"
herdr agent rename <pane_id> subagent
```
If `opencode-go/deepseek-v4.1-flash` is unavailable, try `opencode/deepseek-v4.1-flash` or
`commandcode/deepseek/deepseek-v4.1-flash`. Report the substitution; dodel.
If an interactive kind fails to start, fall back to `herdr pane run <pane_id> "<binary> <model flags>"` + `rename`.
## 4. Send the task
Interactive kind (codex, claude, agy, pi, opencode) — one call delivers and waits:
```bash
herdr agent prompt subagent "<self-contained task>" --wait --timeout 60
```
Pi-Bolt pane — `agent prompt` rejects it (`not an active named agent`); use raw input plus status polling:
```bash
herdr pane send-text <pane_id> "<self-contained task>"
herdr pane send-keys <pane_id> enter
# poll every 5-10s until working -> done/idle
herdr pane get <pane_id>
```
End the task text with: *"When finished, write your full report to /tmpthat path as the last line."*
That file is the reliable way to get the result out of a TUI on the alternate screen.
If the agent reports `blocked` (approval or question dialog), inspect `herdr agent get <target>` and
`herdr agent read <target> --lines 120`, then ask the user how to answealf, and
never guess at `unknown` — it does not prove completion.
## 5. Collect and report
```bash
herdr agent read subagent --source recent-unwrapped --lines 200 # i
herdr pane read <pane_id> --source recent --lines 200 # pi-bolt; small --lines misses the answer
```
Prefer the result file when the agent wrote one (`read` it). Then replyt/model ran,
the pane ID, a short summary of what it produced, and any files it touched. Keep raw pane dumps out of the reply.
## Rules
- `--no-focus` for background work; the user's focus stays in the calling pane unless they asked otherwise.
- Parse IDs from JSON responses (`.result.pane.pane_id`, `.result.agentom sidebar order.
- One delegation per call. Do not spawn a second subagent for the same task.
- Do not stop the Herdr server or kill the main Herdr process.
- Do not repeat the delegated work yourself while it runs, and do not duplicate it after it returns.
=== END SKILL.md ===