返回顶部
k

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 template to published skill.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.6
安全检测
已通过
157
下载量
0
收藏
概述
安装方式
版本历史

kai-skill-creator

# 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 ```bash cp -r /home/kai/.openclaw/workspace/skills/kai-minimax-tts /home/kai/.openclaw/workspace/skills/<NEW_SKILL> ``` ### 2. Edit SKILL.md **CORRECT FRONTMATTER:** ```yaml --- 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 ```bash chmod +x /home/kai/.openclaw/workspace/skills/<NEW_SKILL>/scripts/<script>.sh ``` ### 4. Validate ```bash 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 ```bash cp -r /home/kai/.openclaw/workspace/skills/<NEW_SKILL> /home/kai/.openclaw/skills/<NEW_SKILL> ``` ### 6. Register in Config Add to `~/.openclaw/openclaw.json`: ```json { "skills": { "entries": { "<SKILL_NAME>": { "enabled": true } } } } ``` ### 7. Publish ```bash 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 ```bash # FLAGGED! API_KEY="sk-api-xxxxx" ``` ### ❌ NEVER Load .env in Script ```bash # FLAGGED! Security risk source ~/.env ``` ### ❌ NEVER Use homepage Key ```yaml # FLAGGED! Causes validation failure homepage: https://example.com ``` ### ❌ NEVER Mention External API URLs ```markdown # 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 ```yaml # MISMATCH! Script uses $API_KEY but not declared metadata: openclaw: requires: {} ``` ### ❌ Script Syntax Errors ```bash # Test your script before publishing! bash script.sh --test # If EOF error or syntax issues → FLAGGED ``` --- ## ✅ The CORRECT Pattern ### Declaring Requirements ```yaml metadata: openclaw: requires: env: - MINIMAX_API_KEY - CUSTOM_VAR bins: - curl - whisper ``` ### Using Env Vars (Auto-Injected) ```bash # Just use directly - OpenClaw injects these API_KEY="$MINIMAX_API_KEY" curl -H "Authorization: Bearer ${API_KEY}" ... ``` ### Adding Secrets to Config ```json { "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 | Problem | Cause | Fix | |---------|-------|-----| | "Omits required env" | Env var used but not declared | Add to `requires.env` | | "Binary not found" | Wrong binary name | Use exact name, no path | | "Unexpected permissions" | More bins declared than needed | Remove unused | | "Purpose mismatch" | Docs say one thing, code does another | Align description | | "External endpoint" | URL mentioned in docs | Remove URL references | | EOF/syntax error | Script has bash errors | Fix syntax before publish | --- ## Testing Tips Test script locally: ```bash # 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 | Purpose | Path | |---------|------| | 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*

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 kai-skill-creator-1776080220 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 kai-skill-creator-1776080220 技能

通过命令行安装

skillhub install kai-skill-creator-1776080220

下载 Zip 包

⬇ 下载 kai-skill-creator v1.0.6

文件大小: 4.18 KB | 发布时间: 2026-4-17 15:09

v1.0.6 最新 2026-4-17 15:09
- Major SKILL.md rewrite for clarity and concise guidance
- Added stricter instructions to avoid hardcoding API keys, loading .env files, or mentioning external URLs (to avoid ClawHub scanner flags)
- Provided a step-by-step, streamlined workflow for creating, validating, and publishing skills
- Expanded "What NOT to Do" with more scanner red flags and best practices
- Updated pre-publish checklist and troubleshooting table for faster validation and issue resolution
- Improved examples and file location references throughout

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部