技能生成器
- 作者仓库星标 679
- 作者仓库 swarm-tools
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @joelhooks · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Bun · Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
bash scripts/generate-skill.sh <skill-name> [target-directory]
# Skill Generator
Generate new skills with proper format, structure, and conventions. This meta-skill helps agents create skills without hallucinating the format.
## Quick Start
To generate a new skill:
```bash
bash scripts/generate-skill.sh <skill-name> [target-directory]
```
This creates a complete skill scaffold with:
- SKILL.md with proper frontmatter
- scripts/ directory for executable helpers
- references/ directory for documentation
- Placeholder content following conventions
## Skill Format Conventions
Every skill MUST include:
1. **SKILL.md** (required) - Main skill file with:
- YAML frontmatter (name, description)
- Markdown body with instructions
2. **Bundled Resources** (optional):
- `scripts/` - Executable code (bash/python/etc)
- `references/` - Documentation loaded on-demand
- `assets/` - Files used in output (templates, etc)
### Frontmatter Requirements
```yaml
---
name: skill-name
description: What the skill does AND when to use it. Include triggering scenarios.
---
```
The description field is critical for skill discovery and triggering. Include:
- What the skill does
- When to use it (specific triggers)
- What contexts activate it
### Directory Structure
```
skill-name/
├── SKILL.md (required)
├── scripts/ (optional)
│ └── example-script.sh
├── references/ (optional)
│ └── conventions.md
└── assets/ (optional)
└── template-file
```
## Writing Effective Skills
### Keep SKILL.md Lean
Target <500 lines in SKILL.md. Move detailed content to references/:
- Core workflow → SKILL.md
- Detailed examples → references/
- API docs → references/
- Long explanations → references/
### Use Imperative Form
Write instructions as commands:
- "Read the file first" ✓
- "You should read the file" ✗
- "Check for patterns" ✓
- "Consider checking patterns" ✗
### Progressive Disclosure
Skills use three-level loading:
1. **Metadata** (~100 words) - Always in context
2. **SKILL.md body** (<5k words) - When skill triggers
3. **Bundled resources** (unlimited) - Loaded as needed
## Bundled Resources
### scripts/
Executable code for deterministic tasks:
- When the same code is rewritten repeatedly
- When reliability is critical
- Run via bash/python without loading to context
Make scripts executable:
```bash
chmod +x scripts/my-script.sh
```
### references/
Documentation loaded on-demand:
- Database schemas
- API documentation
- Detailed workflow guides
- Domain knowledge
Keep reference files focused. For files >100 lines, include a table of contents.
Reference from SKILL.md with clear guidance on when to read:
```markdown
See references/api-docs.md for complete API reference.
```
### assets/
Files used in output (not loaded to context):
- Templates
- Images/icons
- Boilerplate code
- Fonts/typography
## What NOT to Include
Do NOT create these files:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
Skills should contain only what an AI agent needs to execute the task. No auxiliary documentation.
## Validation
Before finalizing, validate the skill:
```bash
bun scripts/validate-skill.ts path/to/skill
```
Checks:
- YAML frontmatter format
- Required fields present
- No TODO placeholders
- No extraneous files
- Naming conventions
## Reference
See references/conventions.md for complete skill format specification.
章节与文件索引
按说明文件中的顺序排列。
快速入门
技能格式约定
前言要求
保持 SKILL.md 精益
使用祈使句形式
文件/命令 -> scripts/ · references/ · assets/ · scripts/generate-skill.sh · bash/python/etc · conventions.md · bash/python · scripts/my-script.sh
内容校验值 -> 90fb1a61b871
当前原文的自动摘译,尚未人工审校。
快速入门
要生成新技能:这将创建一个完整的技能支架,其中包含: SKILL.md 以及正确的 frontmatter 脚本/用于可执行帮助程序的目录引用/用于文档的目录
技能格式约定
每项技能都必须包括: SKILL.md(必需) - 主要技能文件包含: YAML frontmatter(名称、描述) 包含说明的 Markdown 正文 捆绑资源(可选):
前言要求
描述字段对于技能发现和触发至关重要。包括: 该技能的用途 何时使用该技能(特定触发器) 哪些环境会激活该技能
保持 SKILL.md 精益
SKILL.md 中的目标 <500 行。将详细内容移至参考文献/:核心工作流程 → SKILL.md 详细示例 → 参考文献/ API 文档 → 参考文献/ 详细说明 → 参考文献/
使用祈使句形式
将指令编写为命令:“首先读取文件”✓“您应该读取文件”✗“检查模式”✓“考虑检查模式”✗