awesome-openclaw-tutorial

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

awesome-openclaw-tutorial

OpenClaw 优质教程集合

Skill by ara.so — Hermes Skills collection.
Complete Chinese tutorial for OpenClaw - an AI-powered work assistant. Covers installation, configuration, Skills ecosystem, automation workflows, API integration, and practical use cases for solo entrepreneurs and teams.
ara.so 开发的 Skill — Hermes Skills 集合。
OpenClaw 是一款AI驱动的工作助手,本教程为其中文完整指南,涵盖安装配置、Skills生态系统、自动化工作流、API集成,以及面向个体创业者和团队的实战案例。

What is OpenClaw?

什么是 OpenClaw?

OpenClaw is an AI assistant framework that runs locally or in cloud, providing:
  • File management, knowledge base, and scheduling automation
  • 1800+ Skills for extending capabilities
  • Multi-platform integration (Feishu, Slack, WeChat, DingTalk, QQ)
  • Task automation with cron, Task Flow, and webhooks
  • Media generation (images, video, audio, TTS) via
    openclaw infer
  • Active Memory and Memory Wiki for context retention
Current stable version: v2026.4.14
Recommended runtime: Node 24 (minimum Node 22.16+)
OpenClaw 是一款可本地或云端运行的AI助手框架,具备以下功能:
  • 文件管理、知识库与日程自动化
  • 1800+ 个可扩展功能的 Skills
  • 多平台集成(飞书、Slack、微信、钉钉、QQ)
  • 基于 cron、Task Flow 和 webhooks 的任务自动化
  • 通过
    openclaw infer
    实现媒体生成(图片、视频、音频、TTS)
  • 用于上下文留存的 Active Memory 和 Memory Wiki
当前稳定版本:v2026.4.14
推荐运行环境:Node 24(最低要求 Node 22.16+)

Quick Installation

快速安装

Method 1: One-Click Deployment (Recommended for Beginners)

方法一:一键部署(推荐新手使用)

Feishu Miaoda (Free, 1M tokens/day):
bash
undefined
飞书秒搭(免费,每日100万token额度):
bash
undefined

Click "Feishu Miaoda" deployment

Click "Feishu Miaoda" deployment

Complete in 1 minute, no server needed

Complete in 1 minute, no server needed


**Baota Panel** (Free plugin, visual management):
```bash

**宝塔面板**(免费插件,可视化管理):
```bash

Install Baota Panel first

Install Baota Panel first

Add "OpenClaw" plugin from marketplace

Add "OpenClaw" plugin from marketplace

One-click install and configure

One-click install and configure

undefined
undefined

Method 2: Standard Installation

方法二:标准安装

bash
undefined
bash
undefined

Install via npm (Node 22.16+ required)

Install via npm (Node 22.16+ required)

npm install -g openclaw
npm install -g openclaw

Or via yarn

Or via yarn

yarn global add openclaw
yarn global add openclaw

Initialize and onboard

Initialize and onboard

openclaw onboard
openclaw onboard

Start gateway

Start gateway

openclaw gateway start
undefined
openclaw gateway start
undefined

Method 3: Docker

方法三:Docker部署

bash
undefined
bash
undefined

Pull latest image

Pull latest image

docker pull openclaw/openclaw:latest
docker pull openclaw/openclaw:latest

Run with environment variables

Run with environment variables

docker run -d
-e OPENCLAW_TZ=Asia/Shanghai
-e OPENCLAW_API_KEY=$OPENCLAW_API_KEY
-p 3000:3000
-v ~/.openclaw:/root/.openclaw
openclaw/openclaw:latest
docker run -d
-e OPENCLAW_TZ=Asia/Shanghai
-e OPENCLAW_API_KEY=$OPENCLAW_API_KEY
-p 3000:3000
-v ~/.openclaw:/root/.openclaw
openclaw/openclaw:latest

Check status

Check status

docker ps
undefined
docker ps
undefined

Configuration

配置

Model Authentication (2026.4+ Standard)

模型认证(2026.4+ 标准方式)

bash
undefined
bash
undefined

Login to model providers (replaces old local-* skills)

登录模型提供商(替代旧版 local-* skills)

