herdr

작성자: ogulcancelik

Herdr(터미널 멀티플렉서)를 제어하여 코딩 에이전트용으로 사용합니다. 사용자가 Herdr을 명시적으로 언급하거나 Herdr을 사용해 팬, 탭, 워크스페이스, 터미널, 명령어 또는 다른 에이전트와의 통신을 검사하거나 제어하도록 요청한 경우에만 사용합니다. 백그라운드 터미널, 위임 또는 병렬 작업이 작업에 도움이 될 수 있다는 이유만으로 사용하지 마십시오. HERDR_ENV=1이 필요합니다.

npx skills add https://github.com/ogulcancelik/herdr --skill herdr

Herdr

Herdr organizes terminals into workspaces, tabs, and panes, recognizes coding agents running inside panes, and exposes the current session through the herdr CLI.

Before issuing any control command, verify that this agent is running inside a Herdr-managed pane:

test "${HERDR_ENV:-}" = 1

If the check fails, say that you are not running inside Herdr and stop. Do not inspect or control the focused Herdr session from outside Herdr.

When the check passes, the herdr binary in PATH talks to the current session. Use it to inspect neighboring work, create terminal layout, start agents and commands, read output, and wait for state changes.

Learn the current CLI

The installed binary is the authority for command syntax. Start with:

herdr --help

Then print the relevant command group by running the group without a subcommand:

herdr agent
herdr pane
herdr workspace
herdr tab
herdr worktree
herdr terminal
herdr notification
herdr integration
herdr session
herdr machine

Do not run bare herdr for discovery; it launches or attaches the TUI. Do not probe a mutating nested command by omitting arguments. Commands such as herdr workspace create are valid with defaults and will execute.

Most control commands return JSON. Read identifiers and state from those responses instead of predicting them.

Understand layout, panes, and agents

Choose the primitive that matches the job:

  • Workspace, tab, and pane topology organize terminal locations.
  • Pane commands control raw terminals, shells, tests, servers, input, and output.
  • Agent commands control the recognized coding agent currently occupying a pane.

A pane exists whether or not it contains an agent. agent start requires an existing available shell pane and never creates, splits, or moves layout. Use pane commands for ordinary processes. Use agent commands when Herdr must validate agent identity or interpret idle, working, blocked, done, and unknown lifecycle states.

Agent commands accept either a unique live agent name or the pane ID currently hosting that agent. They do not accept terminal IDs or bare agent-kind labels. Names must match [a-z][a-z0-9_-]{0,31} and be unique among live agents. A name follows the current pane occupant and is cleared when that agent exits, is released, or is replaced. Suspending an agent with Ctrl+Z and running a non-agent command preserves its identity while the exact process remains alive. This does not preserve the original identity across another recognized agent taking over. A retained identity does not mean the agent is in the foreground; inspect the pane before sending input.

idle and done normally indicate the agent is ready for input; neither guarantees that an unfamiliar approval dialog was recognized or that a retained agent is in the foreground. The CLI/API uses the server's seen state to distinguish them; explicit focus commands mark the target seen, while reads do not. Each TUI client tracks viewed completions independently, so its Done badge can differ from the CLI or another client's badge. Antigravity and Grok can be idle while background tasks or subagents keep running, so a settled-state wait is not proof those jobs have finished. blocked means Herdr recognized an approval or question UI. unknown means an agent is present but Herdr cannot classify it confidently; it does not prove completion.

Use IDs and caller context

Public IDs are opaque stable handles:

  • workspace: w1
  • tab: w1:t1
  • pane: w1:p1

Closed tab and pane IDs are not reused. A pane moved into another workspace receives a new workspace-qualified pane ID. After pane move, continue with .result.move_result.pane.pane_id or the live agent name. The old value is reported as .result.move_result.previous_pane_id; only the moved process's inherited caller context keeps resolving that old ID, so do not use it as a general agent target.

Herdr injects the caller's context into each managed pane:

