Agent 生成器
- 作者仓库星标 679
- 作者仓库 swarm-tools
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 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:
SKILL.md (required) - Main skill file with:
- YAML frontmatter (name, description)
- Markdown body with instructions
Bundled Resources (optional):
scripts/- Executable code (bash/python/etc)references/- Documentation loaded on-demandassets/- Files used in output (templates, etc)
Frontmatter Requirements
---
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:
- Metadata (~100 words) - Always in context
- SKILL.md body (<5k words) - When skill triggers
- 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:
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:
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:
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.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @joelhooks · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Bun · Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 To generate a new skill: This creates a complete skill scaffold with: SKILL.md with proper frontmatter
Every skill MUST include: SKILL.md (required) - Main skill file with: YAML frontmatter (name, description)
The description field is critical for skill discovery and triggering. Include: What the skill does When to use it (specific triggers)
Directory Structure
Writing Effective Skills
Target <500 lines in SKILL.md. Move detailed content to references/: Core workflow → SKILL.md Detailed examples → references/
# 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" ✓
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Quick Start → Skill Format Conventions → Frontmatter Requirements → Directory Structure → Writing Effective Skills → Keep SKILL.md Lean
要点 -> SKILL.md · Bundled Resources · Metadata · SKILL.md body · Bundled resources
文件/命令 -> scripts/ · references/ · assets/ · scripts/generate-skill.sh · bash/python/etc · conventions.md · bash/python · scripts/my-script.sh
内容 SHA-256 -> 90fb1a61b871
方法与流程
适用与边界
原文中的明确线索
scripts/、references/、assets/、scripts/generate-skill.sh、bash/python/etc、conventions.md、bash/python、scripts/my-script.sh