Agent 生成器
- 作者仓库星标 3,526
- 作者更新于 实时读取
- 作者仓库 sanyuan-skills
- 领域
- 设计与多媒体
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @sanyuan0704 · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-forge
description: Create high-quality, production-grade skills for Claude Code. Expert guidance on skill architect…
category: 设计与多媒体
runtime: 无特殊运行时
---
# skill-forge 输出预览
## PART A: 任务判断
- 适用问题:视觉内容、演示材料、信息图或设计交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“What is a Skill / Workflow / Step 1: Understand the Skill ⚠️ REQUIRED”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于视觉内容、演示材料、信息图或设计交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“What is a Skill / Workflow / Step 1: Understand the Skill ⚠️ REQUIRED”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“What is a Skill / Workflow / Step 1: Understand the Skill ⚠️ REQUIRED”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-forge
description: Create high-quality, production-grade skills for Claude Code. Expert guidance on skill architect…
category: 设计与多媒体
source: sanyuan0704/sanyuan-skills
---
# skill-forge
## 什么时候使用
- 把设计与视觉方向的常用动作沉淀成 Agent 可调用的技能 适合处理界面、视觉、封面、信息图或演示材料交付,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向视觉内容、演示材料、信息图或设计交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「What is a Skill / Workflow / Step 1: Understand the Skill ⚠️ REQUIRED」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-forge" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> What is a Skill / Workflow / Step 1: Understand the Skill ⚠️ REQUIRED
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skill Forge
IRON LAW: Every line in a skill must justify its token cost. If it doesn't make the model's output better, more consistent, or more reliable — cut it.
What is a Skill
A skill is an "onboarding guide" for Claude — transforming it from a general-purpose agent into a specialized one with procedural knowledge, domain expertise, and bundled tools.
skill-name/
├── SKILL.md # Required: workflow + instructions (<500 lines)
├── scripts/ # Optional: deterministic, repeatable operations
├── references/ # Optional: loaded into context on demand
└── assets/ # Optional: used in output, never loaded into context
Default assumption: Claude is already very smart. Only add what Claude doesn't already know. Challenge every paragraph: "Does this justify its token cost?"
Workflow
Copy this checklist and check off items as you complete them:
Skill Forge Progress:
- [ ] Step 1: Understand the Skill ⚠️ REQUIRED
- [ ] 1.1 Clarify purpose and concrete use cases
- [ ] 1.2 Collect 3+ concrete usage examples
- [ ] 1.3 Identify trigger scenarios and keywords
- [ ] Step 2: Plan Architecture
- [ ] 2.1 Identify reusable resources (scripts, references, assets)
- [ ] 2.2 Design progressive loading strategy
- [ ] 2.3 Design parameter system (if applicable)
- [ ] Step 3: Initialize ⛔ BLOCKING (skip if skill already exists)
- [ ] Run init_skill.py
- [ ] Step 4: Write Description
- [ ] Load references/description-guide.md
- [ ] Apply keyword bombing technique
- [ ] Step 5: Write SKILL.md Body
- [ ] 5.1 Set Iron Law
- [ ] 5.2 Design workflow checklist
- [ ] 5.3 Add confirmation gates
- [ ] 5.4 Add parameter system (if applicable)
- [ ] 5.5 Apply writing techniques
- [ ] 5.6 Add anti-patterns list
- [ ] 5.7 Add pre-delivery checklist
- [ ] Step 6: Build Resources
- [ ] 6.1 Implement and test scripts
- [ ] 6.2 Write reference files
- [ ] 6.3 Prepare assets
- [ ] Step 7: Review ⚠️ REQUIRED
- [ ] Run pre-delivery checklist (Step 9)
- [ ] Present summary to user for confirmation
- [ ] Step 8: Package
- [ ] Run package_skill.py
- [ ] Step 9: Iterate based on real usage
Step 1: Understand the Skill ⚠️ REQUIRED
Ask yourself:
- What specific problem does this skill solve that Claude can't do well on its own?
- What would a user literally type to trigger this skill?
- What are 3-5 concrete usage examples with realistic inputs and expected outputs?
If unclear, ask the user (don't ask everything at once — start with the most critical):
- "Can you give me 3 examples of how you'd use this skill?"
- "What would you literally say to trigger it?"
- "What does a good output look like?"
Do NOT proceed until you have at least 3 concrete examples.
Step 2: Plan Architecture
For each concrete example, ask:
- What operations are deterministic and repeatable? →
scripts/ - What domain knowledge does Claude need at specific steps? →
references/ - What files are used in output but not in reasoning? →
assets/
Key constraints:
- SKILL.md must stay under 500 lines — everything else goes to
references/ - References organized by domain, one level of nesting only
- Load references/architecture-guide.md for progressive loading patterns and organization strategies
Step 3: Initialize ⛔ BLOCKING
Skip if working on an existing skill. Otherwise run:
python3 scripts/init_skill.py <skill-name> --path <output-directory>
The script creates a template with Iron Law placeholder, workflow checklist, and proper directory structure.
Step 4: Write Description
This is the most underestimated part of a skill. The description determines:
- Whether the skill triggers automatically
- Whether users find it by search
Load references/description-guide.md for the keyword bombing technique and good/bad examples.
Key rule: NEVER put "When to Use" info in the SKILL.md body. The body loads AFTER triggering — too late.
Step 5: Write SKILL.md Body
Load reference files as needed for each sub-step:
5.1 Set Iron Law
Ask: "What is the ONE mistake the model will most likely make with this skill?" Write a rule that prevents it. Place it at the top of SKILL.md, right after the frontmatter.
→ Load references/writing-techniques.md for Iron Law patterns and red flag signals.
5.2 Design Workflow Checklist
Create a trackable checklist with:
- ⚠️ REQUIRED for steps that must not be skipped
- ⛔ BLOCKING for prerequisites
- Sub-step nesting for complex steps
- (conditional) for steps that depend on earlier choices
→ Load references/workflow-patterns.md for checklist patterns and examples.
5.3 Add Confirmation Gates
Force the model to stop and ask the user before:
- Destructive operations (delete, overwrite, modify)
- Generative operations with significant cost
- Applying changes based on analysis
→ Load references/workflow-patterns.md for confirmation gate patterns.
5.4 Add Parameter System (if applicable)
If the skill benefits from flags like --quick, --style, --regenerate N:
→ Load references/parameter-system.md for $ARGUMENTS, flags, argument-hint, and partial execution patterns.
5.5 Apply Writing Techniques
Three techniques that dramatically improve output quality:
- Question-style instructions: Give questions, not vague directives
- Anti-pattern documentation: List what NOT to do
- Iron Law + Red Flags: Prevent the model from taking shortcuts
→ Load references/writing-techniques.md for all three with examples.
5.6 Add Anti-Patterns List
Ask: "What would Claude's lazy default look like for this task?" Then explicitly forbid it.
→ Load references/writing-techniques.md for anti-pattern examples.
5.7 Add Pre-Delivery Checklist
Add concrete, verifiable checks. Each item must be specific enough that the model can check it by looking at the output. Not "ensure good quality" but "no placeholder text remaining (TODO, FIXME, xxx)."
→ Load references/output-patterns.md for checklist patterns and priority-based output.
Writing Principles
- Concise: Only add what Claude doesn't already know
- Imperative form: "Analyze the input" not "You should analyze the input"
- Match freedom to fragility: Narrow bridge → specific guardrails; open field → many routes
- High freedom (text): multiple valid approaches
- Medium (pseudocode/params): preferred pattern, some variation OK
- Low (specific scripts): fragile operations, consistency critical
Step 6: Build Resources
Scripts
- Encapsulate deterministic, repeatable operations
- Scripts execute without loading into context — major token savings
- Test every script before packaging
- In SKILL.md, document only the command and arguments, not the source code
References
- Organize by domain, not by type
- One level of nesting only
- Each file referenced from SKILL.md with clear "when to load" instructions
- Large files (>100 lines) should have a table of contents at the top
Assets
- Templates, images, fonts used in output
- Not loaded into context, just referenced by path
→ Load references/architecture-guide.md for detailed patterns.
Step 7: Review ⚠️ REQUIRED
Present the skill summary to the user and confirm before packaging.
Pre-Delivery Checklist
Structure
- SKILL.md under 500 lines
- Frontmatter has
nameanddescriptiononly (plus optionalallowed-tools,license,metadata) - Description includes trigger keywords and usage scenarios
- No README.md, CHANGELOG.md, or other unnecessary files
- No example/placeholder files left from initialization
Quality
- Has an Iron Law or core constraint at the top
- Has a trackable workflow checklist with ⚠️/⛔ markers
- Confirmation gates before destructive/generative operations
- Uses question-style instructions, not vague directives
- Lists anti-patterns (what NOT to do)
- References loaded progressively, not all upfront
Resources
- Scripts tested and executable
- References organized by domain, one level deep
- Large references have table of contents
- Assets used in output, not loaded into context
Anti-Patterns to Avoid
- Stuffing everything into one massive SKILL.md (>500 lines)
- Vague description like "A tool for X"
- No workflow — letting the model freestyle
- No confirmation gates — model runs unchecked to completion
- Vague instructions like "ensure good quality" instead of specific checks
- Including README.md, INSTALLATION_GUIDE.md, or other documentation files
- "When to Use" info in the body instead of the description field
Step 8: Package
python3 scripts/package_skill.py <path/to/skill-folder> [output-directory]
Validates automatically before packaging. Fix errors and re-run.
Step 9: Iterate
After real usage:
- Notice where the model struggles or is inconsistent
- Identify which workflow step needs improvement
- Add more specific instructions, examples, or anti-patterns
- Re-test and re-package
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核