printf '%s\n' "$HERDR_WORKSPACE_ID" "$HERDR_TAB_ID" "$HERDR_PANE_ID"

Prefer --current when a pane command should target the calling pane. An omitted pane split target uses the calling pane when HERDR_PANE_ID is available, otherwise the focused pane. Other commands may use the UI-focused pane, which can belong to the user or another client.

Discover live state with:

herdr workspace list
herdr tab list --workspace "$HERDR_WORKSPACE_ID"
herdr pane current --current
herdr pane list --workspace "$HERDR_WORKSPACE_ID"
herdr agent list

Creation responses expose the IDs to use next. workspace create returns .result.workspace, .result.tab, and .result.root_pane. tab create returns .result.tab and .result.root_pane. pane split returns the new pane as .result.pane.

IDs and live agent names are scoped to one server. Two saved SSH machines can both have w1:p1 or an agent named reviewer. Selecting a machine in the TUI does not retarget commands running in your pane: without --machine, they still use the inherited session and socket context.

To control a saved SSH machine, use the same global prefix for discovery and every later command:

herdr --machine <label-or-id> agent list
herdr --machine <label-or-id> pane list
herdr --machine <label-or-id> agent prompt <remote-agent-name> "Reply with your current status." --wait --timeout 120000

The selector must be an enabled saved profile ID or a unique, case-sensitive label, not an arbitrary SSH hostname. Commands use that profile's remote session without an open TUI. Do not combine --machine with --session or --remote. Discover IDs on that machine; inherited local IDs and --current do not identify remote panes.

Both installations must support machine API forwarding, and the remote server must already be running and API-compatible. Forwarding never installs, starts, or restarts a server and never falls back to Local. Local configuration, session management, installation commands, and interactive attachment are not forwarded. Remote worktree paths must be absolute, ~, or start with ~/; plugin link paths must be absolute. A connection failure does not prove a mutation was not applied: inspect remote state before retrying.

herdr machine list lists saved connection profiles, not a cross-machine pane inventory; add --json for scripts. Only add, remove, enable, or disable profiles when the user asks. Removing a profile disconnects the client but does not stop remote sessions. Interactive machine add discovers running remote sessions and may ask the user to pick one; non-interactive setup uses the remote default session unless --remote-session is explicitly supplied. Use herdr machine status [<label-or-id>] --json to diagnose a failing machine. herdr machine reconnect needs the user to complete SSH authentication in their terminal; do not run it for them. Setup asks before stopping an incompatible server and defaults to No; do not approve replacement without the user's consent. Experimental handoff is not part of machine add.

Start and coordinate an agent

Default to a sibling pane in the current tab and the current working directory. Do not create a workspace, tab, worktree, or different cwd unless the user explicitly requests that topology or location.

Honor a direction requested by the user. Otherwise inspect the caller pane:

herdr pane layout --pane "$HERDR_PANE_ID"

Split a wide pane to the right and a narrow or tall pane down. Avoid repeated same-direction splits that create unusably narrow columns or short rows. Keep the user's focus in the calling pane and explicitly preserve the caller's working directory:

herdr pane split --current --direction right --cwd "$PWD" --no-focus

Replace right with down when appropriate. Read the new pane ID from .result.pane.pane_id.

An available shell pane must be at its interactive prompt, with the shell itself in the foreground and no foreground command, editor, or agent running. Start a supported agent in that pane with a useful unique name:

herdr agent start reviewer --kind codex --pane <returned-pane-id>

Use the kind requested by the user. Run herdr agent to inspect the installed kind list and options. Pass native agent arguments only after --:

herdr agent start reviewer --kind codex --pane <returned-pane-id> -- <agent-args...>

A successful agent start returns only after Herdr detects the expected agent in the same pane and considers it ready for interactive input. If the agent is blocked during startup, the command returns agent_not_ready immediately but keeps the name available for agent read and agent send-keys. Wait until the agent becomes idle before prompting it. Startup defaults to a 30-second timeout.

