skill-forge by sanyuan0704/sanyuan-skills
npx skills add https://github.com/sanyuan0704/sanyuan-skills --skill skill-forge铁律:技能中的每一行都必须证明其令牌成本是合理的。如果它不能让模型的输出更好、更一致或更可靠——就删掉它。
技能是 Claude 的“入职指南”——将其从一个通用智能体转变为一个具备程序性知识、领域专业知识和捆绑工具的专用智能体。
skill-name/
├── SKILL.md # 必需:工作流程 + 指令 (<500 行)
├── scripts/ # 可选:确定性的、可重复的操作
├── references/ # 可选:按需加载到上下文中
└── assets/ # 可选:用于输出,从不加载到上下文中
默认假设:Claude 已经非常聪明。 只添加 Claude 还不知道的内容。质疑每一个段落:“这能证明其令牌成本是合理的吗?”
复制此清单,并在完成项目时勾选:
Skill Forge 进度:
- [ ] 步骤 1:理解技能 ⚠️ 必需
- [ ] 1.1 明确目的和具体用例
- [ ] 1.2 收集 3+ 个具体使用示例
- [ ] 1.3 识别触发场景和关键词
- [ ] 步骤 2:规划架构
- [ ] 2.1 识别可重用资源(脚本、参考资料、资产)
- [ ] 2.2 设计渐进式加载策略
- [ ] 2.3 设计参数系统(如果适用)
- [ ] 步骤 3:初始化 ⛔ 阻塞(如果技能已存在则跳过)
- [ ] 运行 init_skill.py
- [ ] 步骤 4:撰写描述
- [ ] 加载 references/description-guide.md
- [ ] 应用关键词轰炸技术
- [ ] 步骤 5:撰写 SKILL.md 正文
- [ ] 5.1 设定铁律
- [ ] 5.2 设计工作流程清单
- [ ] 5.3 添加确认关卡
- [ ] 5.4 添加参数系统(如果适用)
- [ ] 5.5 应用写作技巧
- [ ] 5.6 添加反模式列表
- [ ] 5.7 添加交付前检查清单
- [ ] 步骤 6:构建资源
- [ ] 6.1 实现并测试脚本
- [ ] 6.2 编写参考文件
- [ ] 6.3 准备资产
- [ ] 步骤 7:审查 ⚠️ 必需
- [ ] 运行交付前检查清单(步骤 9)
- [ ] 向用户展示摘要以进行确认
- [ ] 步骤 8:打包
- [ ] 运行 package_skill.py
- [ ] 步骤 9:根据实际使用情况进行迭代
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
问自己:
如果不清楚,询问用户(不要一次性问完所有问题——从最关键的开始):
在获得至少 3 个具体示例之前,请勿继续。
针对每个具体示例,询问:
scripts/references/assets/关键约束:
references/如果正在处理现有技能,请跳过此步。否则运行:
python3 scripts/init_skill.py <skill-name> --path <output-directory>
该脚本会创建一个包含铁律占位符、工作流程清单和正确目录结构的模板。
这是技能中最被低估的部分。描述决定了:
加载 references/description-guide.md 以了解关键词轰炸技术和好/坏示例。
关键规则:永远不要在 SKILL.md 正文中放入“何时使用”的信息。正文在触发后才加载——为时已晚。
根据需要为每个子步骤加载参考文件:
提问:“模型在使用此技能时最可能犯的一个错误是什么?” 编写一条规则来防止它。将其放在 SKILL.md 的顶部,紧接在前置元数据之后。
→ 加载 references/writing-techniques.md 以了解铁律模式和危险信号。
创建一个可追踪的清单,包含:
→ 加载 references/workflow-patterns.md 以了解清单模式和示例。
强制模型在以下操作之前停下来询问用户:
→ 加载 references/workflow-patterns.md 以了解确认关卡模式。
如果技能受益于像 --quick、--style、--regenerate N 这样的标志:
→ 加载 references/parameter-system.md 以了解 $ARGUMENTS、标志、argument-hint 和部分执行模式。
三种能显著提高输出质量的技巧:
→ 加载 references/writing-techniques.md 以获取所有三种技巧的示例。
提问:“Claude 对此任务的懒惰默认做法会是什么样?” 然后明确禁止它。
→ 加载 references/writing-techniques.md 以获取反模式示例。
添加具体的、可验证的检查项。每个项目必须足够具体,以便模型可以通过查看输出来检查它。不是“确保良好质量”,而是“没有剩余的占位符文本(TODO、FIXME、xxx)”。
→ 加载 references/output-patterns.md 以了解清单模式和基于优先级的输出。
→ 加载 references/architecture-guide.md 以获取详细模式。
向用户展示技能摘要并在打包前进行确认。
name 和 description(加上可选的 allowed-tools、license、metadata)python3 scripts/package_skill.py <path/to/skill-folder> [output-directory]
打包前自动验证。修复错误并重新运行。
在实际使用后:
每周安装数
441
代码仓库
GitHub 星标数
2.9K
首次出现
2026年3月2日
安全审计
安装于
cursor430
opencode430
codex429
gemini-cli428
github-copilot428
amp427
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.
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?"
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
Ask yourself:
If unclear, ask the user (don't ask everything at once — start with the most critical):
Do NOT proceed until you have at least 3 concrete examples.
For each concrete example, ask:
scripts/references/assets/Key constraints:
references/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.
This is the most underestimated part of a skill. The description determines:
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.
Load reference files as needed for each sub-step:
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.
Create a trackable checklist with:
→ Load references/workflow-patterns.md for checklist patterns and examples.
Force the model to stop and ask the user before:
→ Load references/workflow-patterns.md for confirmation gate patterns.
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.
Three techniques that dramatically improve output quality:
→ Load references/writing-techniques.md for all three with examples.
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.
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.
→ Load references/architecture-guide.md for detailed patterns.
Present the skill summary to the user and confirm before packaging.
name and description only (plus optional allowed-tools, license, metadata)python3 scripts/package_skill.py <path/to/skill-folder> [output-directory]
Validates automatically before packaging. Fix errors and re-run.
After real usage:
Weekly Installs
441
Repository
GitHub Stars
2.9K
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor430
opencode430
codex429
gemini-cli428
github-copilot428
amp427
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装