herdr-cli
Skill2 starsChanged 8 months agoMITView on GitHub
Expert guide for herdr, the terminal workspace manager for AI coding agents.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- hmu332233/skillstheir own version, first seen Aug 26, 2026
- julweber/ai_agent_skillsword for word, first seen Mar 20, 2026
Other versions2 projects use a version of this.
Word for word · 1
- julweber/ai_agent_skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 1
- hmu332233/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-agent-skills-assistantSkill
- ansibleSkill
- artificial-analysisSkill
- cavemanSkill
- claude-cliSkill
- code-doctorSkill
- code-summarizerSkill
- codex-cliSkill
- concourse-ciSkill
- dev-brainstormingSkill
- docker-cliSkill
- file-organizerSkill
- frontend-web-developerSkill
- github-actions-cicdSkill
- github-cliSkill
- gitlab-ci-cdSkill
- grill-meSkill
- gtd-assistantSkill
- hf-cliSkill
- karpathy-guidelinesSkill
- kestraSkill
- list-large-filesSkill
- list-most-intensive-processesSkill
- llama-cppSkill
- llm-wikiSkill
- mermaidSkill
- morning-ritualSkill
- obsidian-masterSkill
- obsidian-open-loops-collectorSkill
- opencode-agent-creatorSkill
- opencode-cliSkill
- pi-cliSkill
- pi-subagents-masterSkill
- planka-development-flowSkill
- plnk-cliSkill
- ponytailSkill
- product-prd-brainstormingSkill
- python-api-developerSkill
- ralph-prd-converterSkill
- ralph-prd-generatorSkill
- release-managementSkill
- rest-testsuite-skillSkill
- skill-loaderSkill
- design-taste-frontendSkill
- terraformSkill
- tmux-coderSkill
- tmux-specialistSkill
- trello-cliSkill
- tts-conversationSkill
- uvSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 95
Run any script with --help (or no arguments) for its full option list and examples.
- Very specific: line 254
Server must be running: before any agent commands work — check with herdr status.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
herdr — Terminal Workspace Manager for AI Agents
herdr is a terminal workspace manager that hosts and orchestrates AI coding agents (pi, Claude Code, Codex, Gemini, Cursor, Devin, and 15+ more) in persistent terminal sessions behind a UNIX socket.
Primary Workflow — Launching and Using an Agent
ATTENTION: Launch agents with the helper scripts (Decision Guide below), NOT with raw herdr CLI subcommands.
Decision Guide
| Situation | Use |
| Named role with a profile (system prompt + tools/skills/extension/MCP allowlists, sandbox) | runagent <name> -p "..." |
| Ad-hoc one-shot, model only, no profile | run-<kind>-herdr.sh -m <model> -p "..." |
| Multi-stage pipeline (research → plan → implement → review) | pipeline-herdr.sh |
| Reuse an existing workspace, inspect/drive a launch step by step, agent kind without a script (codex, gemini, …) | manual herdr CLI (fallback below) |
Manual Workflow (fallback only)
- Ensure the server is running:
herdr status. If not, start withherdr server. - Create a workspace (auto-creates a default tab):
herdr workspace create --label "my-project". - Get the default tab and pane:
herdr tab list --workspace <ws_id>andherdr pane list --workspace <ws_id>. - Start an agent in the default pane:
herdr agent start "agent-name" --kind pi --pane <pane_id>. - Send a task (synchronous):
herdr agent prompt "agent-name" "your instruction" --wait --timeout 60000. (Omit--untilto matchidle|done|blockedautomatically.) - Read output:
herdr agent read "agent-name" --source recent --lines 100.
The workflow is complete when --wait returns. Verify with herdr agent list.
Helper Scripts
Each script wraps the whole primary workflow (server check → workspace → tab → pane → agent start → prompt → wait → read output) in one command.
| Script | Agent kind | Model format |
scripts/run-pi-herdr.sh | pi | provider/model (e.g. evo/ornith-1.0-35b-Q6) |
scripts/run-claude-herdr.sh | claude | alias or full name (sonnet, opus, haiku, claude-sonnet-4-5) |
scripts/run-opencode-herdr.sh | opencode | provider/model (e.g. anthropic/claude-sonnet-4-5) |
scripts/pipeline-herdr.sh | multi-stage | per-stage --<stage>-kind / --<stage>-model |
The three run-* scripts share their workflow via scripts/herdr-common.sh (sourced, not
executed — edit it to change behavior for all three at once).
Options shared by all three run-* scripts:
| Option | Short | Description | Default |
--model <model> | -m | Model (required) | — |
--prompt <text> | -p | Task prompt (required) | — |
--timeout <ms> | -w | Wait timeout | 120000 |
--name <name> | -n | Agent name | auto from model |
--cwd <path> | -c | Workspace working directory | current dir |
--label <label> | -l | Workspace label | auto from model |
--no-keep | -nk | Close the workspace when done | keep it open |
--no-wait | -nw | Fire-and-forget: submit and exit | wait for completion |
--help | -h | Full usage and examples | — |
Agent-specific options:
| Script | Option | Description |
| pi, claude | -sp, --system-prompt <text> | Replace the system prompt (claude also expands @file) |
| pi, claude | -asp, --append-system-prompt <text> | Append to the system prompt (repeatable) |
| pi | -sk, --skill <path> | Load a skill file or directory (repeatable) |
| pi | -pr, --profile <name> | Resolve skills from an agent profile (~/.pi/agent/agents/<name>.md) via agent_profile.py (same resolution as runagent) and add --skill flags |
| claude | --agent <name> / --agents <json> | Predefined subagent / inline subagent definitions |
| claude | --permission-mode <mode> | default, acceptEdits, plan, bypassPermissions |
| claude | --yolo | --dangerously-skip-permissions (sandboxes only) |
| opencode | --agent <name> | Predefined opencode agent (opencode agent list) |
| opencode | --auto | Auto-approve permissions not explicitly denied (dangerous) |
# One-shot task, workspace kept open afterwards
scripts/run-pi-herdr.sh -m "evo/ornith-1.0-35b-Q6" -p "Explain src/main.ts"
# Custom cwd and a longer timeout
scripts/run-claude-herdr.sh -m opus -p "Refactor the auth module" -c /path/to/project -w 180000
# Predefined subagent, auto-approve, close the workspace when done
scripts/run-opencode-herdr.sh -m "anthropic/claude-sonnet-4-5" -p "Review the diff" \
--agent reviewer --auto --no-keep
# Fire-and-forget
scripts/run-pi-herdr.sh -m "qwen3.6-35b" -p "Run the full test suite" --no-wait
# Skills resolved from an agent profile (impl/review from the planka skill)
scripts/run-pi-herdr.sh --profile impl -m "dgx/qwen3.8-27b-q4" -p "Fix PLANKA-42" --no-waitRun any script with --help (or no arguments) for its full option list and examples.
pipeline-herdr.sh (Research → Plan → Implement → Review)
Deterministic multi-stage pipeline: one herdr workspace, one tab + agent per stage, strictly
sequential. Stages hand work forward through files in <repo>/.agent-work/ (never through
prompt text). Each stage has a mechanical gate; a failed stage is re-run once with the gate
requirement and the transcript tail appended to its prompt.
# Default routing: plan on a strong model, research/implement on a local one
scripts/pipeline-herdr.sh /path/to/repo "Add retry with backoff to the API client"
# Override any stage
scripts/pipeline-herdr.sh /path/to/repo "Refactor config loader" \
--plan-model opus --implement-model anthropic/claude-sonnet-4-5 --review-kind claude
# Resume after a failure (stages whose gate already passes are skipped)
scripts/pipeline-herdr.sh /path/to/repo --from-stage implement| Stage | Artifact | Gate | Defaults |
| research | .agent-work/research.md | exists, non-empty | pi / dgx/qwen3.6-35b-mtp, 1h |
| plan | .agent-work/plan.md | exists, non-empty | claude / opus, 1h |
| implement | .agent-work/results.md | ends with RESULTS: all-pass | pi / dgx/qwen3.6-35b-mtp, 3h |
| review | .agent-work/review.md | ends with STATUS: clean or STATUS: open:<n> | pi / dgx/qwen3.8-27b, 1h |
Stage behavior is defined by the static prompt files in prompts/{research,plan,implement,review}.md
— edit those to change what a stage does. The review stage re-runs the test commands itself
rather than trusting results.md.
Options: --<stage>-kind, --<stage>-model, --<stage>-timeout <ms>;
--from-stage <stage> (resume), --fresh (don't skip passing stages), --close (close the
workspace on success). On failure the workspace is kept open — inspect
.agent-work/<stage>.transcript.md and .agent-work/pipeline.log.
Exit codes: 0 clean · 10 research · 11 plan · 12 implement · 13 review produced no
STATUS line · 14 finished with open issues.
Named agent profiles (runagent)
scripts/runagent (also ~/.local/bin/runagent) launches named agent roles as sandboxed
subagents. A profile is a pi agent file at ~/.pi/agent/agents/<name>.md (YAML frontmatter +
system-prompt body) that pins the full surface: model, tools, skills, extensions, MCP servers,
sandbox policy.
When to use: named roles → runagent <name> (default path for role launches; the pi-native
subagent tool path is deprecated in favor of it); ad-hoc, model-only → run-*-herdr.sh.
runagent --list # table of all profiles
runagent web-researcher --explain # audit the composed command (asks y/N)
runagent web-researcher -p "Research X" # one-shot (sandboxed); prints agent output
runagent web-researcher # interactive (attaches TUI; tty only)
runagent web-researcher -m evo/qwen3.6-35b -w /tmp/scratch -p "..." # overridesKey options: -p (text | @file | - stdin), -m model override, -w workspace (sandbox
writable dir), -c cwd, --env K=V, --ro-bind HOST[:DEST] / --bind HOST[:DEST] (repeatable
bind mounts), --label <label>, --harness <kind>, --timeout <ms>, --no-wait,
--keep/--no-keep, --explain. Stdout contract: progress → stderr; final agent output → stdout prefixed by
=== Agent Output === (pipeable from agent sessions; non-tty never attaches and requires -p).
Profile format (~/.pi/agent/agents/<name>.md frontmatter; unknown keys are ignored):
| Key | Meaning |
harness | v1: only pi |
model | default provider/model; -m overrides (model override is never policy-blocked) |
tools | comma-separated allowlist; mcp:server/tool entries translate to pi's mcp__server__tool; absent = all tools (no --tools flag) |
skills | fail-closed allowlist: absent = no skills; [all] = auto-discovery; explicit names resolved (project .pi/skills, ~/.pi/agent/skills, ~/.agents/skills, npm packages); unknown name = hard fail (exit 12) |
extensions | fail-closed allowlist, same pattern; resolved against settings.json packages (npm + local), dirs resolved to entry files |
mcp | fail-closed allowlist: absent = explicit empty MCP config; [all] = global config; listed servers must exist in mcp-adapter.json (their inline env blocks travel with the server) |
sandbox | on (default) / off, or mapping with workspace: (pinned writable dir), env: (extra --env forwarding), ro_bind: (read-only bind mounts, HOST[:DEST], ~ expanded) and bind: (read-write bind mounts, same syntax). asb sandbox: single writable dir = workspace, system dirs ro, env cleared |
Body = the agent's system prompt (applied via pi --append-system-prompt from a temp copy in
<workspace>/.runagent/, removed on exit — host /tmp is a private tmpfs inside asb and not
visible in-sandbox).
--explain is the audit step: it prints the exact composed launch (model, sandbox, cwd,
workspace, full asb pi ... command) and asks Proceed? [y/N]. Use it to verify the
tool/skill/extension/MCP surface before any real launch; declining exits 0 with no launch.
Exit codes:
| Code | Meaning |
| 0 | success (incl. --explain declined) |
| 2 | usage error (bad agent name, bad flag/timeout, non-tty without -p) |
| 10 | launch failure (agent never registered / pane run failed) |
| 11 | wait timeout |
| 12 | profile resolution failure (unknown skill / extension / mcp server) |
| 13 | herdr server unavailable |
Workspaces are labeled ra-<agent>-<suffix> and kept by default (close hint printed);
--no-keep closes them on finish. No auto-GC in v1.
Architecture
For details, see ARCHITECTURE.md.
Hierarchy: Session → Workspace → Tab → Pane → Agent.
You can have multiple workspaces in a session, but typically one is enough.
Core CLI
The commands you need day to day. Full surface: references/cli-reference.md.
Agent launching is script territory (
runagent/run-*-herdr.sh). Rawherdr agent ...is for inspecting or managing agents (list,read,attach,wait,remove), or for driving a launch step by step when scripts don't fit.
# Server
herdr status # is the server up?
nohup herdr server > /tmp/herdr-server.log 2>&1 & # start it headless
# Workspace / tab / pane — these print JSON already; do NOT pass --json
herdr workspace create --label "my-project" --cwd /path/to/repo
herdr workspace list
herdr workspace close <ws_id>
herdr tab create --workspace <ws_id> --label "stage-1"
herdr tab list --workspace <ws_id>
herdr pane list --workspace <ws_id>
# Agents
herdr agent start <name> --kind <pi|claude|opencode|codex|...> --pane <pane_id> -- --model <model>
herdr agent prompt <name> "<task>" --wait --timeout 120000
herdr agent read <name> --source recent --lines 200
herdr agent list
herdr agent attach <name>
herdr agent remove <name>
# Notify when something finishes
herdr notification show "Task done" --body "<detail>" --position top-rightPull IDs out of the JSON with jq:
WS=$(herdr workspace create --label demo --cwd "$PWD" | jq -r '.result.workspace.workspace_id')
PANE=$(herdr pane list --workspace "$WS" | jq -r '.result.panes[0].pane_id')herdr --help lists every subcommand — it is the best discovery tool.
Where the rest lives
| File | Contents |
| references/cli-reference.md | Full CLI: server, workspaces, tabs, panes, agents, worktrees, notifications, sessions, multi-agent patterns |
| references/reference.md | Agent integrations, lifecycle reporting API, configuration and updates |
| ARCHITECTURE.md | Components, hierarchy, agent statuses |
prompts/ | Stage prompts used by pipeline-herdr.sh |
Common Gotchas
- Server must be running before any agent commands work — check with
herdr status. If not running, start withherdr server. workspace create,tab create,pane list,agent list, andworktree createdo NOT support--json— they output JSON by default. Adding--jsonwill fail with "unknown option: --json". Use--jsononly onstatus server,status client,server agent-manifests, andapi schema.herdr agent startrequires--kindand--pane— the old--workspace --splitsyntax is incorrect. The pane must be at an interactive shell prompt.- Use
herdr agent promptfor AI agents, notherdr pane run—pane runis for shell commands;agent promptprovides state tracking and synchronous execution. - Agent statuses include
done— the full list is:idle,working,blocked,done,unknown. herdr agent send-keysnotherdr agent send— usesend-keys <TARGET> <KEY>...for key presses.herdr session createdoes not exist — sessions are created viaherdr --session <name>or implicitly.- Agent binary paths vary — prefer
which <agent>over hardcoded paths. herdr auto-detects the agent binary for known--kindvalues. - Agent status may show
unknownbriefly after start — wait a moment before reading output. --waitonagent promptrequires a state change — if the agent is already working, that active turn's completion may match. A stalled agent returnsagent_prompt_stalledafter 5000ms.- Workspace ID parsing — when capturing workspace_id from JSON output, prefer
herdr workspace get <label>over fragile grep patterns. herdr --helpreveals all available subcommands — it's the most comprehensive discovery command.--until <state>alone is broken onagent prompt— both--until doneand--until idletime out even when the agent completes. Workarounds: (a) Use--waitalone (matchesidle|done|blockedautomatically), (b) Use multiple--until:--wait --until done --until idle, or (c) Submit without--wait, then useherdr agent wait "name" --until doneseparately. Agents transition todone(notidle) after completing tasks, so--until idlewill never match a completed agent.- Model formats differ by agent kind — pi and opencode take
provider/model(e.g.anthropic/claude-sonnet-4-5); claude takes aliases (sonnet,opus,haiku) or full model names. The helper scripts pass-mstraight through to each agent binary. - claude/opencode must be installed and authenticated — check
which claude/which opencode(install:npm install -g @anthropic-ai/claude-code); authenticate withclaude login/opencode auth login. Without auth the TUI sits on a login prompt and the script blocks until timeout. herdr integration install claude/herdr integration install opencodeadd lifecycle state hooks for better status tracking (seeherdr integration status).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

