Skip to main content
Claw101
Chapter 11 · Free~1 min read

Skills System

Extend OpenClaw capabilities through the modular skills system for reusable, composable functionalities.

Skill Definition Format

Create custom skills with YAML:

# skills/code_review.yaml
name: "code_review"
description: "Analyze code and provide review feedback"
version: "1.0.0"

inputs:
  - name: "file_path"
    type: "string"
    required: true
  - name: "focus"
    type: "string"
    default: "all"
    options: ["security", "performance", "style", "all"]

steps:
  - action: "read_file"
    params:
      path: "{{inputs.file_path}}"

  - action: "llm_analyze"
    params:
      prompt: "Review this code focusing on {{inputs.focus}}"
      content: "{{steps.0.output}}"

  - action: "format_response"
    template: "review_report"

Built-in Skills

OpenClaw includes ready-to-use skills:

  • git_commit: Analyze changes and create commits
  • summarize_document: Extract key points from long texts
  • translate: Multi-language translation
  • image_analysis: Describe and analyze images
  • data_visualization: Generate charts from data
# Using built-in skills
agent:
  skills:
    - name: "git_commit"
      enabled: true
    - name: "summarize_document"
      max_length: 500

Custom Skill Development

Build your own skills with JavaScript/Python:

// skills/custom/sentiment.js
export default {
  name: 'sentiment_analysis',

  async execute(input, context) {
    const text = input.text;
    // Your custom logic
    const sentiment = await analyzeSentiment(text);

    return {
      sentiment: sentiment.label,
      confidence: sentiment.score
    };
  }
}

Register custom skills:

skills:
  custom_path: "./skills/custom"
  auto_load: true

Skill Composition

Chain multiple skills together:

workflows:
  content_pipeline:
    skills:
      - name: "web_scraper"
        output: "raw_content"
      - name: "summarize_document"
        input: "{{raw_content}}"
        output: "summary"
      - name: "translate"
        input: "{{summary}}"
        params:
          target_language: "zh"

Want to practice? Join community for $50 AI credits + live Q&A

Join ¥99