openclaw models auth login --provider anthropic openclaw models auth login --provider openai openclaw models auth login --provider gemini
openclaw models auth login --provider anthropic openclaw models auth login --provider openai openclaw models auth login --provider gemini

List authenticated providers

列出已认证的提供商

openclaw models auth list
openclaw models auth list

Set default model

设置默认模型

openclaw config set model.default "claude-3-5-sonnet-20241022"
openclaw config set model.default "claude-3-5-sonnet-20241022"

Enable fast mode (cheaper, faster for OpenAI/Anthropic)

启用快速模式(OpenAI/Anthropic 更便宜、更快)

User says: /fast

用户输入:/fast

undefined
undefined

Gateway Authentication (Required since v2026.3.7)

网关认证(v2026.3.7 起必填)

bash
undefined
bash
undefined

Set authentication mode (token or password)

设置认证模式(token 或密码)

openclaw config set gateway.auth.mode token openclaw config set gateway.auth.token "${OPENCLAW_GATEWAY_TOKEN}"
openclaw config set gateway.auth.mode token openclaw config set gateway.auth.token "${OPENCLAW_GATEWAY_TOKEN}"

Restart gateway

重启网关

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Tools Profile (Fix "AI can't do anything" issue)

工具配置文件(解决「AI无法执行操作」问题)

bash
undefined
bash
undefined

Set to 'full' for complete toolset including command execution

设置为 'full' 以启用包含命令执行的完整工具集

openclaw config set tools.profile full
openclaw config set tools.profile full

Profile options:

配置文件选项:

- messaging: only chat and session management

- messaging:仅聊天和会话管理

- default: standard tools (no command exec)

- default:标准工具(无命令执行)

- coding: programming tools

- coding:编程工具

- full: complete toolset (RECOMMENDED)

- full:完整工具集(推荐)

- all: everything enabled

- all:启用全部功能

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Active Memory and Memory Wiki (2026.4+ Mainline)

Active Memory 与 Memory Wiki(2026.4+ 主线功能)

bash
undefined
bash
undefined

Enable Active Memory (retrieves context before replies)

启用 Active Memory(回复前检索上下文)

openclaw config set memory.active.enabled true
openclaw config set memory.active.enabled true

Enable Dreaming (background memory consolidation)

启用 Dreaming(后台记忆整合)

openclaw config set memory.dreaming.enabled true
openclaw config set memory.dreaming.enabled true

Enable Memory Wiki (structured knowledge claims)

启用 Memory Wiki(结构化知识声明)

openclaw config set memory.wiki.enabled true
openclaw config set memory.wiki.enabled true

Configure memory retention

配置记忆留存时长

openclaw config set memory.retention.days 90
undefined
openclaw config set memory.retention.days 90
undefined

Key Commands

核心命令

Core CLI

核心CLI命令

bash
undefined
bash
undefined

Check version

查看版本

openclaw --version
openclaw --version

Show current config

显示当前配置

openclaw config list
openclaw config list

Set config value

设置配置值

openclaw config set <key> <value>
openclaw config set <key> <value>

Gateway control

网关控制

openclaw gateway start openclaw gateway stop openclaw gateway restart openclaw gateway status
openclaw gateway start openclaw gateway stop openclaw gateway restart openclaw gateway status

Model inference (unified interface)

模型推理(统一接口)

openclaw infer text "Explain quantum computing" openclaw infer image "A red panda in space" --model dall-e-3 openclaw infer video "Ocean waves" --provider runway openclaw infer audio "Calm piano music" --provider suno openclaw infer tts "Hello world" --voice nova openclaw infer web "https://example.com" openclaw infer embedding "Document text to embed"
openclaw infer text "Explain quantum computing" openclaw infer image "A red panda in space" --model dall-e-3 openclaw infer video "Ocean waves" --provider runway openclaw infer audio "Calm piano music" --provider suno openclaw infer tts "Hello world" --voice nova openclaw infer web "https://example.com" openclaw infer embedding "Document text to embed"

Skills management (DEPRECATED in 2026.4+, use models auth instead)

Skills 管理(2026.4+ 已废弃,使用 models auth 替代)

clawhub search <query>

clawhub search <query>

clawhub info <skill-name>

clawhub info <skill-name>