Submit work through the agent surface:

herdr agent prompt reviewer "Review the current diff and report only actionable findings." --wait --timeout 120000

agent prompt honors the pane's live bracketed-paste mode and sends text followed by encoded Enter as one ordered submission. It reports successful submission only after both have been written; that alone does not prove the agent started a turn. For Codex on Windows, Herdr sends a paste boundary before Enter so submission does not depend on prompt size. It rejects an agent already waiting at an approval or question dialog with agent_blocked before sending any input. Inspect the blocked UI and ask the user before answering it. For normal agent work, --wait is enough: it waits for the first settled idle, done, or blocked state. Do not repeat those defaults with --until.

With --wait, a prompt sent from a non-working state must produce observed working or blocked activity. After submission, Herdr waits up to five seconds for that activity; unrelated idle, done, or session changes do not satisfy this gate. It returns agent_prompt_stalled if no activity is observed, or timeout if the caller's timeout expires first. The caller timeout includes submission time. Without a timeout, the settled-state wait is indefinite after activity is observed. This wait tracks lifecycle state, not an individual turn; if the agent is already working, completion of the active turn may satisfy it.

Use --until only for a state-specific workflow, such as waiting for an already-running agent to request input:

herdr agent wait reviewer --until blocked --timeout 120000

Without --until, standalone agent wait uses the same settled-state defaults as agent prompt --wait.

Use logical keys for interactive agent UI controls:

herdr agent send-keys reviewer esc
herdr agent send-keys reviewer ctrl+c

Herdr validates all keys before writing any bytes. Read the result through the resolved agent:

herdr agent get reviewer
herdr agent read reviewer --source recent-unwrapped --lines 120

If a wait fails or returns blocked, inspect agent get and agent read before deciding what input to send. A timeout or stalled response does not prove the prompt was never delivered; do not blindly submit it again. Use the pane surface only when raw terminal control is intentional.

Run an ordinary command in another pane

Create a sibling pane with the same geometry rule, preserve the caller's working directory, and keep user focus unchanged:

herdr pane split --current --direction right --cwd "$PWD" --no-focus

Read the new pane ID from .result.pane.pane_id, then run and inspect the command:

herdr pane run <returned-pane-id> "just test"
herdr pane wait-output <returned-pane-id> --match "test result" --timeout 120000
herdr pane read <returned-pane-id> --source recent-unwrapped --lines 120

pane run queues command text and Enter together; success acknowledges admission, not command execution. On macOS, pane run and agent start reject a command that exceeds the terminal's current canonical line-input limit before queuing it. Wait for the interactive shell prompt before retrying. The check covers this submission, not an earlier incomplete line or a later terminal-mode change. pane wait-output searches the selected snapshot immediately, so output that already exists can match. Use --match <text> for a literal substring or --regex <pattern> for a Rust regular expression. Omitting --timeout allows an indefinite wait.

Use the read source that matches the task:

  • visible: the currently rendered viewport.
  • recent: recent rendered output, including soft wraps.
  • recent-unwrapped: recent output with soft wraps joined; prefer it for logs and transcripts.
  • detection: the plain-text bottom-buffer snapshot used for agent detection.

Use --format ansi when colors and terminal styling are evidence. Otherwise use text.

--lines asks Herdr for more rows from the pane's available screen and host scrollback. Alternate-screen rows do not enter ordinary host scrollback. For supported idle agents, Herdr can collect application-owned history and restore the viewport afterward, but not every application or response can be recovered this way.

If a larger recent read still does not reveal the completed response, ask the agent to write it as Markdown in a temporary directory and reply only with the file path, then read that file on the same machine. Use this only as a fallback; do not request file output in the initial prompt.

