From adjutant-agent
Send a direct message to a specific agent via tmux prompt injection and persistent MCP messaging. Ensures delivery even if the agent is not currently active.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adjutant-agent:direct-messageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Send a message directly to a specific agent — delivered via tmux prompt injection for immediate processing AND persistent MCP message for inbox history.
Send a message directly to a specific agent — delivered via tmux prompt injection for immediate processing AND persistent MCP message for inbox history.
/direct-message <agent-name> <message>
Examples:
/direct-message raynor Hey, did you finish the API refactor?/direct-message nova Please review the color scheme changes and report back./direct-message stetmann Read your latest bead and send me a status update.When the user invokes /direct-message <agent-name> <message>, follow these steps exactly:
/direct-messageIf no agent name is provided, ask the user who they want to message. If no message is provided, ask the user what they want to say.
Call the MCP tool:
list_agents({ status: "all" })
Check that <agent-name> matches an agent in the roster (case-insensitive). If not found:
Run:
tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -i "adj-swarm-{agent-name}" || echo "NO_SESSION"
This determines if the agent has an active tmux session at adj-swarm-{agent-name}.
If a tmux session was found, inject the message as a submitted prompt:
tmux send-keys -t "adj-swarm-{agent-name}" -l "{message}"
tmux send-keys -t "adj-swarm-{agent-name}" Enter
Critical details:
-l flag is MANDATORY — it sends text literally, preventing tmux from interpreting spaces or special characters as key namesEnter is sent as a SEPARATE send-keys command, never embedded in the message textsend-keys fails, note the error but continue to Step 5Regardless of whether tmux delivery succeeded, always send a persistent MCP message:
send_message({ to: "{agent-name}", body: "{message}" })
This ensures:
If the message asks a question or requests information, append this instruction to BOTH the tmux and MCP message:
Please respond via Adjutant MCP: send_message({ to: "{your-agent-name}", body: "your response" })
This tells the receiving agent how to reply back through the proper channel.
Send a report to the user via MCP AND print to stdout:
send_message({ to: "user", body: "<delivery report>" })
Delivery report format:
## Direct Message Delivery Report
**To:** {agent-name}
**Message:** {first 100 chars of message}...
**Delivery:**
- tmux prompt: {delivered | no session | failed: reason}
- MCP message: {sent | failed: reason}
**Response requested:** {yes | no}
If the message requested a response, wait briefly (15-30 seconds) and check for a reply:
search_messages({ query: "{your-agent-name}", agentId: "{agent-name}", limit: 3 })
If a response arrives, relay it to the user via:
send_message({ to: "user", body: "{agent-name} responded: {response}" })
If no response after the initial wait, inform the user and move on — don't block indefinitely.
For multi-exchange conversations (like the Kerrigan/Raynor volley), the invoking agent should:
Include explicit instructions in each message for the recipient to respond back:
"Reply to me (to: '{your-name}') with your answer and end with a question for me."
After receiving a response, immediately send the next exchange without waiting for user prompting
Report each exchange to the user via MCP as it happens:
send_message({ to: "user", body: "Exchange N/M — {agent} said: {summary}. I replied with: {summary}." })
If the recipient doesn't respond within ~30 seconds, re-inject via tmux with a nudge:
tmux send-keys -t "adj-swarm-{name}" -l "{your-name} sent you a message. Read it: read_messages({ agentId: \"{your-name}\", limit: 3 }) and respond now."
tmux send-keys -t "adj-swarm-{name}" Enter
adj-swarm-{name} matches the Adjutant swarm spawner patternCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub lupusdei/adjutant --plugin adjutant-agent