clawhub install <skill-name>

clawhub install <skill-name>

undefined
undefined

Task Automation

任务自动化

bash
undefined
bash
undefined

Create cron task (scheduled)

创建定时任务(基于 cron)

openclaw tasks create
--name "daily-summary"
--schedule "0 18 * * *"
--command "Generate daily summary and send to Feishu"
openclaw tasks create
--name "daily-summary"
--schedule "0 18 * * *"
--command "Generate daily summary and send to Feishu"

Create Task Flow (persistent workflow)

创建 Task Flow(持久化工作流)

openclaw tasks flow create
--name "content-pipeline"
--trigger webhook
--steps "research,write,review,publish"
openclaw tasks flow create
--name "content-pipeline"
--trigger webhook
--steps "research,write,review,publish"

List tasks

列出任务

openclaw tasks list
openclaw tasks list

Create webhook endpoint

创建 webhook 端点

openclaw webhooks create
--name "github-pr-review"
--url "/webhooks/github"
--action "Review PR and comment"
openclaw webhooks create
--name "github-pr-review"
--url "/webhooks/github"
--action "Review PR and comment"

List webhooks

列出 webhook

openclaw webhooks list
undefined
openclaw webhooks list
undefined

Real Code Examples

实战代码示例

Example 1: File Management Automation (Shell)

示例1:文件管理自动化(Shell)

bash
#!/bin/bash
bash
#!/bin/bash

Auto-organize downloads folder

自动整理下载文件夹

User prompt to OpenClaw:

向 OpenClaw 发送指令:

"Organize my Downloads folder: move images to Images/,

"整理我的下载文件夹:将图片移至 Images/,

PDFs to Documents/, and delete files older than 30 days"

PDFs移至 Documents/, 删除30天以上的旧文件"

OpenClaw executes internally via file management tools

OpenClaw 通过文件管理工具自动执行

No manual scripting needed - AI handles the logic

无需手动编写脚本 - AI 处理逻辑

For custom automation, use Task Flow:

如需自定义自动化,使用 Task Flow:

openclaw tasks flow create
--name "organize-downloads"
--schedule "0 2 * * *"
--steps "scan_downloads,categorize_files,move_files,cleanup_old"
undefined
openclaw tasks flow create
--name "organize-downloads"
--schedule "0 2 * * *"
--steps "scan_downloads,categorize_files,move_files,cleanup_old"
undefined

Example 2: Knowledge Base Integration (JavaScript/Node)

示例2:知识库集成(JavaScript/Node)

javascript
// Add document to knowledge base
const { OpenClawClient } = require('openclaw-sdk');

const client = new OpenClawClient({
  apiKey: process.env.OPENCLAW_API_KEY,
  baseUrl: 'http://localhost:3000'
});

async function addToKnowledgeBase(filePath, metadata) {
  try {
    const result = await client.knowledge.add({
      file: filePath,
      metadata: {
        tags: metadata.tags,
        source: metadata.source,
        category: metadata.category
      },
      activeMemory: true, // Enable Active Memory indexing
      memoryWiki: true    // Add to Memory Wiki
    });
    
    console.log('Document added:', result.id);
    return result;
  } catch (error) {
    console.error('Failed to add document:', error.message);
    throw error;
  }
}

// Query knowledge base
async function searchKnowledge(query) {
  const results = await client.knowledge.search({
    query: query,
    limit: 10,
    useActiveMemory: true, // Include Active Memory context
    useMemoryWiki: true    // Include Memory Wiki claims
  });
  
  return results;
}

// Example usage
addToKnowledgeBase('./report.pdf', {
  tags: ['quarterly', 'finance'],
  source: 'internal',
  category: 'reports'
});

searchKnowledge('Q4 revenue analysis').then(results => {
  console.log('Found:', results.length, 'documents');
});
javascript
// 向知识库添加文档
const { OpenClawClient } = require('openclaw-sdk');

const client = new OpenClawClient({
  apiKey: process.env.OPENCLAW_API_KEY,
  baseUrl: 'http://localhost:3000'
});