Safety and coordination rules

  • Use --no-focus for background work unless the user asked to switch context.
  • Use --current, an explicit pane ID, or a unique agent name. Do not rely on another client's focused pane.
  • Parse IDs from JSON responses. Do not derive them from sidebar order or examples.
  • Do not close workspaces, tabs, panes, or sessions you did not create unless the user explicitly asked. Ordinary CLI/API closes do not inherit the TUI's last-pane confirmation. workspace close --group closes the primary workspace and its linked worktree workspaces; never add it merely to bypass workspace_group_close_required.
  • Use --trust-repository only after the user has verified the repository. It grants per-request Git trust; it is not a routine retry for a failed worktree command.
  • Client and server versions can differ after an update. Check herdr status before relying on new server features. A missing method is not permission to stop or upgrade a server.
  • Never run herdr server stop from an active session unless the user explicitly intends to stop the server and its pane processes.
  • Never kill the main Herdr process. Use named test sessions for experiments that need an isolated server.
  • CLI server errors are JSON on stderr with exit status 1. CLI syntax errors exit with status 2.

관련 스킬

implementing-warehouse-sources
posthog
PostHog 데이터 웨어하우스 가져오기 소스를 구현하고 확장합니다. posthog/temporal/data_imports/sources 아래에 새 소스를 추가하거나 데이터셋/엔드포인트를 추가할 때 사용합니다.
apm-review-panel
microsoft
이 패널은 FAN-OUT + SYNTHESIZER입니다. 각 페르소나는 자체 에이전트 스레드(task tool을 통해)에서 실행되며, assets/panelist-return-schema.json과 일치하는 JSON을 반환합니다. 오케스트레이터는 각 반환값을 스키마 검증하고, 모든 반환값을 apm-ceo 신시사이저(역시 task 스레드이며, assets/ceo-return-schema.json과 일치하는 JSON을 반환)에 전달한 후, assets/recommendation-template.md에서 하나의 추천 코멘트를 렌더링합니다.
dbs-chatroom-austrian
dontbesilent2025
하이에크 × 미제스 × 클로드 세 명의 대화. 오스트리아 학파 경제학 관점의 다중 역할 토론. 실행 방식: /dbs-chatroom-austrian, /chatroom-austrian, /奥派, "오스트리아 학파 채팅방" 오스트리아 경제학 채팅방. 하이에크 × 미제스 × 클로드 토론. 트리거: /dbs-chatroom-austrian, /chatroom-austrian, /奥派, "Austrian chat
researchcommunicationcreative
fix-dependabot
remotion-dev
Dependabot PR을 수정하여 해당 의존성의 모든 모노레포 인스턴스를 업데이트하고, bun install을 실행한 후 푸시합니다.
migration-core
github
5단계 마이그레이션 프로세스, 보안 가드레일, 산출물, 아카이빙 프로토콜, 그리고 GitHub로의 모든 CI/CD 마이그레이션을 위한 10개 항목 완료 체크리스트…
storyboard-creation
skills-101
영화 및 비디오 스토리보드 제작: 샷 용어, 연속성 규칙, 패널 레이아웃을 다룹니다. 샷 유형, 카메라 각도, 움직임, 180도 규칙, 주석 형식을 포함합니다. 사용처: 비디오 기획, 영화 사전 제작, 광고 스토리보드, 뮤직비디오 기획, 애니메이션. 트리거: 스토리보드, 스토리보딩, 샷 리스트, 영화 기획, 비디오 기획, 사전 제작, 샷 구성, 카메라 각도, 장면 기획, 비주얼 스크립트, 애니매틱, 스토리보드 패널, 비디오 스토리보드
deepgram-js-voice-agent
deepgram
Use when writing or reviewing JavaScript/TypeScript in this repo that builds an interactive voice agent via `agent.deepgram.com/v1/agent/converse`. Covers…
diagnose-deployment
microsoft
PAC CLI 업로드 오류와 Dataverse 비동기 작업 오류를 표면화하고, 알려진 실패 카탈로그와 패턴 매칭하며, 식별된 문제를 선택적으로 자동 수정합니다…