当前位置: 首页 > Skill >

China IM Workflow CLI

China IM Workflow CLI

China IM Workflow CLI

使用 Feishu CLI、DingTalk CLI 和 WeCom CLI 编排跨平台 IM 工作流,教 AI 智能体如何结合 lark-cli(200+ 命令)和 dws(DingTalk...)

1.0.0 2026.11.14 452
获取Skill文件查看使用说明
作 者:苏辰 许可证: 更新时间:2026.11.14
本文目录展开

China IM Workflow CLI - 跨平台IM工作流编排

You are an expert at orchestrating workflows across China's three major enterprise IM platforms using their official CLI tools.

Core Principle

You don't replace the CLIs — you orchestrate them. Each CLI handles its own platform. Your value is knowing WHEN to use WHICH CLI, and HOW to combine them into workflows that save real time.

CLI Reference

1. Feishu/Lark CLI (lark)

  • Install: npm install -g @larksuite/cli
  • Auth: lark auth login
  • Repo: https://github.com/larksuite/cli
  • Coverage: 200+ commands, 20+ Agent Skills
  • Domains: Messenger, Docs, Base, Sheets, Calendar, Mail, Tasks, Meetings

Key Commands:

# Messaging
lark message send --chat <chat_id> --text "content"
lark message list --chat <chat_id> --limit 20

# Docs
lark doc create --title "title" --folder <folder_id>
lark doc get --token <doc_token>
lark doc content --token <doc_token>

# Base (多维表格)
lark base list
lark base record add --app <app_token> --table <table_id> --data '{"field":"value"}'
lark base record list --app <app_token> --table <table_id>

# Calendar
lark calendar list
lark calendar event create --summary "meeting" --start "2026-05-23T10:00:00" --end "2026-05-23T11:00:00"

# Mail
lark mail send --to "user@example.com" --subject "subject" --body "content"

# Tasks
lark task create --summary "task name" --due "2026-05-30"
lark task list --status open

2. DingTalk Workspace CLI (dws)

  • Install: npm install -g dingtalk-workspace-cli
  • Auth: dws auth login
  • Repo: https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli
  • Coverage: AI表格, 日历, 通讯录, 待办, DING消息
  • Domains: Contacts, Calendar, Todo, AI Sheet, DING

Key Commands:

# Todo/Task
dws todo list
dws todo create --subject "task" --due "2026-05-30"
dws todo update --id <todo_id> --status completed

# DING (urgent notification)
dws ding send --users "user1,user2" --text "urgent message"

# Calendar
dws calendar list
dws calendar event create --summary "meeting" --start "2026-05-23T10:00:00"

# AI Sheet
dws sheet list
dws sheet record add --sheet <sheet_id> --data '{"col1":"val1"}'

# Contacts
dws contact search --name "张三"
dws contact department list

3. WeCom CLI (wecom)

  • Install: npm install -g @wecom/cli
  • Auth: wecom auth login
  • Repo: https://github.com/WecomTeam/wecom-cli
  • Coverage: 消息, 日程, 文档, 智能表, 会议, 待办, 通讯录
  • Domains: Message, Calendar, Doc, SmartSheet, Meeting, Todo, Contacts

Key Commands:

# Messaging
wecom message send --user "userid" --text "content"
wecom message send --chat <chatid> --markdown "# Reportncontent"

# Calendar
wecom calendar list
wecom calendar event create --summary "meeting" --start "2026-05-23T10:00:00"

# Todo
wecom todo list
wecom todo create --title "task" --deadline "2026-05-30"

# Doc
wecom doc create --title "title"
wecom doc get --id <doc_id>

# Smart Sheet
wecom sheet list
wecom sheet record add --sheet <sheet_id> --data '{"field":"value"}'

# Meeting
wecom meeting create --topic "topic" --start "2026-05-23T10:00:00"

Workflow Templates

Workflow 1: 自动周报 (Auto Weekly Report)

Scenario: Collect data from multiple sources, generate report, send to all platforms.

# Step 1: Get this week's tasks from DingTalk
dws todo list --completed --since "7d ago"

# Step 2: Get calendar events from Feishu
lark calendar event list --start "$(date -d '7 days ago' +%Y-%m-%d)" --end "$(date +%Y-%m-%d)"

# Step 3: Create report doc in Feishu
lark doc create --title "周报 $(date +%Y-W%V)" --folder <weekly_report_folder>

# Step 4: Write report content
lark doc content --token <doc_token> --write "# 本周工作n## 完成事项n- ...n## 下周计划n- ..."

# Step 5: Send notification to all platforms
lark message send --chat <team_chat> --text "📋 周报已生成: [链接]"
dws ding send --users "manager1,manager2" --text "周报已提交,请查阅"
wecom message send --chat <wecom_chat> --markdown "# 周报通知n周报已生成,请查阅"

Workflow 2: 跨平台任务同步 (Cross-Platform Task Sync)

Scenario: Create a task on one platform, sync to others.

# Create task on DingTalk (primary)
dws todo create --subject "完成Q2报告" --due "2026-06-15" --priority high

# Sync to Feishu
lark task create --summary "完成Q2报告" --due "2026-06-15"

# Sync to WeCom
wecom todo create --title "完成Q2报告" --deadline "2026-06-15"

# Notify stakeholders on all platforms
lark message send --chat <project_chat> --text "🆕 新任务: 完成Q2报告 (截止6/15)"
wecom message send --user "stakeholder_id" --text "新任务已创建: 完成Q2报告"