async function addToKnowledgeBase(filePath, metadata) {
  try {
    const result = await client.knowledge.add({
      file: filePath,
      metadata: {
        tags: metadata.tags,
        source: metadata.source,
        category: metadata.category
      },
      activeMemory: true, // Enable Active Memory indexing
      memoryWiki: true    // Add to Memory Wiki
    });
    
    console.log('Document added:', result.id);
    return result;
  } catch (error) {
    console.error('Failed to add document:', error.message);
    throw error;
  }
}

// 查询知识库
async function searchKnowledge(query) {
  const results = await client.knowledge.search({
    query: query,
    limit: 10,
    useActiveMemory: true, // Include Active Memory context
    useMemoryWiki: true    // Include Memory Wiki claims
  });
  
  return results;
}

// 示例用法
addToKnowledgeBase('./report.pdf', {
  tags: ['quarterly', 'finance'],
  source: 'internal',
  category: 'reports'
});

searchKnowledge('Q4 revenue analysis').then(results => {
  console.log('Found:', results.length, 'documents');
});

Example 3: Feishu Bot Integration (JavaScript)

示例3:飞书机器人集成(JavaScript)

javascript
// Feishu bot webhook handler
const express = require('express');
const app = express();

app.post('/feishu/webhook', async (req, res) => {
  const event = req.body;
  
  if (event.type === 'message') {
    const userMessage = event.message.content;
    
    // Send to OpenClaw for processing
    const response = await fetch('http://localhost:3000/api/chat', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${process.env.OPENCLAW_API_KEY}`
      },
      body: JSON.stringify({
        message: userMessage,
        sessionId: event.message.chat_id,
        platform: 'feishu',
        useActiveMemory: true // Retrieve relevant context
      })
    });
    
    const result = await response.json();
    
    // Send response back to Feishu
    await sendFeishuMessage(event.message.chat_id, result.reply);
  }
  
  res.json({ success: true });
});

app.listen(3000);
javascript
// 飞书机器人 webhook 处理器
const express = require('express');
const app = express();

app.post('/feishu/webhook', async (req, res) => {
  const event = req.body;
  
  if (event.type === 'message') {
    const userMessage = event.message.content;
    
    // 发送至 OpenClaw 处理
    const response = await fetch('http://localhost:3000/api/chat', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${process.env.OPENCLAW_API_KEY}`
      },
      body: JSON.stringify({
        message: userMessage,
        sessionId: event.message.chat_id,
        platform: 'feishu',
        useActiveMemory: true // Retrieve relevant context
      })
    });
    
    const result = await response.json();
    
    // 将回复发送回飞书
    await sendFeishuMessage(event.message.chat_id, result.reply);
  }
  
  res.json({ success: true });
});

app.listen(3000);

Example 4: Media Generation Workflow (Shell)

示例4:媒体生成工作流(Shell)

bash
#!/bin/bash
bash
#!/bin/bash

Generate content pipeline: text -> image -> video

内容生成流水线:文本 → 图片 → 视频

Step 1: Generate article

步骤1:生成文章

ARTICLE=$(openclaw infer text "Write a 500-word article about sustainable energy"
--model gpt-4-turbo)
ARTICLE=$(openclaw infer text "Write a 500-word article about sustainable energy"
--model gpt-4-turbo)

Step 2: Generate cover image

步骤2:生成封面图

openclaw infer image "Sustainable energy concept art, vibrant, professional"
--model dall-e-3
--size 1792x1024
--output cover.png
openclaw infer image "Sustainable energy concept art, vibrant, professional"
--model dall-e-3
--size 1792x1024
--output cover.png

Step 3: Generate promotional video

步骤3:生成宣传视频

openclaw infer video "Solar panels in a green field, golden hour"
--provider runway
--duration 5
--output promo.mp4
openclaw infer video "Solar panels in a green field, golden hour"
--provider runway
--duration 5
--output promo.mp4

Step 4: Generate background music

步骤4:生成背景音乐

openclaw infer audio "Uplifting corporate background music"
--provider suno
--duration 30
--output bgm.mp3
openclaw infer audio "Uplifting corporate background music"
--provider suno
--duration 30
--output bgm.mp3

Step 5: Combine and publish

步骤5:合并并发布

echo "Content pipeline complete!" ls -lh cover.png promo.mp4 bgm.mp3
undefined
echo "Content pipeline complete!" ls -lh cover.png promo.mp4 bgm.mp3
undefined

