writing-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWriting Skills (Excellence)
编写Skill(卓越级)
Dispatcher for skill creation excellence. Use the decision tree below to find the right template and standards.
这是Skill创建的卓越指导工具,使用下方的决策树来找到合适的模板和标准。
⚡ Quick Decision Tree
⚡ 快速决策树
What do you need to do?
你需要完成什么操作?
-
Create a NEW skill:
- Is it simple (single file, <200 lines)? → Tier 1 Architecture
- Is it complex (multi-concept, 200-1000 lines)? → Tier 2 Architecture
- Is it a massive platform (10+ products, AWS, Convex)? → Tier 3 Architecture
-
Improve an EXISTING skill:
- Fix "it's too long" -> Modularize (Tier 3)
- Fix "AI ignores rules" -> Anti-Rationalization
- Fix "users can't find it" -> CSO (Search Optimization)
-
Verify Compliance:
- Check metadata/naming -> Standards
- Add tests -> Testing Guide
-
创建全新Skill:
- 是否为简单Skill(单文件,少于200行)? → Tier 1架构
- 是否为复杂Skill(多概念,200-1000行)? → Tier 2架构
- 是否为大型平台类Skill(10+产品,涉及AWS、Convex)? → Tier 3架构
-
优化现有Skill:
- 解决「内容过长」问题 → 模块化重构(Tier 3)
- 解决「AI忽略规则」问题 → 反合理化设计
- 解决「用户无法找到Skill」问题 → CSO(搜索优化)
-
合规性验证:
- 检查元数据/命名规范 → 标准规范
- 添加测试 → 测试指南
📚 Component Index
📚 组件索引
| Component | Purpose |
|---|---|
| CSO | "SEO for LLMs". How to write descriptions that trigger. |
| Standards | File naming, YAML frontmatter, directory structure. |
| Anti-Rationalization | How to write rules that agents won't ignore. |
| Testing | How to ensure your skill actually works. |
| 组件 | 用途 |
|---|---|
| CSO | 「LLM版SEO」,指导如何编写能触发Skill的描述。 |
| 标准规范 | 文件命名、YAML前置元数据、目录结构规范。 |
| 反合理化设计 | 指导如何编写Agent不会忽略的规则。 |
| 测试指南 | 指导如何确保Skill实际生效。 |
🛠️ Templates
🛠️ 模板
- Technique Skill (How-to)
- Reference Skill (Docs)
- Discipline Skill (Rules)
- Pattern Skill (Design Patterns)
- 技巧类Skill(操作指南类)
- 参考类Skill(文档类)
- 规则类Skill(规则约束类)
- 模式类Skill(设计模式类)
When to Use
适用场景
- Creating a NEW skill from scratch
- Improving an EXISTING skill that agents ignore
- Debugging why a skill isn't being triggered
- Standardizing skills across a team
- 从零开始创建全新Skill
- 优化Agent会忽略的现有Skill
- 调试Skill无法触发的问题
- 团队内Skill标准化统一
How It Works
工作流程
- Identify goal → Use decision tree above
- Select template → From
references/templates/ - Apply CSO → Optimize description for discovery
- Add anti-rationalization → For discipline skills
- Test → RED-GREEN-REFACTOR cycle
- 明确目标 → 使用上方的决策树
- 选择模板 → 从中选取
references/templates/ - 应用CSO优化 → 优化描述以提升可发现性
- 添加反合理化设计 → 针对规则类Skill
- 测试 → 遵循RED-GREEN-REFACTOR循环
Quick Example
快速示例
yaml
---
name: my-technique
description: Use when [specific symptom occurs].
metadata:
category: technique
triggers: error-text, symptom, tool-name
---yaml
---
name: my-technique
description: Use when [specific symptom occurs].
metadata:
category: technique
triggers: error-text, symptom, tool-name
---My Technique
My Technique
When to Use
When to Use
- [Symptom A]
- [Error message]
undefined- [Symptom A]
- [Error message]
undefinedCommon Mistakes
常见错误
| Mistake | Fix |
|---|---|
| Description summarizes workflow | Use "Use when..." triggers only |
No | Add 3+ keywords |
| Generic name ("helper") | Use gerund ( |
| Long monolithic SKILL.md | Split into |
See gotchas.md for more.
| 错误 | 修复方案 |
|---|---|
| 描述内容总结工作流 | 仅使用「Use when...」格式的触发条件 |
未设置 | 添加3个以上关键词 |
| 名称过于通用(如"helper") | 使用动名词格式(如 |
| SKILL.md内容冗长且单一 | 拆分至 |
更多内容请查看gotchas.md。
✅ Pre-Deploy Checklist
✅ 部署前检查清单
Before deploying any skill:
- field matches directory name exactly
name - filename is ALL CAPS
SKILL.md - Description starts with "Use when..."
- has 3+ keywords
metadata.triggers - Total lines < 500 (use for more)
references/ - No force-loading in cross-references
@ - Tested with real scenarios
部署任何Skill前,请确认:
- 字段与目录名称完全一致
name - 文件名全部为大写
SKILL.md - 描述以"Use when..."开头
- 包含3个以上关键词
metadata.triggers - 总代码行数少于500(内容更多时使用目录)
references/ - 跨引用中未使用强制加载
@ - 已通过真实场景测试
🔗 Related Skills
🔗 相关Skill
- opencode-expert: For OpenCode environment configuration
- Use command for guided skill creation
/write-skill
- opencode-expert: 用于OpenCode环境配置
- 使用命令进行引导式Skill创建
/write-skill
Examples
示例
Create a Tier 1 skill:
bash
mkdir -p ~/.config/opencode/skills/my-technique
touch ~/.config/opencode/skills/my-technique/SKILL.mdCreate a Tier 2 skill:
bash
mkdir -p ~/.config/opencode/skills/my-skill/references/core
touch ~/.config/opencode/skills/my-skill/{SKILL.md,gotchas.md}
touch ~/.config/opencode/skills/my-skill/references/core/README.md创建Tier 1 Skill:
bash
mkdir -p ~/.config/opencode/skills/my-technique
touch ~/.config/opencode/skills/my-technique/SKILL.md创建Tier 2 Skill:
bash
mkdir -p ~/.config/opencode/skills/my-skill/references/core
touch ~/.config/opencode/skills/my-skill/{SKILL.md,gotchas.md}
touch ~/.config/opencode/skills/my-skill/references/core/README.md