Introduction
As you install and develop more Skills, coordination between them becomes increasingly important. A single user request may require multiple Skills working in tandem — for example, "Check tomorrow's weather in Beijing, and if it's going to rain, remind me to bring an umbrella" requires both the weather query and reminder Skills to collaborate.
This tutorial dives deep into the mechanisms and best practices for multi-Skill coordination in OpenClaw.
How Multi-Skill Coordination Works
Skill Activation Flow
When OpenClaw receives a message, it goes through the following process:
User message
│
▼
┌──────────────────┐
│ Trigger Matching │ ← Check all Skills' trigger words
│ Phase │
└────────┬─────────┘
│
┌────▼────┐
│ Matches │
│ count? │
└────┬────┘
┌────┼────────────┐
│ │ │
0 1 Multiple
│ │ │
▼ ▼ ▼
No Activate Sort by
Skill that Skill priority &
use select highest
general or combine
chat
Single Activation vs. Multi-Activation Mode
OpenClaw supports two Skill activation modes:
{
skills: {
// Activation mode
activationMode: "single", // Default: only activate the highest-priority Skill
// activationMode: "multi", // Allow multiple Skills to activate simultaneously
}
}
| Mode | Description | Best For |
|---|---|---|
single |
Only activates the highest-priority matching Skill | Simple scenarios, avoiding conflicts |
multi |
Activates all matching Skills simultaneously | Complex scenarios requiring multi-Skill collaboration |
Priority Management
Setting Skill Priority
Each Skill can declare its priority in SKILL.md:
---
name: weather
priority: 20
triggers:
- 天气
- weather
---
Or manage priorities centrally in the global configuration:
{
skills: {
priority: {
"weather": 20,
"reminder": 15,
"translator": 10,
"rss-reader": 10,
"general-chat": 1 // General chat has the lowest priority
}
}
}
Priority Rules
- Higher values mean higher priority
- Default priority is 10
- Skills with the same priority are sorted alphabetically by filename
- Skills with priority 0 will not be automatically activated (they require explicit invocation)
Viewing Priority Order
openclaw skill list --verbose
Skills (by priority):
Priority Name Triggers Status
──────── ──── ──────── ──────
20 weather 天气,weather,气温 active
15 reminder 提醒,remind,闹钟 active
10 translator 翻译,translate active
10 rss-reader 订阅,新闻,rss active
1 general-chat (catch-all) active
Context Sharing
Passing Context Between Skills
In multi-activation mode, multiple Skills can share contextual information:
{
skills: {
activationMode: "multi",
context: {
// Allow Skills to share variables
sharedVariables: true,
// Shared variable lifetime (seconds)
variableTTL: 300
}
}
}
Practical Example: Weather + Reminder Collaboration
User says: "Check tomorrow's weather in Beijing, and if it rains, set a reminder for me to bring an umbrella"
Flow:
- The
weatherSkill is triggered and queries Beijing's weather for tomorrow - The weather result is stored in shared context
- The
reminderSkill reads the weather result and checks for rain - If rain is expected, it automatically creates the reminder
How to reference shared context in a Skill:
---
name: smart-reminder
priority: 14
triggers:
- 提醒
- 如果
- 要是
context_aware: true # Declares this Skill can read output from other Skills
---
# 智能提醒技能
## Behavior
当用户的请求包含条件性提醒时(如"如果...就提醒我..."):
1. 检查条件部分是否涉及其他 Skill 的数据(如天气、股票等)
2. 如果有,等待相关 Skill 执行完毕
3. 根据其他 Skill 的输出结果,判断是否需要创建提醒
4. 创建提醒或告知用户条件不满足
Workflow Orchestration
Chained Execution
Workflows let you define the execution order and data flow between Skills. Create a workflow configuration:
{
workflows: {
// Morning briefing workflow
"morning-briefing": {
trigger: "早安|晨报|早上好",
steps: [
{
skill: "weather",
input: "今天{userCity}天气",
outputVar: "todayWeather"
},
{
skill: "rss-reader",
input: "最新资讯摘要",
outputVar: "newsDigest"
},
{
skill: "reminder",
input: "今天有什么提醒",
outputVar: "todayReminders"
}
],
// Final output template
output: {
template: "morning-briefing",
combine: "sequential"
}
}
}
}
Defining Output Templates
Create a workflow template morning-briefing.SKILL.md in ~/.openclaw/skills/:
---
name: morning-briefing
priority: 0
triggers: []
type: workflow-template
---
# 晨间简报模板
## Output Format
将以下信息整合为一份简洁的晨间简报:
☀️ 早安!今日简报
━━ 天气 ━━ {todayWeather}
━━ 新闻 ━━ {newsDigest}
━━ 待办 ━━ {todayReminders}
祝你今天一切顺利!
注意:整合时保持简洁,每个部分不超过5行。
Parallel Execution
Workflow steps execute sequentially by default, but independent steps can run in parallel:
{
workflows: {
"morning-briefing": {
trigger: "早安|晨报",
steps: [
// These three steps are independent and can run in parallel
{
skill: "weather",
input: "今天天气",
parallel: true // Marked as parallelizable
},
{
skill: "rss-reader",
input: "最新资讯",
parallel: true
},
{
skill: "reminder",
input: "今天待办",
parallel: true
}
],
output: {
template: "morning-briefing",
combine: "sequential"
}
}
}
}
Conditional Activation
Context-Based Conditional Activation
Some Skills should only activate under specific conditions:
---
name: clothing-advisor
priority: 8
triggers:
- 穿什么
- 穿衣
conditions:
# Only activates when the weather Skill is also activated
requires: ["weather"]
---
# 穿衣建议技能
## Behavior
根据 weather Skill 返回的天气数据,给出穿衣建议:
- 温度 > 30°C:轻薄短袖、短裤
- 温度 20-30°C:长袖衬衫或薄外套
- 温度 10-20°C:毛衣或厚外套
- 温度 0-10°C:厚外套、围巾
- 温度 < 0°C:羽绒服、手套、帽子
同时考虑降雨(带伞)和大风(防风外套)等因素。
Channel-Based Conditional Activation
---
name: code-review
priority: 15
triggers:
- review
- 代码审查
channels:
# Only activate in Slack and Discord
allow: ["slack", "discord"]
# Don't activate in WhatsApp
deny: ["whatsapp"]
---
Time-Based Conditional Activation
---
name: good-morning
priority: 5
triggers:
- 早上好
- 早安
conditions:
timeRange: "06:00-11:00" # Only activate between 6 AM and 11 AM
---
Conflict Resolution
Trigger Word Conflicts
When multiple Skills have overlapping trigger words:
Skill A: triggers: ["查询", "搜索"]
Skill B: triggers: ["查询", "数据"]
If the user says "查询天气", both Skills will match. Solutions:
Option 1: Differentiate by Priority
{
skills: {
priority: {
"skill-a": 20, // Higher priority
"skill-b": 10
}
}
}
Option 2: Use More Precise Trigger Words
# Skill A - Switch to more precise trigger words
triggers:
- 查询天气
- 搜索天气
# Skill B - Switch to more precise trigger words
triggers:
- 查询数据
- 数据搜索
Option 3: Use Exclusion Declarations
---
name: skill-a
excludes: ["skill-b"] # When skill-a is activated, exclude skill-b
---
Output Conflicts
When multiple Skills are activated simultaneously and all produce output:
{
skills: {
activationMode: "multi",
outputCombine: "merge", // Merge all outputs
// outputCombine: "first", // Only take the first Skill's output
// outputCombine: "last", // Only take the last Skill's output
outputSeparator: "\n\n---\n\n" // Separator between outputs
}
}
Hands-On: Building a Smart Daily Report Workflow
Here's a complete practical example — building a daily report that's automatically pushed every day.
Workflow Configuration
{
workflows: {
"daily-report": {
// Manual trigger
trigger: "日报|daily report",
// Or scheduled trigger (daily at 18:00)
schedule: "0 18 * * *",
steps: [
{
skill: "rss-reader",
input: "今天的重要新闻",
outputVar: "news",
parallel: true
},
{
skill: "github-notify",
input: "今天的PR和Issue更新",
outputVar: "github",
parallel: true
},
{
skill: "reminder",
input: "明天的待办事项",
outputVar: "todos",
parallel: true
}
],
output: {
template: "daily-report-template",
pushTo: ["slack", "telegram"]
}
}
}
}
Workflow Template
Create ~/.openclaw/skills/daily-report-template.SKILL.md:
---
name: daily-report-template
type: workflow-template
---
# 日报模板
## Output Format
📊 今日工作日报
━━ 行业动态 ━━ {news}
━━ 项目进展 ━━ {github}
━━ 明日计划 ━━ {todos}
━━━━━━━━━━━━ 由 OpenClaw 自动生成
要求:
- 新闻部分精选最重要的3-5条
- GitHub 部分只列出关键变更
- 待办部分按优先级排序
- 整体保持简洁,不超过500字
Debugging Workflows
# View workflow configuration
openclaw workflow list
# Manually trigger a workflow (skip scheduled dispatch)
openclaw workflow run daily-report
# View workflow execution logs
openclaw logs --filter workflow
Best Practices
- Keep each Skill single-purpose: Each Skill should do one thing well — combine them via workflows
- Set priorities thoughtfully: Frequently used Skills get higher priority; general-purpose Skills get lower priority
- Be precise with trigger words: Avoid overly generic trigger words that cause false activations
- Leverage conditional activation: Reduce unnecessary Skill loading
- Test combined scenarios: Thoroughly test edge cases when multiple Skills collaborate
- Monitor token consumption: Activating multiple Skills simultaneously increases token usage
Summary
Multi-Skill coordination and workflow orchestration are essential advanced capabilities in OpenClaw. Through thoughtful priority management, context sharing, conditional activation, and workflow orchestration, you can build powerful automated AI assistants. The key principle is keeping each Skill simple and independent, then achieving complex functionality through composition.