Example 5: Task Flow with Webhooks (YAML)

示例5:带Webhooks的Task Flow(YAML)

yaml
undefined
yaml
undefined

~/.openclaw/flows/content-approval.yaml

~/.openclaw/flows/content-approval.yaml

name: content-approval-flow trigger: type: webhook path: /webhooks/content-submit
steps:
  • name: review-content action: infer input: "Review the submitted content for quality and compliance" model: claude-3-5-sonnet-20241022
  • name: check-approval action: conditional condition: "review.score > 8"
  • name: publish action: webhook url: https://cms.example.com/publish method: POST headers: Authorization: "Bearer ${CMS_API_KEY}" body: content: "{{ steps.review.content }}" status: approved
  • name: notify action: send-message platform: feishu channel: "${FEISHU_CHANNEL_ID}" message: "Content published: {{ steps.publish.url }}"

Load flow:
```bash
openclaw tasks flow load ~/.openclaw/flows/content-approval.yaml
openclaw tasks flow start content-approval-flow
name: content-approval-flow trigger: type: webhook path: /webhooks/content-submit
steps:
  • name: review-content action: infer input: "Review the submitted content for quality and compliance" model: claude-3-5-sonnet-20241022
  • name: check-approval action: conditional condition: "review.score > 8"
  • name: publish action: webhook url: https://cms.example.com/publish method: POST headers: Authorization: "Bearer ${CMS_API_KEY}" body: content: "{{ steps.review.content }}" status: approved
  • name: notify action: send-message platform: feishu channel: "${FEISHU_CHANNEL_ID}" message: "Content published: {{ steps.publish.url }}"

加载工作流:
```bash
openclaw tasks flow load ~/.openclaw/flows/content-approval.yaml
openclaw tasks flow start content-approval-flow

Common Patterns

常见使用模式

Pattern 1: Daily Automation Routine

模式1:日常自动化流程

bash
undefined
bash
undefined

Create morning briefing task

创建早报任务

openclaw tasks create
--name "morning-briefing"
--schedule "0 8 * * *"
--command "Generate morning briefing: check emails, calendar, news, weather. Send to Feishu."
openclaw tasks create
--name "morning-briefing"
--schedule "0 8 * * *"
--command "Generate morning briefing: check emails, calendar, news, weather. Send to Feishu."

Create evening summary task

创建晚报任务

openclaw tasks create
--name "evening-summary"
--schedule "0 18 * * *"
--command "Summarize today's work: meetings attended, tasks completed, files created. Archive to knowledge base."
undefined
openclaw tasks create
--name "evening-summary"
--schedule "0 18 * * *"
--command "Summarize today's work: meetings attended, tasks completed, files created. Archive to knowledge base."
undefined

Pattern 2: Multi-Platform Sync

模式2:多平台同步

javascript
// Sync message across platforms
async function syncMessage(message, platforms) {
  const results = await Promise.all(
    platforms.map(platform => 
      client.messaging.send({
        platform: platform,
        channelId: process.env[`${platform.toUpperCase()}_CHANNEL_ID`],
        message: message,
        useActiveMemory: true
      })
    )
  );
  
  return results;
}

// Usage
syncMessage('Deployment complete for v2.0', ['feishu', 'slack', 'wechat']);
javascript
// 跨平台同步消息
async function syncMessage(message, platforms) {
  const results = await Promise.all(
    platforms.map(platform => 
      client.messaging.send({
        platform: platform,
        channelId: process.env[`${platform.toUpperCase()}_CHANNEL_ID`],
        message: message,
        useActiveMemory: true
      })
    )
  );
  
  return results;
}

// 使用示例
syncMessage('Deployment complete for v2.0', ['feishu', 'slack', 'wechat']);

Pattern 3: Knowledge Base -> Memory Wiki Pipeline

模式3:知识库 → Memory Wiki 流水线

bash
undefined
bash
undefined

User uploads document

用户上传文档

openclaw knowledge add ./research-paper.pdf
--tags "AI,research"
--auto-extract-claims
openclaw knowledge add ./research-paper.pdf
--tags "AI,research"
--auto-extract-claims

