Skills Plugins MCP Prompt Model 博客 我的中心

agent-communication

Use when user explicitly requests to coordinate with other Claude Code agents, join an agent chat, or communicate across multiple repositories/projects

DeepseekModel Curated skill Quality Good · 48 v1.0.0

Get

https://deepseekmodel.com/api/download.php?id=asermax-claude-plugins-lesserpowers-skills-agent-communication-skill-md&format=skill
Download .skill Standard format with system_prompt and model_config, ready for any agent framework
The actual content of the system_prompt field in the .skill file.
name agent-communication description Use when user explicitly requests to coordinate with other Claude Code agents, join an agent chat, or communicate across multiple repositories/projects Multi-Agent Communication Overview Enable multiple Claude Code instances to communicate and coordinate work across different repositories using a lightweight socket-based chat system. When to Use Use this skill when: User explicitly asks to "coordinate with other agents" User wants to "join agent chat" or "communicate with other Claude instances" User mentions working across multiple repositories that need coordination User asks to "broadcast a message to other agents" When NOT to Use Do NOT use this skill for: Single-repository work Communication with external services/APIs User asking about other forms of collaboration (git, PRs, etc.) Components Two components work together: agent.py - Your agent daemon (one per Claude instance, runs in background) chat.py - CLI for interaction (runs in foreground, synchronous) When new messages arrive from other agents, you will be automatically notified by the plugin. You don't need to monitor any files or poll for messages - the system handles this automatically. Script Path Construction IMPORTANT : Always use full paths to call scripts. Do NOT use cd to change to the scripts directory. The skill is located at: Base directory for this skill (shown at the top when skill loads) To call scripts, concatenate: Skill base directory + /scripts/ + script name Example: # If skill base is: /home/agus/workspace/asermax/claude-plugins/lesserpowers/skills/agent-communication # Then agent.py is at: /home/agus/workspace/asermax/claude-plugins/lesserpowers/skills/agent-communication/scripts/agent.py In the examples below, we use scripts/agent.py as shorthand, but you should replace scripts/ with the full path to the scripts directory based on the skill's base directory. Background Execution Requirements CRITICAL : agent.py automatically runs in the background via plugin hook. chat.py typically runs in foreground, but receive should run in background using run_in_background: true to allow continuous message listening while doing other work. The Process Step 1: Generate Agent Identity Before joining, generate your identity based on context: Name : Derive from your role and working directory Examples: "backend-agent", "frontend-agent", "docs-agent", "scheduler-api-agent" Pattern: {role}-agent or {project}-agent Context : Your working directory or project Use pwd to get current directory Or derive from CLAUDE.md or git remote Examples: "filadd/scheduler-api", "myproject/docs", "/home/user/repos/backend" Presentation : Brief description of what you manage 1-2 sentences What code/project you're working on Current focus or task Example: "I manage the backend API for the scheduler service. Currently implementing the new scheduling endpoint for recurring tasks." Step 2: Start Your Agent Start the agent daemon: scripts/agent.py --name "your-agent-name" \ --context "your/project/path" \ --presentation "Your description..." Note : The agent automatically detects your working directory from where the command is run. If you need to override the location, you can use --cwd /path/to/directory . On success: Agent daemon runs in background You'll see: "Joined chat. N member(s) present." Agent name is displayed Step 3: Interact via chat.py Now you can use the foreground CLI to interact: Send a message to all agents: scripts/chat.py --agent your-agent-name send "Hello! I'm working on the authentication module." Output on success (all agents reachable): { "status" : "ok" , "message" : "Message sent" , "delivered_to" : [ "backend-agent" , "frontend-agent" ] } Output with unreachable agents: { "status" : "ok" , "message" : "Message sent" , "delivered_to" : [ "backend-agent" ] , "warnings" : { "frontend-agent" : "Connection refused" } } Receive messages from other agents: # Waits indefinitely for messages (for background use with run_in_background: true) scripts/chat.py --agent your-agent-name receive Output if messages available: { "status" : "ok" , "messages" : [ { "id" : "backend-agent-2025-11-29T12:00:00Z" , "timestamp" : "2025-11-29T12:00:00Z" , "type" : "message" , "sender" : { "name" : "backend-agent" , "context" : "filadd/scheduler-api" , "presentation" : "I manage the backend..." } , "content" : "I just updated the API schema, heads up!" } ] } Wait for message notifications: # Waits indefinitely until a message arrives, then returns count without consuming scripts/chat.py --agent your-agent-name notify Output when message(s) arrive: { "status" : "ok" , "count" : 2 } This is useful for background monitoring - notify returns when messages arrive, then use receive to actually get them. Send a message and wait for response: scripts/chat.py --agent your-agent-name ask "What's the API format?" Output if responses received: { "status" : "ok" , "messages" : [ { "id" : "other-agent-2025-11-29T12:00:00Z" , "timestamp" : "2025-11-29T12:00:00Z" , "type" : "message" , "sender" : { "name" : "other-agent" , "context" : "project/backend" } , "content" : "The API format is JSON with these fields..." } ] } Check who's connected: scripts/chat.py --agent your-agent-name status Output: { "status" : "ok" , "data" : { "agent" : { "name" : "frontend-agent" , "context" : "filadd/web-ui" } , "members" : { "backend-agent" : { "name" : "backend-agent" , "context" : "filadd/scheduler-api" , "presentation" : "I manage the backend API..." , "joined_at" : "2025-11-29T12:00:00Z" } , ... } , "queue_size" : 2 } } Step 4: Communication Pattern IMPORTANT : Use conversational back-and-forth communication. Always use the ask command to send a message and wait for response. Continue the conversation until both agents agree it's complete. The Pattern: Initiate with ask - Use scripts/chat.py --agent X ask "message" Wait for response - The ask command automatically waits Respond with ask - When you receive a message, respond using ask (not just send) Continue until done - Keep the conversation going until both agents agree to end Explicit completion - End with something like "Thanks, conversation complete!" or "Got it, all done!" Why ask instead of send? Ensures fluid back-and-forth conversation You see responses immediately Prevents messages getting lost or ignored Creates natural request-response flow When to use send: Broadcasting announcements to all agents (no response needed) Fire-and-forget notifications Example conversational workflow: # Agent A initiates scripts/chat.py --agent backend-agent ask "I've updated the /api/schedule endpoint. Can you review the new schema?" # Receives response from frontend-agent, then continues conversation scripts/chat.py --agent backend-agent ask "The date field is ISO8601 format. Does that work for your UI components?" # Receives confirmation, closes conversation scripts/chat.py --agent backend-agent ask "Perfect! Integration looks good. All done on my end." # Other agent confirms completion, conversation ends Bad pattern (don't do this): # Sends message but doesn't wait - other agent might not see it scripts/chat.py --agent backend-agent send "Updated the API" # Meanwhile continues working, misses response vim other-file.ts Alternative: Background notify loop For long-running work where you want to stay responsive but not block on responses, use background notify (see "Background Notify Pattern" below). Background Notify Pattern Recommended workflow : Keep a background notify running at all times to stay responsive. Start background notify after joining: scripts/chat.py --agent your-name notify (use with run_in_background: true ) Continue with other work - the notify runs in background, waiting for messages Detect completion with TaskOutput - Use the TaskOutput tool to detect when the notify task completes (indicating messages have arrived): # When notify task completes, TaskOutput will return the result Do not try to read the task output file directly - use the TaskOutput tool Read messages : scripts/chat.py --agent your-name receive Process and respond - Handle messages, send responses Restart notify loop - Start background notify again to wait for next message When to use background notify: Working on time-consuming tasks (coding, testing, debugging) Want to stay responsive to other agents without blocking Coordinating across repos where responses may come anytime When to use ask instead: Active conversation with quick back-and-forth Waiting for a specific response you need immediately Message Types You'll See Join Messages When a new agent joins: { "id" : "docs-agent-2025-11-29T12:00:00Z" , "timestamp" : "2025-11-29T12:00:00Z" , "type" : "join" , "sender" : { "name" : "docs-agent" , "context" : "project/docs" , "presentation" : "I manage the documentation..." } , "content" : "I manage the documentation..." } What to do : Welcome the new agent, share context if relevant Leave Messages When an agent leaves: { "id" : "backend-agent-2025-11-29T12:00:00Z" , "timestamp" : "2025-11-29T12:00:00Z" , "type" : "leave" , "sender" : { "name" : "backend-agent" , "context" : "filadd/scheduler-api" , "presentation" : "I manage the backend API..." } , "content" : "" } What to do : Note that agent is no longer available Regular Messages Broadcast messages from other agents: { "id" : "backend-agent-2025-11-29T12:05:00Z" , "timestamp" : "2025-11-29T12:05:00Z" , "type" : "message" , "sender" : { "name" : "backend-agent" , "context" : "filadd/scheduler-api" , "presentation" : "I manage the backend API..." } , "content" : "Just pushed changes to the auth module" } What to do : Process content, respond if relevant Error Handling Agent Name Already In Use Error : Agent fails with "Agent name already in use" Solution : Choose a different agent name or check if there's a stale agent process Agent Not Running Error : chat.py fails with "No agent running" Solution : Start your agent first (see Step 2) File Permissions If you encounter file permission errors, check that your user has access to the runtime directory Practical Example Scenario : Coordinating backend and frontend work Backend agent (you) : # Join chat scripts/agent.py --name "backend-agent" \ --context "filadd/scheduler-api" \ --presentation "I manage the backend API. Working on new scheduling endpoint." # Do work vim src/routes/schedule.ts # Initiate conversation with ask scripts/chat.py --agent backend-agent ask "New /api/schedule endpoint ready. Schema: {date, recurrence, callback_url}. Can you review?" # Receives frontend's question about recurrence format # Continue conversation scripts/chat.py --agent backend-agent ask "Recurrence format: {type: 'daily'|'weekly'|'monthly', interval: number}. Example: {type: 'weekly', interval: 2} for every 2 weeks. Does this work for your UI?" # Receives confirmation # Close conversation scripts/chat.py --agent backend-agent ask "Great! Let me know if you need any changes after testing." # Receives "All good, thanks!" - conversation complete Frontend agent (other Claude instance) - responds to each ask: # Join chat scripts/agent.py --name "frontend-agent" \ --context "filadd/web-ui" \ --presentation "I manage the web UI. Working on schedule creation form." # Wait for backend's message scripts/chat.py --agent frontend-agent receive # Sees backend's ask about reviewing endpoint # Respond with ask scripts/chat.py --agent frontend-agent ask "What's the format for recurrence? Daily/weekly/monthly?" # Receives format details # Continue conversation scripts/chat.py --agent frontend-agent ask "Perfect! That format works great for my dropdown. Starting implementation now." # Receives backend's offer to help # Close conversation scripts/chat.py --agent frontend-agent ask "All good, thanks!" # Conversation complete
Keywords that activate this skill. Click one to copy it.

This skill does not provide trigger words.

The downloaded .skill package contains the following fields.
Field Description
formatFormat tag (skill/v1)
skill_idUnique skill ID
nameSkill name
versionVersion
descriptionDescription
categoryCategories (array)
trigger_wordsTrigger words
tagsTags
sourceSource
source_urlSource URL (this page)
exported_atExported at (set per download)
system_promptSystem prompt body
model_configModel config: provider / model / temperature / max_tokens / top_p
examplesExamples
install_guideImport guide for Coze / Dify / Claude / custom frameworks
The same skill can be exported in different platform formats.
.skill Standard format with system_prompt and model_config, ready for any agent framework Download
.skillpro Enhanced format with scripts, tools, dependencies and hooks Download
.json Plain JSON export with system_prompt and model parameters only Download
Coze Markdown with frontmatter, for Coze platform import Download
Dify Dify DSL, import directly after creating an app Download

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。