← 返回
未分类 中文

Kai Skill Creator

Create new OpenClaw skills that pass ClawHub validation on first attempt. Use when building a new skill for OpenClaw. Teaches the complete process from templ...
创建可一次通过ClawHub验证的OpenClaw新技能。在为OpenClaw构建新技能时使用,教授完整的流程(从模板开始)。
ogdegenblaze
未分类 clawhub v1.0.6 1 版本 99821.1 Key: 无需
★ 0
Stars
📥 558
下载
💾 12
安装
1
版本
#creator#guide#kai#latest#skills

概述

Kai Skill Creator

Create OpenClaw skills correctly. Learned from getting kai-minimax-tts and kai-skill-creator to pass ClawHub scan.

Quick Start

1. Clone Template

cp -r /home/kai/.openclaw/workspace/skills/kai-minimax-tts /home/kai/.openclaw/workspace/skills/<NEW_SKILL>

2. Edit SKILL.md

CORRECT FRONTMATTER:

---
name: skill-name
description: What this skill does and when to use it
metadata:
  openclaw:
    requires:
      bins:
        - binary1
        - curl
      env:
        - API_KEY
---

# My Skill

Brief description...

## Usage
Commands and examples...

3. Write Script

chmod +x /home/kai/.openclaw/workspace/skills/<NEW_SKILL>/scripts/<script>.sh

4. Validate

python3 /home/kai/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw/skills/skill-creator/scripts/quick_validate.py /home/kai/.openclaw/workspace/skills/<NEW_SKILL>

5. Copy to Global

cp -r /home/kai/.openclaw/workspace/skills/<NEW_SKILL> /home/kai/.openclaw/skills/<NEW_SKILL>

6. Register in Config

Add to ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "<SKILL_NAME>": {
        "enabled": true
      }
    }
  }
}

7. Publish

cd ~/.openclaw/workspace
npx clawhub publish skills/<SKILL_NAME> --slug <SKILL_NAME> --version 1.0.0 --tags "tag1,tag2"

⚠️ CRITICAL: What NOT to Do

❌ NEVER Hardcode API Keys

# FLAGGED!
API_KEY="sk-api-xxxxx"

❌ NEVER Load .env in Script

# FLAGGED! Security risk
source ~/.env

❌ NEVER Use homepage Key

# FLAGGED! Causes validation failure
homepage: https://example.com

❌ NEVER Mention External API URLs

# FLAGGED! External endpoint reference
Get key from: https://api.example.com

Keep docs minimal. Scanner interprets URL mentions as potential data exfiltration.

❌ NEVER Leave Env Vars Undeclared

# MISMATCH! Script uses $API_KEY but not declared
metadata:
  openclaw:
    requires: {}

❌ Script Syntax Errors

# Test your script before publishing!
bash script.sh --test
# If EOF error or syntax issues → FLAGGED

✅ The CORRECT Pattern

Declaring Requirements

metadata:
  openclaw:
    requires:
      env:
        - MINIMAX_API_KEY
        - CUSTOM_VAR
      bins:
        - curl
        - whisper

Using Env Vars (Auto-Injected)

# Just use directly - OpenClaw injects these
API_KEY="$MINIMAX_API_KEY"
curl -H "Authorization: Bearer ${API_KEY}" ...

Adding Secrets to Config

{
  "skills": {
    "entries": {
      "my-skill": {
        "enabled": true,
        "env": {
          "API_KEY": "actual_key_here"
        }
      }
    }
  }
}

Scanner Checks (What Gets Flagged)

The ClawHub scanner verifies:

  1. Coherence: Declared requirements match actual code
  2. No surprise permissions: Env vars/bins declared = actually used
  3. No data exfiltration: External URLs in docs = red flag
  4. Valid syntax: Scripts must parse without errors
  5. Purpose clarity: Description matches what code actually does

Green = purpose, permissions, and code all match.


Pre-Publish Checklist

  • [ ] No API keys hardcoded anywhere
  • [ ] No .env loading statements
  • [ ] All env vars declared in requires.env
  • [ ] All bins declared in requires.bins
  • [ ] No homepage key
  • [ ] No external API URLs in docs
  • [ ] Script has valid syntax (test it!)
  • [ ] Script produces expected output
  • [ ] Version bumped (1.0.0 → 1.0.1 → etc)
  • [ ] Validated with quick_validate.py

Troubleshooting

ProblemCauseFix
---------------------
"Omits required env"Env var used but not declaredAdd to requires.env
"Binary not found"Wrong binary nameUse exact name, no path
"Unexpected permissions"More bins declared than neededRemove unused
"Purpose mismatch"Docs say one thing, code does anotherAlign description
"External endpoint"URL mentioned in docsRemove URL references
EOF/syntax errorScript has bash errorsFix syntax before publish

Testing Tips

Test script locally:

# With inline env var for testing
MINIMAX_API_KEY=test_key bash scripts/script.sh --speak "test" en

# Check syntax
bash -n scripts/script.sh

File Locations

PurposePath
---------------
Workspace skills~/.openclaw/workspace/skills/
Global skills~/.openclaw/skills/
Config~/.openclaw/openclaw.json
Validator/home/kai/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw/skills/skill-creator/scripts/quick_validate.py
Template~/.openclaw/workspace/skills/kai-minimax-tts/

Updated 2026-03-20 - Full scan passage for kai-minimax-tts and kai-skill-creator

版本历史

共 1 个版本

  • v1.0.6 当前
    2026-03-30 18:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Kai YouTube

ogdegenblaze
使用 yt-dlp 和 Whisper CLI 下载并转录 YouTube 视频,保存音频与文字稿,支持任意链接播放与摘要。
★ 0 📥 501

Kai Master Builder

ogdegenblaze
开发者、代码、工程师。引导智能体高效安全地构建应用/功能/目标,制定项目计划、任务列表,并提供构建...
★ 0 📥 568

Kai Realtime Voice

ogdegenblaze
通过 MiniMax WebSocket API 实现实时语音流,用于低延迟语音对话和流式音频生成。
★ 0 📥 370