docs(skills): update SKILL.md documentation to reflect HERDR_SESSION_NAME native naming

This commit is contained in:
2026-08-05 10:23:49 +09:00
parent 0fe3b9932c
commit b6c41e6486
6 changed files with 465 additions and 10 deletions
+42 -7
View File
@@ -35,7 +35,7 @@ Before doing anything, verify the environment:
```bash
# 1) herdr available and isolated server status
command -v herdr || { echo "ERROR: herdr not installed"; exit 1; }
echo "Herdr server name: ${HERDR_SERVER_NAME:-default}"
echo "Herdr session name: ${HERDR_SESSION_NAME:-default}"
# 2) claude / agy available
command -v claude # required for --agent claude
@@ -91,15 +91,50 @@ Under the hood this now maps to a real, separate herdr **session** (`herdr --ses
### Recommended Alias
You can set an alias in your shell to easily query sessions on the isolated server:
To prevent this, you can run this skill inside an **isolated herdr session** using the `HERDR_SESSION_NAME` environment variable or the `--herdr-session <name>` flag (opt-in).
```bash
alias tmc='herdr -L multi-agent-canary'
tmc ls # Lists only your multi-agent sessions
# Explicit custom session
export HERDR_SESSION_NAME=multi-agent-canary
bash .agents/skills/multi-agent-mux-create/scripts/create_session.sh \
--workspace /path/to/project --agent claude --role Developer
# Or via flag
bash .agents/skills/multi-agent-mux-create/scripts/create_session.sh \
--workspace /path/to/project --agent claude --role Developer --herdr-session multi-agent-canary
```
### Safety Rules (Pitfall 29 Summary)
- Never use global server termination commands like `herdr server stop` as they will destroy every workspace/agent on that server (including your own workspace sessions if they share the server). (`kill-server`/`kill-session -a` are tmux-era names that don't exist in herdr's real CLI — see Pitfalls below.)
- By using an isolated server via `HERDR_SERVER_NAME`, your agent sessions are completely separated from your default user workspace, ensuring 0% interference — this is now backed by a genuinely separate `herdr` session/socket, not merely a workspace label.
- To deliberately tear down an *entire* isolated group at once (all its workspaces and agents), use `herdr session stop <HERDR_SERVER_NAME>` followed by `herdr session delete <HERDR_SERVER_NAME>` — this only affects that named session, never the default one.
Why use `--herdr-session`?
- By default, all skills target `default` herdr session socket — fine for single-workspace use.
- By using an isolated session via `HERDR_SESSION_NAME`, your agent sessions are completely separated from your default user workspace, ensuring 0% interference — this is now backed by a genuinely separate `herdr` session/socket, not merely a workspace label.
- To deliberately tear down an *entire* isolated group at once (all its workspaces and agents), use `herdr session stop <HERDR_SESSION_NAME>` followed by `herdr session delete <HERDR_SESSION_NAME>` — this only affects that named session, never the default one.
---
## Output format
When invoked, the script creates or updates `./.mam/agent-sessions.yaml` with:
```yaml
herdr_sessions:
- name: <workspace>-creator-<agent> # E.g. landing-page-creator-claude
status: running # Initial status for a freshly created agent
role: Developer
herdr_session_created_at: '2026-08-04T12:00:00Z'
herdr_session_epoch: 1785844800
herdr_session: <HERDR_SESSION_NAME> # Isolated session name (default: 'mam-<ws-slug>')
delegate_job_id: null
pane:
index: 0
pid: 12345
cmd: claude
cmd_full: claude --dangerously-skip-permissions
cwd: /path/to/project
start_command: "HERDR_SESSION_NAME=<herdr_session> herdr new-session -d -s <SESSION_NAME> -x 140 -y 40 -c <WORKSPACE> <CMD_FULL>"
attach_command: "HERDR_SESSION_NAME=<herdr_session> herdr agent attach <SESSION_NAME>"
kill_command: "HERDR_SESSION_NAME=<herdr_session> herdr kill-session -t <SESSION_NAME>"
```
## Workflow
@@ -16,7 +16,7 @@ metadata:
# Multi-Agent Resume — Reattach to a Saved Conversation
> **Companion skills**: `multi-agent-mux-create` (start a fresh agent), `multi-agent-mux-stop` (terminate), `multi-agent-mux-monitor` (live status).
> **Herdr Isolation**: `HERDR_SERVER_NAME` env var를 create에서 설정한 경우, 동일 서버에서 동작합니다. 자세한 격리 패턴은 [multi-agent-mux-create/SKILL.md](../multi-agent-mux-create/SKILL.md) 참조.
> **Herdr Isolation**: `HERDR_SESSION_NAME` env var를 create에서 설정한 경우, 동일 서버에서 동작합니다. 자세한 격리 패턴은 [multi-agent-mux-create/SKILL.md](../multi-agent-mux-create/SKILL.md) 참조.
> **Single source of truth**: `./.mam/agent-sessions.yaml`.
## What this skill does
@@ -16,7 +16,7 @@ metadata:
# Multi-Agent Status — Read-Only Instant Snapshot
> **Companion skills**: `multi-agent-mux-create` (start), `multi-agent-mux-resume` (re-attach), `multi-agent-mux-stop` (terminate), `multi-agent-mux-monitor` (live polling).
> **Herdr Isolation**: `status` 명령은 YAML에 등록된 모든 세션의 격리 서버(`herdr_server` 필드)를 자동으로 조회하여 상태를 확인하므로, `HERDR_SERVER_NAME` 환경변수를 수동으로 지정하지 않아도 모든 격리 서버의 세션 상태를 통합 조회합니다.
> **Herdr Isolation**: `status` 명령은 YAML`herdr_session` 필드를 자동으로 파싱하여 상태를 확인하므로, `HERDR_SESSION_NAME` 환경변수를 수동으로 지정하지 않아도 모든 격리 서버의 세션 상태를 통합 조회합니다.
> **Single source of truth**: `./.mam/agent-sessions.yaml`.
## What this skill does
+1 -1
View File
@@ -16,7 +16,7 @@ metadata:
# Multi-Agent Stop — Stop an Agent herdr Session
> **Companion skills**: `multi-agent-mux-create` (start), `multi-agent-mux-resume` (re-attach), `multi-agent-mux-monitor` (live status).
> **Herdr Isolation**: `stop` 명령은 YAML의 `herdr_server` 필드를 자동으로 파싱하여 해당 격리 서버의 세션을 안전하게 종료(kill)하므로, `HERDR_SERVER_NAME` 환경변수를 수동으로 지정할 필요가 없습니다.
> **Herdr Isolation**: `stop` 명령은 YAML의 `herdr_session` 필드를 자동으로 파싱하여 해당 격리 서버의 세션을 안전하게 종료(kill)하므로, `HERDR_SESSION_NAME` 환경변수를 수동으로 지정할 필요가 없습니다.
> **Single source of truth**: `./.mam/agent-sessions.yaml`.
## What this skill does