cross-team-comm
通过 Tailscale、SSH、Gateway API 与 sessions_send 实现跨团队、跨实例的 OpenClaw 协作通信。
Best use case
cross-team-comm is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
通过 Tailscale、SSH、Gateway API 与 sessions_send 实现跨团队、跨实例的 OpenClaw 协作通信。
Teams using cross-team-comm should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cross-team-comm/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How cross-team-comm Compares
| Feature / Agent | cross-team-comm | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
通过 Tailscale、SSH、Gateway API 与 sessions_send 实现跨团队、跨实例的 OpenClaw 协作通信。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Cross-Team Communication Skill
- Author: Daniel Li
- Copyright © Daniel Li. All rights reserved.
OpenClaw 跨团队/跨实例通信技能。通过 Tailscale + SSH + Gateway API + sessions_send 实现不同 OpenClaw 实例之间的 Agent 协作。
## 触发词
跨团队通信、跨实例协作、远程 agent、连通其他团队、sessions_send 远程、Tailscale 通信、跨 Gateway
## 适用场景
- 连接另一个 OpenClaw 实例的 Agent 团队
- 跨团队派发任务 / 获取信息
- 通过飞书/Telegram 等渠道发送跨团队消息
- 远程管理其他实例的配置和 Agent
## 通信方式(优先级排序)
### 1. sessions_send(推荐 ✅)
最简单的方式,直接跨 Gateway 发消息给目标 Agent。
```
sessions_send(
sessionKey="agent:<agentId>:<channel>:group:<chatId>",
message="你的消息",
gatewayUrl="ws://<target-host>:<port>",
gatewayToken="<token>"
)
```
**示例**:
```
sessions_send(
sessionKey="agent:main:feishu:group:oc_45acc85cad802bf6cf21ed24e25465e9",
message="你好!我是小a,来自Daniel团队。",
gatewayUrl="ws://100.118.109.75:18789",
gatewayToken="$(pass show team/peter-gateway-token)"
)
```
**优点**:原生支持,Agent 可直接回复
**限制**:需要目标 Gateway 开放 Tailscale 或公网访问;loopback 绑定的需通过 SSH 中转
### 2. SSH + 本地 API(可靠 ✅)
当 Gateway 只绑定 loopback 时,先 SSH 到目标机器,再调用本地 API。
```bash
ssh user@<tailscale-ip>
curl -s -X POST "http://127.0.0.1:<port>/v1/sessions/send" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"sessionKey":"agent:main:...","message":"..."}'
```
### 3. 直接调用目标渠道 API(兜底)
当 sessions_send 和 SSH 都不方便时,直接用目标团队的渠道凭据发消息。
**飞书示例**:
```python
import requests, json
# 1. 获取 tenant_access_token
token_resp = requests.post(
"https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
json={"app_id": "<app_id>", "app_secret": "<app_secret>"}
)
token = token_resp.json()["tenant_access_token"]
# 2. 发送消息
requests.post(
"https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"receive_id": "<chat_id>",
"msg_type": "text",
"content": json.dumps({"text": "消息内容"})
}
)
```
## 首次连通 SOP
### Step 1: 网络连通
确保两台机器在同一 Tailscale 网络(或有 SSH 访问):
```bash
tailscale status # 查看在线设备
ssh user@<ip> # 测试连通
```
### Step 2: 收集目标信息
SSH 登录后收集:
```bash
openclaw --version
openclaw gateway status
cat ~/.openclaw/openclaw.json | grep -E "port|token|feishu|telegram|appId"
find ~/.openclaw/workspace* -name "SOUL.md" -o -name "IDENTITY.md"
ls ~/.openclaw/agents/
```
### Step 3: 测试通信
```
sessions_send(sessionKey="agent:main:...", message="连通测试")
```
### Step 4: 记录到 MEMORY.md
```markdown
### 目标团队名 (机器名)
| 项目 | 值 |
|------|------|
| 主机 | <hostname> (<tailscale-ip>) |
| Gateway | 端口 / Token |
| Agents | 列表 |
| 渠道 | 飞书群ID / Telegram群ID |
| 通信方式 | sessions_send / SSH / API |
```
## 注意事项
1. **Gateway bind**: 很多实例默认 `bind: loopback`,只能本地访问。要远程直连需改为 `bind: tailscale` 或 `0.0.0.0`
2. **Token 安全**: Gateway token 等同于完全控制权,仅存 `pass` 或 MEMORY.md,不要明文传输
3. **凭据存储**: 对方的飞书/Telegram 凭据用 `pass insert` 存储
4. **API 路径**: OpenClaw Gateway REST API 路径可能因版本不同而变化,优先用 sessions_send 工具
5. **消息格式**: 跨团队发消息时,说明来源("我是小a,来自Daniel团队"),避免对方 Agent 困惑Related Skills
Team Foreman — 团队监工巡查 Skill
> 每 15 分钟由 cron 调用。核心目标:**真实推进任务,不是写报告。**
team-daily-report
自动汇总团队内 agent、cron、skill 进展与关键事件,生成并推送结构化日报。
team-coordinator
团队协调与智能任务分配。作为高管,将用户任务拆解并分配给最合适的员工 agent 执行,协调多 agent 并行协作,汇总审核产出。
microsoft-teams-automation
Automate Microsoft Teams tasks via Rube MCP (Composio): send messages, manage channels, create meetings, handle chats, and search messages. Always search tools first for current schemas.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
ecommerce-competitor-analyzer
Multi-platform e-commerce competitor analysis skill that automatically scrapes product data from Amazon, Temu, Shopee and generates comprehensive analysis reports using AI. Use when you need to analyze competitor products, extract product insights, or batch analyze multiple product listings. Supports bulk processing with structured outputs including title, price, rating, reviews, and strategic analysis.
cross-platform-poster
Publish one piece of content across MoltX, Twitter/X, Discord, and Telegram with platform-specific formatting.
cross-instance-comm
Use when sending messages or tasks between multiple OpenClaw instances over Tailscale Gateway, such as asking another machine to execute work or sync context.
conventional-commits
Format commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.
commit-analyzer
Analyze git commit frequency, categories, and timing patterns to diagnose autonomous agent activity and operational health.
command-registry-integration
Integrate new chat commands into OpenClaw's formal command registry
agent-team-orchestration
Orchestrate multi-agent teams with defined roles, task lifecycles, handoff protocols, and review workflows. Use when: (1) Setting up a team of 2+ agents with different specializations, (2) Defining task routing and lifecycle (inbox → spec → build → review → done), (3) Creating handoff protocols between agents, (4) Establishing review and quality gates, (5) Managing async communication and artifact sharing between agents.