Command Palette

Search for a command to run...

Назад к скиллам
скилл № 50025

claude-dm

Send peer-to-peer message and control to Claude Code sessions. Use when coordinating multiple simultaneous Claude sessions, or user says "dm another claude"…

БесплатноЗапускает вложенные скрипты
archibateот archibate★ 42 звезды на GitHub

Установить claude-dm в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

claude-dm

Peer-to-peer messaging between independent Claude Code sessions that share a tmux server.

When to use

  • Multiple Claude Code sessions are running on the same machine (check with list), and one needs to inspect or communicate with another.
  • You need to know what another Claude is currently working on, without attaching to its tmux pane.
  • You want to trigger a slash command (/compact, /claude-dm, etc.) in another session.
  • Send a prompt to a peer and wait for the reply as data.

When NOT to use

  • To spawn a child Claude for one-shot work → use the Agent tool.
  • To spawn a headless Claude from CLI → use the /claude-headless skill.
  • To schedule a future Claude run → use the CronCreate (local) or /schedule (remote).
  • To send a message to remote Claude on a different machine → see portable/README.md.

Prerequisites

  • Peers must run in tmux (any socket). Default resolution: $CLAUDE_DM_SOCKET or /tmp/tmux-$(id -u)/default.
  • Peer must be spawned headful, not headless (-p).
  • Same Unix user (or a shared socket with group perms).
  • claude-dm available in $PATH (otherwise fallback to bin/claude-dm under skill dir).

Verbs

claude-dm list                                 # roster of claude panes
claude-dm status <target>                      # state + safety gate result
claude-dm peek   <target> [N]                  # last N text blocks of peer's transcript
claude-dm tail   <target>                      # live-follow peer's JSONL
claude-dm wait   <target> [int_s] [to_s]       # block until peer reaches idle/modal
claude-dm send   <target> <msg>   [--force]
claude-dm cmd    <target> /<slash> [--force] [--confirm]
claude-dm ask    <target> <msg>   [timeout_s]
claude-dm esc    <target>          [--force]   # Escape: interrupt turn or cancel modal
claude-dm answer <target> <key>    [--force]   # pick modal option (1/2/3/y/n/a/…)
claude-dm self   /<slash>                      # queue a user-only slash command on the current pane

<target> is session:window.pane on the current socket (e.g. HOME:8.1).

list marks the current session's row with a trailing * on the ADDR column (e.g. _claude:7.1*). Strip the * before passing the addr to other verbs. Self detection only fires when $CLAUDE_DM_SOCKET matches the socket from $TMUX.

The LAST column shows compact elapsed time (17s, 8m, 1h21m, 3d20h) since the peer's transcript JSONL was last written — useful for triaging which idle peers are stale-idle vs just-finished. - means no transcript could be resolved.

Peer states

peer_state reports one of five values, shown in status and used by every gate:

State Meaning Source signal
🟢 idle at ❯ prompt, buffer empty — safe to DM title ✳ + empty box
🔵 busy streaming a turn / running a tool title has spinner glyph
🟠 drafting human has unsubmitted text in the input box contains non-menu text
🔴 modal permission / AskUserQuestion prompt open box has ≥2 numbered options
⚫ other not a Claude REPL, or unknown UI missing box/❯ markers

When state is modal, status also reports a subtype — permission (Bash/Edit/Write/Notebook being gated) or question (AskUserQuestion) — resolved from the most recent tool_use in the transcript.

Gate matrix

Verb Allowed on Refused on Override
send idle (+ L3 end_turn) everything else --force
cmd idle (+ L3 end_turn) everything else --force (red-tier also needs --confirm)
ask idle (+ L3 end_turn) everything else --force
esc busy, modal, idle, other drafting only (would wipe human's draft) --force
answer modal only everything else --force
self own pane, input box empty input box drafting / modal / unknown none (allowlist is hard)
wait always (terminal: idle/modal) — —
peek / tail / list / status always — —

Why the draft protection: send-keys appends to the tty buffer. If a human has a half-typed draft, your message concatenates with theirs. Every write verb that goes through safe_to_dm catches this via the drafting state; esc applies the same rule explicitly.

Slash-command tiers (for cmd)

Tier Commands Gate
🟢 green everything else safety only
🟡 yellow /compact /loop /schedule safety only
🔴 red /clear /exit /resume /reset safety + explicit --confirm

Red tier refuses to send without --confirm because those commands are irreversible for the peer.

Spawning a disposable target for testing

To smoke-test the tool without touching real peers:

tmux -S /tmp/claude-dm-test.sock -f /dev/null new-session -d -s test -n shell fish
CLAUDE_DM_SOCKET=/tmp/claude-dm-test.sock claude-dm send test:0.0 "hello" --force
tmux -S /tmp/claude-dm-test.sock ki
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • bin/claude-dm
  • lib/common.sh
  • lib/read.sh
  • lib/safety.sh
  • lib/write.sh
  • portable/.gitignore
  • portable/README.md
  • portable/build-portable.sh

FAQ

Что делает скилл claude-dm?

Send peer-to-peer message and control to Claude Code sessions. Use when coordinating multiple simultaneous Claude sessions, or user says "dm another claude", "list claude sessions", "peek peer claude", "spawn claude in tmux", "monitor remote claude", "notify peer in tmux", "send to peer", "handover to claude", "inspect peer transcript", "orchestrate claude sessions".

Как установить скилл claude-dm?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл claude-dm запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить claude-dm с