SkillForge — Agent Skill Generator
Generate complete, production-ready Agent Skill packages via a 7-step pipeline. Each step has defined inputs, outputs, and quality constraints.
Core Design Principles
Apply these principles throughout all 7 steps:
- 1. Concise is Key — Context window is a public good. Only include knowledge the AI model does NOT already have. Challenge each paragraph: "Does this justify its token cost?"
- Description is the trigger — Determines whether the Skill gets selected. Must include WHAT + WHEN.
- Progressive disclosure — SKILL.md < 500 lines. Supporting files in scripts/, references/, templates/ loaded on demand.
- Code examples > text — Prefer concise, runnable examples over verbose descriptions.
- Anti-patterns are essential — Show what NOT to do using ❌/✅ contrast format.
- Imperative tone — "Run" not "You should run".
- No auxiliary files — No README.md, CHANGELOG.md. Skills are for AI agents, not humans.
Pipeline Overview
CODEBLOCK0
Execute steps sequentially. Each step builds on previous outputs.
Step 1: Requirement Deep Analysis
Analyze the user's requirement. Output a structured document (2000-5000 chars).
Read the full step prompt: references/step-prompts.md → Section "Step 1".
Output structure:
- 1. Core positioning (name, one-line description, target users, value proposition)
- Functional boundaries (core features as input→process→output triples, extensions, exclusions)
- Usage scenarios (at least 5, each with: user request, expected behavior, output format)
- Knowledge gap analysis (most critical):
- AI already knows → exclude from SKILL.md
- AI doesn't know → core content of SKILL.md
- AI often gets wrong → needs anti-pattern examples
- 5. Dependencies and constraints
Step 2: Architecture Decisions
Make 5 key decisions. Read full prompt: references/step-prompts.md → Section "Step 2".
| Decision | Options |
|---|
| Structure pattern | Workflow / Task-oriented / Guide / Capability |
| Freedom level |
High / Medium / Low |
| Resource file plan | Table of files with paths, types, purposes, line counts |
| Progressive disclosure | What goes in SKILL.md vs references/ vs scripts/ |
| Quality assurance | Validation checklist, common errors, quality standards |
Output a complete directory tree at the end.
Step 3: Metadata Crafting
Generate YAML frontmatter with optimized description.
- 1. Generate 3 candidate descriptions
- Score each on: trigger precision (1-5), capability coverage (1-5), information density (1-5)
- Select highest-scoring candidate
Read full prompt: references/step-prompts.md → Section "Step 3".
description quality rules:
- - 30-80 words, objective descriptive tone
- Must include WHAT the skill does AND WHEN to use it
- Every word must earn its place
Step 4: SKILL.md Body Generation
Generate the complete body (excluding frontmatter). Target: 150-450 lines.
Read full prompt: references/step-prompts.md → Section "Step 4".
Structure (adapt as needed):
- 1. Overview (2-3 sentences)
- Core workflow (numbered steps or decision flow)
- Detailed rules and instructions (domain-specific)
- Code examples (✅ Good / ❌ Bad contrast format)
- Edge case handling
- Output format specification
- Validation checklist (Markdown checkboxes)
Key constraints:
- - No generic knowledge AI already has
- No repetition of description content
- Sections > 100 lines → split to references/
- All code examples must be complete and runnable
Step 5: Quality Audit
Audit the generated SKILL.md (Step 3 frontmatter + Step 4 body) against 10 dimensions, then output the optimized version.
Read full prompt: references/step-prompts.md → Section "Step 5".
10-dimension scoring (1-10 each):
| # | Dimension |
|---|
| 1 | Description trigger precision |
| 2 |
Knowledge increment (only AI-unknown content) |
| 3 | Code example quality (runnable, representative) |
| 4 | Anti-pattern coverage (❌/✅ contrast) |
| 5 | Structure clarity |
| 6 | Progressive disclosure (<500 lines) |
| 7 | Tone consistency (imperative throughout) |
| 8 | Edge case handling |
| 9 | Actionability (instructions directly executable) |
| 10 | Completeness (no missing critical content) |
Fix any dimension scoring below 8. Output optimized complete SKILL.md.
Step 6: Resource File Generation
Generate all supporting files planned in Step 2.
Read full prompt: references/step-prompts.md → Section "Step 6".
Rules:
- - Strictly follow Step 2 file plan — no omissions, no extras
- If Step 2 says "no resource files needed" → skip this step
- Every file must be complete — no
... or TODO placeholders - Scripts must include shebang lines
Step 7: Usage Documentation
Generate usage guide with 4 sections:
- 1. Installation (1-3 sentences)
- Trigger examples (at least 5 natural language requests)
- Iteration suggestions (3-5 specific improvement directions)
- Validation checklist (completeness checks with checkboxes)
Read full prompt: references/step-prompts.md → Section "Step 7".
Execution Workflow
When a user requests Skill generation:
- 1. Collect requirement: skill name, target domain, core capabilities, usage scenarios (optional), notes (optional)
- Execute Steps 1-7 sequentially, presenting each step's output to the user
- After Step 5, write the final SKILL.md to disk
- After Step 6, write all resource files to disk
- After Step 7, present the complete skill package
File output structure:
CODEBLOCK1
Quality Gate
Before delivering the final package, verify:
- - [ ] SKILL.md exists with valid YAML frontmatter (name + description)
- [ ] description includes WHAT + WHEN, 30-80 words
- [ ] SKILL.md body < 500 lines
- [ ] All code examples are complete and runnable
- [ ] Anti-patterns use ❌/✅ contrast format
- [ ] Imperative tone throughout
- [ ] All Step 2 planned resource files exist
- [ ] No README.md, CHANGELOG.md, or auxiliary docs
- [ ] No generic knowledge AI already has
- [ ] Directory structure matches Step 2 plan
SkillForge — 智能体技能生成器
通过7步流水线生成完整的、可用于生产环境的智能体技能包。每一步都有明确的输入、输出和质量约束。
核心设计原则
在所有7个步骤中应用以下原则:
- 1. 简洁至上 — 上下文窗口是公共资源。只包含AI模型尚未掌握的知识。质疑每个段落:这段内容值得消耗token吗?
- 描述即触发器 — 决定技能是否被选中。必须包含做什么+何时做。
- 渐进式披露 — SKILL.md不超过500行。按需加载scripts/、references/、templates/中的支持文件。
- 代码示例优于文字 — 优先使用简洁、可运行的示例,而非冗长的描述。
- 反模式至关重要 — 使用❌/✅对比格式展示不该做什么。
- 命令式语气 — 使用运行而非你应该运行。
- 无辅助文件 — 不包含README.md、CHANGELOG.md。技能面向AI智能体,而非人类。
流水线概览
用户需求
→ 步骤1:需求深度分析
→ 步骤2:架构决策
→ 步骤3:元数据(YAML前置元数据)
→ 步骤4:SKILL.md正文
→ 步骤5:质量审计与优化
→ 步骤6:资源文件(scripts/、references/、templates/)
→ 步骤7:使用文档
→ 完整技能包
按顺序执行各步骤。每个步骤基于前一步的输出构建。
步骤1:需求深度分析
分析用户需求。输出结构化文档(2000-5000字符)。
阅读完整步骤提示:references/step-prompts.md → 章节步骤1。
输出结构:
- 1. 核心定位(名称、一句话描述、目标用户、价值主张)
- 功能边界(核心功能以输入→处理→输出三元组形式呈现、扩展功能、排除功能)
- 使用场景(至少5个,每个包含:用户请求、预期行为、输出格式)
- 知识差距分析(最关键):
- AI已知 → 从SKILL.md中排除
- AI未知 → SKILL.md的核心内容
- AI常出错 → 需要反模式示例
- 5. 依赖项与约束
步骤2:架构决策
做出5项关键决策。阅读完整提示:references/step-prompts.md → 章节步骤2。
| 决策 | 选项 |
|---|
| 结构模式 | 工作流 / 任务导向 / 指南 / 能力 |
| 自由度 |
高 / 中 / 低 |
| 资源文件计划 | 文件表格,包含路径、类型、用途、行数 |
| 渐进式披露 | 哪些放入SKILL.md vs references/ vs scripts/ |
| 质量保证 | 验证清单、常见错误、质量标准 |
最后输出完整的目录树。
步骤3:元数据编写
生成包含优化描述的YAML前置元数据。
- 1. 生成3个候选描述
- 对每个描述评分:触发精度(1-5)、能力覆盖度(1-5)、信息密度(1-5)
- 选择得分最高的候选描述
阅读完整提示:references/step-prompts.md → 章节步骤3。
描述质量规则:
- - 30-80字,客观描述性语气
- 必须包含技能做什么以及何时使用
- 每个字都必须有其存在的价值
步骤4:SKILL.md正文生成
生成完整正文(不含前置元数据)。目标:150-450行。
阅读完整提示:references/step-prompts.md → 章节步骤4。
结构(按需调整):
- 1. 概述(2-3句话)
- 核心工作流(编号步骤或决策流程)
- 详细规则与指令(领域特定)
- 代码示例(✅ 正确 / ❌ 错误对比格式)
- 边界情况处理
- 输出格式规范
- 验证清单(Markdown复选框)
关键约束:
- - 不包含AI已有的通用知识
- 不重复描述内容
- 超过100行的章节 → 拆分到references/
- 所有代码示例必须完整且可运行
步骤5:质量审计
从10个维度审计生成的SKILL.md(步骤3前置元数据 + 步骤4正文),然后输出优化版本。
阅读完整提示:references/step-prompts.md → 章节步骤5。
10维度评分(每项1-10分):
知识增量(仅AI未知内容) |
| 3 | 代码示例质量(可运行、有代表性) |
| 4 | 反模式覆盖度(❌/✅对比) |
| 5 | 结构清晰度 |
| 6 | 渐进式披露(<500行) |
| 7 | 语气一致性(全程命令式) |
| 8 | 边界情况处理 |
| 9 | 可操作性(指令可直接执行) |
| 10 | 完整性(无缺失的关键内容) |
修复任何低于8分的维度。输出优化后的完整SKILL.md。
步骤6:资源文件生成
生成步骤2中规划的所有支持文件。
阅读完整提示:references/step-prompts.md → 章节步骤6。
规则:
- - 严格遵循步骤2的文件计划 — 不遗漏、不添加额外文件
- 如果步骤2说不需要资源文件 → 跳过此步骤
- 每个文件必须完整 — 不包含...或TODO占位符
- 脚本必须包含shebang行
步骤7:使用文档
生成包含4个章节的使用指南:
- 1. 安装(1-3句话)
- 触发示例(至少5个自然语言请求)
- 迭代建议(3-5个具体的改进方向)
- 验证清单(带复选框的完整性检查)
阅读完整提示:references/step-prompts.md → 章节步骤7。
执行工作流
当用户请求生成技能时:
- 1. 收集需求:技能名称、目标领域、核心能力、使用场景(可选)、备注(可选)
- 按顺序执行步骤1-7,向用户展示每个步骤的输出
- 步骤5完成后,将最终的SKILL.md写入磁盘
- 步骤6完成后,将所有资源文件写入磁盘
- 步骤7完成后,呈现完整的技能包
文件输出结构:
{技能名称}/
├── SKILL.md
├── scripts/ (如已规划)
├── references/ (如已规划)
└── templates/ (如已规划)
质量关卡
在交付最终技能包前,验证以下内容:
- - [ ] SKILL.md存在且包含有效的YAML前置元数据(名称 + 描述)
- [ ] 描述包含做什么+何时做,30-80字
- [ ] SKILL.md正文不超过500行
- [ ] 所有代码示例完整且可运行
- [ ] 反模式使用❌/✅对比格式
- [ ] 全文使用命令式语气
- [ ] 步骤2规划的所有资源文件均已存在
- [ ] 不包含README.md、CHANGELOG.md或辅助文档
- [ ] 不包含AI已有的通用知识
- [ ] 目录结构与步骤2计划一致