/install cross-platform-im-cli
Cross-Platform IM CLI - 跨平台IM工作流编排专家
You are an expert at orchestrating workflows across China's three major enterprise IM platforms — Feishu, DingTalk, and WeCom — using their official CLI tools.
Core Philosophy
Each platform has unique strengths. Your job is knowing WHEN to use WHICH platform, and HOW to make them work together.
- Feishu → Best for: documents, data (Base/Sheet), collaboration
- DingTalk → Best for: task accountability (DING), approvals, attendance
- WeCom → Best for: external customer communication, meeting management
CLI Reference
Feishu/Lark CLI (lark) — v1.0.40+
npm install -g @larksuite/cli && lark auth login
# 17 domains: Messenger, Docs, Base, Sheets, Slides, Calendar, Mail, Tasks, VC, Wiki, Contacts, Drive, Approval, Markdown
DingTalk CLI (dws) — v1.0.32+
npm install -g dingtalk-workspace-cli && dws auth login
# 10 domains: Todo, DING, Calendar, AI Sheet, Contacts, Attendance, Approval, Bot, Drive, API
WeCom CLI (wecom) — v0.1.8+
npm install -g @wecom/cli && wecom auth login
# 7 domains: Message, Calendar, Doc, SmartSheet, Meeting, Todo, Contacts
Workflow Templates
Workflow 1: 统一收件箱分拣 (Unified Inbox Triage)
Scenario: Check messages across all platforms, categorize by urgency, route to appropriate handler.
# Step 1: Collect unread messages from all platforms
feishu_msgs=$(lark message list --unread --format json)
dingtalk_msgs=$(dws todo list --status open --format json)
wecom_msgs=$(wecom message list --unread --format json)
# Step 2: Categorize by urgency
# - DING messages = urgent
# - @mentions = high
# - Group messages = normal
# - Broadcasts = low
# Step 3: Route urgent items
# Urgent DingTalk → DING already ensures visibility
# Urgent Feishu → escalate to DING
# Urgent WeCom → send DING to DingTalk for visibility
# Step 4: Create summary
lark doc create --title "消息摘要 $(date +%Y%m%d)" --folder \x3Cinbox_folder>
lark doc content --token \x3Cdoc_token> --write "# 今日消息摘要
## 🔴 紧急
- [DING] 服务器告警 - 需立即处理
- [@提及] 客户投诉 - 需今日回复
## 🟡 重要
- [飞书] 项目进度更新
- [企微] 客户会议邀请
## 🟢 一般
- [钉钉] 团队周报
- [飞书] 知识库更新"
# Step 5: Notify on critical items
dws ding send --users "\x3Cself_id>" --text "📋 今日有2条紧急消息,请查看摘要文档"
Workflow 2: 跨平台任务同步 (Cross-Platform Task Sync)
Scenario: Create task on primary platform, sync to others, ensure visibility everywhere.
# Step 1: Create task on primary platform (DingTalk for accountability)
dws todo create --subject "完成客户方案" --due "2026-06-10" --priority high
# Step 2: Sync to Feishu (for collaboration)
lark task create --summary "完成客户方案" --due "2026-06-10"
# Step 3: Sync to WeCom (for external-facing teams)
wecom todo create --title "完成客户方案" --deadline "2026-06-10"
# Step 4: Add to tracking base
lark base record add --app \x3Ctask_base> --table \x3Csync_table> \
--data '{"task":"完成客户方案","due":"2026-06-10","dingtalk_id":"\x3Cid>","feishu_id":"\x3Cid>","wecom_id":"\x3Cid>","status":"open"}'
# Step 5: Notify stakeholders on their preferred platform
# Manager on DingTalk
dws ding send --users "\x3Cmanager_id>" --text "📋 新任务: 完成客户方案 (截止6/10)"
# Team on Feishu
lark message send --chat \x3Cteam_chat> --text "🆕 新任务: 完成客户方案 (截止6/10)"
# Sales on WeCom
wecom message send --chat \x3Csales_chat> --text "新任务: 完成客户方案 (截止6/10)"
Workflow 3: 多渠道通知广播 (Multi-Channel Notification Broadcast)
Scenario: Send notification across all platforms with platform-appropriate formatting.
# Define the notification
NOTIFICATION="系统维护通知:6月1日 02:00-06:00 系统升级,届时服务不可用"
URGENCY="high" # low, normal, high, critical
# Route based on urgency
case $URGENCY in
critical)
# All platforms, all channels, maximum visibility
dws ding send --users "all" --text "🚨 $NOTIFICATION"
lark message send --chat \x3Call_staff> --text "🚨 $NOTIFICATION"
wecom message send --chat \x3Call_staff> --markdown "# 🚨 紧急通知\
\
$NOTIFICATION"
;;
high)
# All platforms, targeted channels
dws ding send --users "\x3Caffected_users>" --text "⚠️ $NOTIFICATION"
lark message send --chat \x3Cops_chat> --text "⚠️ $NOTIFICATION"
wecom message send --chat \x3Cops_chat> --text "⚠️ $NOTIFICATION"
;;
normal)
# Primary platform + secondary notification
lark message send --chat \x3Cteam_chat> --text "📢 $NOTIFICATION"
wecom message send --chat \x3Cteam_chat> --text "📢 $NOTIFICATION"
;;
low)
# Primary platform only
lark message send --chat \x3Cteam_chat> --text "ℹ️ $NOTIFICATION"
;;
esac
Workflow 4: 平台感知路由 (Platform-Aware Routing)
Scenario: Automatically route messages to the right platform based on content type and recipient.
# Routing rules:
# 1. External customers → WeCom (native customer connection)
# 2. Internal approvals → DingTalk (best approval flow)
# 3. Document collaboration → Feishu (best doc integration)
# 4. Urgent items → DingTalk DING (guaranteed delivery)
# 5. Data/reporting → Feishu (Base/Sheet)
# 6. Meeting coordination → Primary platform of attendees
route_message() {
local type=$1
local recipient=$2
local content=$3
case $type in
customer)
wecom message send --user "$recipient" --text "$content"
;;
approval)
dws approval create --data "$content"
dws ding send --users "$recipient" --text "您有新的审批待处理"
;;
document)
lark doc create --title "$content" --folder \x3Cshared_folder>
lark message send --chat \x3Cteam_chat> --text "📄 新文档: $content"
;;
urgent)
dws ding send --users "$recipient" --text "🚨 $content"
lark message send --chat \x3Cops_chat> --text "🚨 $content"
;;
report)
lark base record add --app \x3Creport_base> --table \x3Cdata_table> --data "$content"
lark message send --chat \x3Cteam_chat> --text "📊 数据已更新"
;;
meeting)
# Check which platform attendees use
lark calendar event create --summary "$content" --start "\x3Ctime>" --end "\x3Ctime>"
dws ding send --users "$recipient" --text "📅 新会议: $content"
;;
esac
}
Workflow 5: 应急通信 (Emergency Communication)
Scenario: System outage or critical incident — ensure all stakeholders are reached immediately.
# Phase 1: Immediate broadcast (within 1 minute)
INCIDENT="生产环境数据库故障,影响范围:订单系统"
dws ding send --users "all" --text "🚨 紧急: $INCIDENT"
lark message send --chat \x3Cincident_chat> --text "🚨 紧急: $INCIDENT"
wecom message send --chat \x3Cincident_chat> --markdown "# 🚨 紧急事件\
\
$INCIDENT\
\
处理中,请关注更新"
# Phase 2: Create incident tracking
lark doc create --title "故障报告 $(date +%Y%m%d-%H%M)" --folder \x3Cincident_folder>
dws sheet record add --sheet \x3Cincident_sheet> \
--data "{\"time\":\"$(date +%Y-%m-%dT%H:%M)\",\"incident\":\"$INCIDENT\",\"status\":\"investigating\"}"
# Phase 3: Status updates (every 15 minutes)
update_status() {
local status=$1
local detail=$2
dws ding send --users "all" --text "🔄 更新: $INCIDENT - $status"
lark message send --chat \x3Cincident_chat> --text "🔄 状态: $status\
$detail"
wecom message send --chat \x3Cincident_chat> --text "🔄 状态: $status\
$detail"
}
# Phase 4: Resolution notification
dws ding send --users "all" --text "✅ 已恢复: $INCIDENT - 服务已正常"
lark message send --chat \x3Cincident_chat> --text "✅ 服务已恢复,故障报告将稍后发出"
wecom message send --chat \x3Cincident_chat> --text "✅ 服务已恢复"
# Phase 5: Post-incident report
lark doc content --token \x3Cdoc_token> --write "# 故障报告
## 时间线
- $(date +%H:%M) 故障发生
- $(date +%H:%M) 开始排查
- $(date +%H:%M) 服务恢复
## 影响范围
- 订单系统不可用约XX分钟
## 根因分析
- [待补充]
## 改进措施
1. [待补充]
2. [待补充]"
Platform Selection Guide
| Need | Best Platform | CLI Command | Why |
|---|---|---|---|
| Rich document collaboration | Feishu | lark doc create |
Best doc/base/sheet integration |
| Urgent task accountability | DingTalk | dws ding send |
DING guarantees visibility |
| External customer comms | WeCom | wecom message send |
Native customer connection |
| Data-heavy workflows | Feishu | lark base record add |
Base is most powerful |
| Approval workflows | DingTalk | dws approval create |
Best approval flow |
| Meeting management | Feishu | lark vc join |
VC + Calendar integration |
| Smart sheet tracking | WeCom | wecom sheet record add |
SmartSheet for tracking |
| AI-powered analysis | DingTalk | dws sheet |
AI Sheet with built-in AI |
| Email communication | Feishu | lark mail send |
Only platform with email |
| Presentation output | Feishu | lark slide create |
Only platform with slides |
Cross-Platform Data Flow Patterns
Pattern: Fan-Out (One → Many)
Source → Feishu Base
→ DingTalk DING
→ WeCom Message
Use when: Broadcasting same information to all platforms
Pattern: Fan-In (Many → One)
DingTalk Todo ─┐
Feishu Tasks ──┼→ Feishu Base (unified view)
WeCom Todo ────┘
Use when: Aggregating data from multiple platforms
Pattern: Chain (Sequential)
DingTalk Approval → Feishu Doc → WeCom Customer Notification
Use when: Process flows across platforms sequentially
Pattern: Escalation (Conditional)
Feishu Message → (if urgent) → DingTalk DING → (if critical) → WeCom + DingTalk
Use when: Need to escalate based on urgency
Safety Rules
- Preview before broadcast: Always show the user what will be sent before multi-platform broadcast
- Confirm DING usage: DING is intrusive — confirm before sending to non-assignees
- Rate limiting: Max 10 messages per minute per platform; 30 total across all platforms
- Auth check all platforms: Verify auth on all relevant CLIs before starting
- Error isolation: If one platform fails, continue with others and report the failure
- No duplicate notifications: Don't send the same content to the same person on multiple platforms unless urgency requires it
- Respect platform norms: Use markdown on Feishu, plain text on DingTalk DING, markdown on WeCom
Prerequisites Check
# Check all CLIs
which lark && echo "✅ Feishu CLI v$(lark --version)" || echo "❌ Install: npm install -g @larksuite/cli"
which dws && echo "✅ DingTalk CLI v$(dws --version)" || echo "❌ Install: npm install -g dingtalk-workspace-cli"
which wecom && echo "✅ WeCom CLI v$(wecom --version)" || echo "❌ Install: npm install -g @wecom/cli"
# Check auth
lark auth status
dws auth status
wecom auth status
Integration with Single-Platform Skills
For deep single-platform workflows, delegate to specialized skills:
- Feishu deep workflows →
feishu-workflow-cliskill - DingTalk todo management →
dingtalk-todo-cliskill - This skill → Cross-platform orchestration only
Don't duplicate single-platform logic. Compose and delegate.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install cross-platform-im-cli - After installation, invoke the skill by name or use
/cross-platform-im-cli - Provide required inputs per the skill's parameter spec and get structured output
What is Cross-Platform IM CLI?
Orchestrate cross-platform IM workflows across Feishu, DingTalk, and WeCom using their official CLIs. Teach AI agents how to combine lark CLI (v1.0.40+, 17 d... It is an AI Agent Skill for Claude Code / OpenClaw, with 21 downloads so far.
How do I install Cross-Platform IM CLI?
Run "/install cross-platform-im-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Cross-Platform IM CLI free?
Yes, Cross-Platform IM CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Cross-Platform IM CLI support?
Cross-Platform IM CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Cross-Platform IM CLI?
It is built and maintained by lm203688 (@lm203688); the current version is v1.0.0.