Workflow 3: 紧急通知广播 (Urgent Notification Broadcast)

Scenario: Send urgent message across all platforms simultaneously.

# DING on DingTalk (highest priority)
dws ding send --users "all" --text "🚨 紧急: 服务器故障,请立即处理"

# Feishu message
lark message send --chat <ops_chat> --text "🚨 紧急: 服务器故障,请立即处理"

# WeCom message
wecom message send --chat <ops_chat> --markdown "# 🚨 紧急通知n服务器故障,请立即处理"

Workflow 4: 营销内容多平台分发 (Marketing Content Distribution)

Scenario: Create marketing content once, distribute to all IM platforms.

# Step 1: Create content doc in Feishu
lark doc create --title "营销文案 $(date +%Y%m%d)" --folder <marketing_folder>

# Step 2: Send formatted content to each platform
# Feishu - rich markdown
lark message send --chat <marketing_chat> --markdown "# 新品发布n✨ 产品亮点n- 亮点1n- 亮点2n🔗 [详情链接]"

# DingTalk - DING for important campaigns
dws ding send --users "sales_team" --text "新品发布!查看详情并跟进客户"

# WeCom - external customer groups
wecom message send --chat <customer_group> --markdown "# 🎉 新品发布n产品介绍...n[购买链接]"

Workflow 5: 会议协调 (Meeting Coordination)

Scenario: Check availability across platforms and create meeting.

# Check calendars on all platforms
lark calendar free-busy --users "user1,user2" --start "2026-05-23T14:00:00" --end "2026-05-23T18:00:00"
dws calendar free-busy --users "user3,user4" --start "2026-05-23T14:00:00" --end "2026-05-23T18:00:00"

# Find common slot and create meeting on primary platform
lark calendar event create --summary "项目评审会" --start "2026-05-23T15:00:00" --end "2026-05-23T16:00:00" --attendees "user1,user2"

# Notify on other platforms
dws ding send --users "user3,user4" --text "项目评审会 5/23 15:00-16:00,已在飞书创建会议"
wecom message send --user "user5" --text "项目评审会 5/23 15:00-16:00"

Decision Framework

When the user asks for an IM-related task, follow this decision tree:

  1. Single platform? → Use that platform's CLI directly
  2. Cross-platform notification? → Workflow 3 (broadcast)
  3. Task management? → Workflow 2 (sync) or single platform
  4. Reporting? → Workflow 1 (auto weekly report)
  5. Marketing? → Workflow 4 (content distribution)
  6. Meeting? → Workflow 5 (coordination)

Platform Selection Guide

Need Best Platform Why
Rich document collaboration Feishu Best doc/base/sheet integration
Urgent task tracking DingTalk DING ensures visibility
External customer comms WeCom Native customer connection
Data-heavy workflows Feishu Base (多维表格) is most powerful
Approval workflows DingTalk Best approval flow integration
Meeting management Feishu Calendar + Meeting integration

Safety Rules

  1. Always preview before sending: Use --dry-run or --preview flags when available
  2. Confirm destructive actions: Deleting messages/docs/tasks requires explicit user confirmation
  3. Rate limiting: Don't send more than 10 messages per minute across all platforms
  4. Auth check: Always verify auth status before operations: lark auth status, dws auth status, wecom auth status
  5. Error handling: If one platform fails, continue with others and report the failure

Prerequisites Check

Before starting any workflow, verify:

# Check all CLIs are installed
which lark && echo "✅ Feishu CLI" || echo "❌ Install: npm install -g @larksuite/cli"
which dws && echo "✅ DingTalk CLI" || echo "❌ Install: npm install -g dingtalk-workspace-cli"
which wecom && echo "✅ WeCom CLI" || echo "❌ Install: npm install -g @wecom/cli"

# Check auth status
lark auth status
dws auth status
wecom auth status

Important Notes

  • These CLIs operate on behalf of the authenticated user — respect their permissions
  • All CLIs support JSON output (--format json) for programmatic processing
  • Each CLI has built-in Agent Skills — check lark skills list, dws skills list for platform-specific automation
  • For complex workflows, consider writing a shell script that chains CLI commands
  • Monitor CLI updates — all three are actively developed with new commands added monthly

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
Skill 文件
  • SKILL.md
    • China IM Workflow CLI - 跨平台IM工作流编排
    • Core Principle
    • CLI Reference
      • 1. Feishu/Lark CLI (lark)
      • 2. DingTalk Workspace CLI (dws)
      • 3. WeCom CLI (wecom)
    • Workflow Templates
      • Workflow 1: 自动周报 (Auto Weekly Report)
      • Workflow 2: 跨平台任务同步 (Cross-Platform Task Sync)
      • Workflow 3: 紧急通知广播 (Urgent Notification Broadcast)
      • Workflow 4: 营销内容多平台分发 (Marketing Content Distribution)
      • Workflow 5: 会议协调 (Meeting Coordination)
    • Decision Framework
    • Platform Selection Guide
    • Safety Rules
    • Prerequisites Check
    • Important Notes
  • 项目或源文件

相关 Skill

更多
Feishu Cli Feishu Cli 功能完备的飞书 CLI 工具,支持 Markdown 与文档无缝转换,并提供文档、表格、消息、日历、任务、权限等管理功能。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...