OpenClaw automatically:

OpenClaw 自动执行:

1. Extracts text content

1. 提取文本内容

2. Creates Memory Wiki claims with evidence

2. 创建带证据的 Memory Wiki 声明

3. Indexes for Active Memory retrieval

3. 为 Active Memory 检索建立索引

4. Checks for contradictions with existing claims

4. 检查与现有声明的矛盾

Query across knowledge base and memory

跨知识库与记忆查询

openclaw infer text "What are the latest findings on transformer models?"
--use-active-memory
--use-memory-wiki
undefined
openclaw infer text "What are the latest findings on transformer models?"
--use-active-memory
--use-memory-wiki
undefined

Troubleshooting

故障排查

Gateway Won't Start (2026.3.7+)

网关无法启动(v2026.3.7+)

Symptom:
Error: gateway.auth.mode must be set
Fix:
bash
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart
症状
Error: gateway.auth.mode must be set
解决方法
bash
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart

AI Only Chats, Can't Execute Commands (2026.3.2+)

AI仅能聊天,无法执行命令(v2026.3.2+)

Symptom: OpenClaw responds to questions but won't manage files or run commands
Fix:
bash
undefined
症状:OpenClaw 可回复问题,但无法管理文件或执行命令
解决方法
bash
undefined

Check current profile

查看当前配置文件

openclaw config get tools.profile
openclaw config get tools.profile

Set to 'full' for complete toolset

设置为 'full' 以启用完整工具集

openclaw config set tools.profile full openclaw gateway restart
undefined
openclaw config set tools.profile full openclaw gateway restart
undefined

Model Authentication Errors

模型认证错误

Symptom:
Model provider not authenticated
Fix:
bash
undefined
症状
Model provider not authenticated
解决方法
bash
undefined

Re-authenticate (2026.4+ method)

重新认证(2026.4+ 方式)

openclaw models auth login --provider openai openclaw models auth login --provider anthropic
openclaw models auth login --provider openai openclaw models auth login --provider anthropic

Verify

验证

openclaw models auth list
openclaw models auth list

Set default

设置默认模型

openclaw config set model.default "claude-3-5-sonnet-20241022"
undefined
openclaw config set model.default "claude-3-5-sonnet-20241022"
undefined

High API Costs

API成本过高

Solutions:
bash
undefined
解决方案
bash
undefined

1. Enable fast mode for OpenAI/Anthropic (cheaper)

1. 为 OpenAI/Anthropic 启用快速模式(更便宜)

openclaw config set model.fast_mode true
openclaw config set model.fast_mode true

2. Use local models with Ollama

2. 使用 Ollama 运行本地模型

openclaw models auth login --provider ollama openclaw config set model.default "llama3:70b"
openclaw models auth login --provider ollama openclaw config set model.default "llama3:70b"

3. Set token limits

3. 设置token上限

openclaw config set model.max_tokens 4000
openclaw config set model.max_tokens 4000

4. Use Chinese domestic models (95% cost savings)

4. 使用国内中文模型(节省95%成本)

openclaw models auth login --provider deepseek openclaw config set model.default "deepseek-chat"
undefined
openclaw models auth login --provider deepseek openclaw config set model.default "deepseek-chat"
undefined

Active Memory Not Working

Active Memory 无法工作

Symptom: AI doesn't recall previous context
Fix:
bash
undefined
症状:AI无法回忆之前的上下文
解决方法
bash
undefined

Enable Active Memory

启用 Active Memory

openclaw config set memory.active.enabled true openclaw config set memory.dreaming.enabled true
openclaw config set memory.active.enabled true openclaw config set memory.dreaming.enabled true

Force memory refresh

强制刷新记忆

openclaw memory rebuild
openclaw memory rebuild

Check memory stats

查看记忆统计

openclaw memory stats
openclaw memory stats

Restart gateway

重启网关

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Task Flow Execution Failures

Task Flow 执行失败

Symptom: Workflows stuck or fail silently
Debug:
bash
undefined
症状:工作流停滞或静默失败
调试方法
bash
undefined

Check task logs

查看任务日志

openclaw tasks logs <task-name>
openclaw tasks logs <task-name>

Validate flow definition

验证工作流定义

