Skills & Customization
✏️

How to Create Custom OpenClaw Skills

Write your own SKILL.md files to teach OpenClaw exactly what you need.

6 分钟阅读|
custom skillscreate skillSKILL.md

Creating Your First Skill

Building a custom skill is as simple as writing a markdown file. No JavaScript, no compilation — just clear instructions.

Step 1: Create the Directory

mkdir -p ~/.openclaw/skills/my-skill

Step 2: Write SKILL.md

Create ~/.openclaw/skills/my-skill/SKILL.md:

---
name: daily-briefing
description: Generate a personalized daily briefing
tools: [web_search, web_fetch, read, write]
triggers:
  - "daily briefing"
  - "morning update"
  - "what's happening today"
---

# Daily Briefing Generator

When the user asks for a daily briefing:

1. Check the date and day of week
2. Search for top news headlines
3. Check the user's calendar if accessible
4. Search for weather in the user's location
5. Compile everything into a concise briefing format:

## Format
- **Date & Weather**: Current conditions
- **Top News**: 3-5 headlines with one-line summaries
- **Calendar**: Upcoming events today
- **Tip of the Day**: Something useful or interesting

Step 3: Test It

Restart OpenClaw or reload skills, then send a message: "Give me my daily briefing"

Writing Good Instructions

Be Specific

Instead of "search the web", write "use web_search to find the top 5 results for the topic, then use web_fetch on the most relevant 2 results."

Define Output Format

Specify exactly how results should be formatted — bullet points, tables, paragraphs, etc.

Handle Edge Cases

Add instructions for what to do when things go wrong: "If no results are found, tell the user and suggest alternative search terms."

Use Examples

Include example inputs and outputs to guide the AI's behavior.

Advanced Features

Environment Variables

Skills can require API keys:

---
env:
  WEATHER_API_KEY: required
---

Configure in openclaw.json:

{
  "skills": {
    "entries": {
      "daily-briefing": {
        "env": { "WEATHER_API_KEY": "your-key" }
      }
    }
  }
}

Conditional Loading

Skills can specify when they should load:

---
platforms: [macos, linux]  # Skip on Windows
requires: [ffmpeg]         # Only load if ffmpeg is installed
---

Sharing Skills

Share your skills by:

  • Publishing to ClawHub
  • Creating a GitHub repository
  • Sharing the skill directory directly
custom skillscreate skillSKILL.mdskill developmentopenclaw extend

准备好使用AI助手了吗?

今天就开始使用Claw for All。无需设置,无需终端,注册即可使用。

开始使用

相关指南