介绍
# Skill Scaffold
在几秒钟内创建 AI 代理技能。支持 OpenClaw/Moltbot、MCP 服务器和通用技能结构。
## 触发词
当用户提到以下内容时使用此技能: - "create a skill" - "scaffold a skill" - "new skill template" - "skill generator" - "make a openclaw skill" - "mcp server template"
## 快速开始
```bash # Install globally npm install -g skill-scaffold
# Create a OpenClaw skill skill-scaffold my-awesome-skill
# Create an MCP server skill-scaffold my-api --template mcp
# With all options skill-scaffold weather-bot --template openclaw --cli --description "Weather alerts for agents" ```
## 命令
| 命令 | 描述 | |---------|-------------| | `skill-scaffold <name>` | 使用默认模板创建技能 | | `skill-scaffold <name> --template mcp` | 创建 MCP 服务器脚手架 | | `skill-scaffold <name> --template generic` | 创建最小化技能 | | `skill-scaffold <name> --cli` | 包含 CLI 二进制脚手架 | | `skill-scaffold --help` | 显示帮助 |
## 模板
### OpenClaw (默认)
适用于 OpenClaw/Moltbot 代理的完整技能结构: - SKILL.md,包含 YAML 前置数据、触发词、命令表 - README.md,包含徽章、安装说明、功能特性 - scripts/ 文件夹,用于存放辅助脚本
### MCP
模型上下文协议服务器脚手架: - SKILL.md,包含 MCP 配置示例 - 工具和资源文档 - 可直接集成到 Claude Desktop/Cursor
### Generic
最小化结构: - 基础 SKILL.md - 简单的 README.md
## 选项
| 选项 | 描述 | 默认值 | |--------|-------------|---------| | `--template <type>` | 模板类型:openclaw, mcp, generic | openclaw | | `--author <name>` | 作者名称 | NextFrontierBuilds | | `--description <text>` | 技能描述 | 自动生成 | | `--dir <path>` | 输出目录 | 当前目录 | | `--cli` | 包含 CLI 二进制脚手架 | false | | `--no-scripts` | 跳过 scripts 文件夹 | false |
## 使用示例
```bash # Create in current directory skill-scaffold my-skill
# Create in specific directory skill-scaffold my-skill --dir ~/clawd/skills
# MCP server with custom author skill-scaffold github-mcp --template mcp --author "YourName"
# Full CLI tool skill-scaffold awesome-cli --cli --description "Does awesome things" ```
## 输出结构
``` my-skill/ ├── SKILL.md # Main documentation (OpenClaw reads this) ├── README.md # GitHub/npm readme ├── scripts/ # Helper scripts (optional) └── bin/ # CLI binary (if --cli flag used) └── my-skill.js ```
## 创建后
1. `cd my-skill` 2. 编辑 SKILL.md 填写实际文档 3. 添加实现代码 (scripts 或 bin/) 4. 本地测试 5. 发布:`clawdhub publish .` 或 `npm publish`
## 注意事项
- 技能名称必须为小写且仅包含连字符 - SEO 关键词会自动包含在生成的文件中 - 适用于 OpenClaw、Moltbot 以及任何读取 SKILL.md 的代理