openclaw tasks flow validate ~/.openclaw/flows/my-flow.yaml
openclaw tasks flow validate ~/.openclaw/flows/my-flow.yaml

Test individual steps

测试单个步骤

openclaw tasks flow test my-flow --step review-content
openclaw tasks flow test my-flow --step review-content

Enable debug mode

启用调试模式

openclaw config set debug.tasks true openclaw gateway restart
undefined
openclaw config set debug.tasks true openclaw gateway restart
undefined

ComfyUI Integration Issues

ComfyUI 集成问题

Symptom:
infer image
fails with ComfyUI backend
Fix:
bash
undefined
症状:使用 ComfyUI 后端时
infer image
失败
解决方法
bash
undefined

Install ComfyUI skill (if using pre-2026.4 setup)

安装 ComfyUI skill(适用于2026.4之前的版本)

Note: In 2026.4+, use built-in infer command instead

注意:2026.4+ 版本请使用内置的 infer 命令

Verify ComfyUI is running

验证 ComfyUI 是否运行

Set ComfyUI endpoint

设置 ComfyUI 端点

openclaw config set comfyui.endpoint "http://localhost:8188"
openclaw config set comfyui.endpoint "http://localhost:8188"

Test connection

测试连接

openclaw infer image "test" --provider comfyui
undefined
openclaw infer image "test" --provider comfyui
undefined

Windows Specific Issues

Windows 特定问题

Symptom: Black console window pops up on gateway restart
Fix: Upgrade to v2026.3.13+ which fixes this issue
powershell
undefined
症状:重启网关时弹出黑色控制台窗口
解决方法:升级至 v2026.3.13+ 版本修复此问题
powershell
undefined

Update OpenClaw

更新 OpenClaw

npm update -g openclaw
npm update -g openclaw

Verify version

验证版本

openclaw --version # Should be >= v2026.3.13
undefined
openclaw --version # Should be >= v2026.3.13
undefined

Configuration Reference

配置参考

Key config paths in
~/.openclaw/config.json
:
json
{
  "model": {
    "default": "claude-3-5-sonnet-20241022",
    "fast_mode": true,
    "max_tokens": 4000
  },
  "gateway": {
    "auth": {
      "mode": "token",
      "token": "${OPENCLAW_GATEWAY_TOKEN}"
    },
    "port": 3000
  },
  "tools": {
    "profile": "full"
  },
  "memory": {
    "active": {
      "enabled": true
    },
    "dreaming": {
      "enabled": true,
      "schedule": "0 3 * * *"
    },
    "wiki": {
      "enabled": true
    },
    "retention": {
      "days": 90
    }
  },
  "platforms": {
    "feishu": {
      "app_id": "${FEISHU_APP_ID}",
      "app_secret": "${FEISHU_APP_SECRET}"
    },
    "slack": {
      "bot_token": "${SLACK_BOT_TOKEN}"
    }
  }
}
核心配置路径位于
~/.openclaw/config.json
json
{
  "model": {
    "default": "claude-3-5-sonnet-20241022",
    "fast_mode": true,
    "max_tokens": 4000
  },
  "gateway": {
    "auth": {
      "mode": "token",
      "token": "${OPENCLAW_GATEWAY_TOKEN}"
    },
    "port": 3000
  },
  "tools": {
    "profile": "full"
  },
  "memory": {
    "active": {
      "enabled": true
    },
    "dreaming": {
      "enabled": true,
      "schedule": "0 3 * * *"
    },
    "wiki": {
      "enabled": true
    },
    "retention": {
      "days": 90
    }
  },
  "platforms": {
    "feishu": {
      "app_id": "${FEISHU_APP_ID}",
      "app_secret": "${FEISHU_APP_SECRET}"
    },
    "slack": {
      "bot_token": "${SLACK_BOT_TOKEN}"
    }
  }
}

Resources

资源

Important: This tutorial tracks v2026.4.14 stable. Some legacy content (old skill names, deprecated commands) remains for reference. Always verify against current
openclaw --version
and official docs.
重要提示:本教程对应 v2026.4.14 稳定版。部分旧版内容(旧Skill名称、已废弃命令)仍保留供参考。请始终对照当前
openclaw --version
和官方文档进行验证。