using-agent-relay
Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows
What this skill does
# Using agent-relay
## Overview
Real-time agent-to-agent messaging. Two modes: **tmux wrapper** (real-time, sub-5ms) and **file-based team** (async, simpler).
## When to Use
- Multiple agents coordinating on shared codebase
- Turn-based interactions (games, reviews, task handoff)
- Parallel task distribution
- Real-time Claude/Codex/Gemini collaboration
**Don't use:** Single agent, cross-host networking, guaranteed delivery required.
## Quick Reference
| Pattern | Description |
|---------|-------------|
| `->relay:Name <<<`...`>>>` | **Default format** - always use fenced format |
| `->relay:* <<<`...`>>>` | Broadcast to all agents |
| `[[RELAY]]{"to":"Name","body":"msg"}[[/RELAY]]` | Structured JSON |
| `\->relay:` | Escape (literal output) |
| `relay read <id>` | Read truncated message |
## CLI Commands
```bash
relay -f # Start daemon + dashboard
relay --status # Check daemon
relay --stop # Stop daemon
relay wrap -n Alice claude # Wrap agent with messaging
relay read abc123 # Read truncated message
```
### Team Commands (file-based)
```bash
relay team send -n You -t Recipient -m "Message"
relay team send -n You -t "*" -m "Broadcast"
relay team check -n You --no-wait # Non-blocking
relay team check -n You --clear # Clear after read
relay team status # Show team
```
## Sending Messages (Tmux Mode)
**Output the pattern directly** - don't use bash commands. Always use the fenced format:
```
->relay:BlueLake <<<
I've finished the API refactor.>>>
->relay:* <<<
STATUS: Starting auth module.>>>
```
### Fenced Format (Default)
The fenced format is the default for all messages:
```
->relay:Reviewer <<<
REVIEW REQUEST: Auth Module
Please check:
- src/auth/login.ts
- src/auth/session.ts
Key changes:
1. Added JWT validation
2. Fixed session expiry>>>
```
**CRITICAL:** Always end with `>>>` at the end of the last line of content! The `<<<` opens, `>>>` closes.
**Limits:** Fenced messages max 200 lines. For longer content, send summary with reference ID.
**Fallback:** If you forget `>>>`, message auto-closes on double blank line.
### Pattern Rules
Pattern must be at line start (whitespace/prefixes OK):
```
->relay:Name message # Works
->relay:Name message # Works
- ->relay:Name message # Works
Some text ->relay:Name msg # Won't work
```
## Receiving Messages
Messages appear as:
```
Relay message from Alice [abc123]: Message here
```
### Truncated Messages
Long messages show `[TRUNCATED...]`. Read full content:
```bash
relay read abc123
```
**Rule:** If message ends abruptly, always read full message before responding.
## Coordination Patterns
```
# Task assignment
->relay:Developer <<<
TASK: Implement /api/register>>>
# Status broadcast
->relay:* <<<
STATUS: Starting auth module>>>
->relay:* <<<
DONE: Auth complete>>>
# Review request
->relay:Reviewer <<<
REVIEW: src/auth/*.ts>>>
# Question
->relay:Architect <<<
QUESTION: JWT or sessions?>>>
# Blocked
->relay:* <<<
BLOCKED: Need DB credentials>>>
```
## Spawning Agents
Any agent can spawn worker agents to delegate tasks:
```
# Spawn a worker
->relay:spawn WorkerName cli "task description"
# Examples
->relay:spawn Dev1 claude "Implement the login endpoint"
->relay:spawn Tester claude "Write unit tests for auth module"
# Release when done
->relay:release WorkerName
```
Workers run in separate tmux windows and can communicate back via `->relay:` patterns.
## Multi-Project Bridge
```bash
# Bridge multiple projects
relay bridge ~/auth ~/frontend ~/api
# Cross-project messaging
@relay:projectId:agent Message
@relay:*:lead Broadcast to leads
```
## Common Mistakes
| Mistake | Fix |
|---------|-----|
| Using bash to send real-time messages | Output `->relay:` directly as text |
| Messages not sending | `relay --status` to check daemon |
| Incomplete message content | `relay read <id>` for full text |
| Pattern not at line start | Move `->relay:` to beginning |
| Forgetting to clear inbox | Use `--clear` flag |
## Troubleshooting
```bash
relay --status # Check daemon
relay --stop && relay -f # Restart
ls -la /tmp/agent-relay.sock # Verify socket
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.