skill-capture
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Capture
Skill 捕获
This skill extracts valuable learnings, patterns, and workflows from conversations and persists them as reusable skill files for future sessions.
此Skill可从对话中提取有价值的经验、模式和工作流,并将其保存为可复用的Skill文件,供后续会话使用。
When This Skill Activates
此Skill的激活场景
Activate when the user mentions ANY of these:
当用户提及以下任意内容时激活:
Explicit Requests
明确请求
- "let's save this as a skill"
- "this workflow should be reusable"
- "capture this as a skill"
- "make this a skill"
- "turn this into a skill"
- "save this pattern"
- "我们把这个保存为Skill吧"
- "这个工作流应该可以复用"
- "把这个捕获为Skill"
- "把这个做成Skill"
- "把这个转换成Skill"
- "保存这个模式"
Workflow Completion Signals
工作流完成信号
- Complex problem solved after multiple iterations
- Multi-step procedure successfully executed
- Valuable domain knowledge discovered through research
- Code pattern emerged that could benefit other projects
- 经过多次迭代后解决了复杂问题
- 成功执行多步骤流程
- 通过研究发现有价值的领域知识
- 出现可用于其他项目的代码模式
Learning Moments
学习时刻
- "this was tricky to figure out"
- "glad we finally got this working"
- "I wish I knew this earlier"
- "this should be documented"
- "这个真难搞懂"
- "很高兴我们终于搞定了"
- "我要是早点知道这个就好了"
- "这个应该被记录下来"
Capture Process
捕获流程
Follow these 5 phases in order:
按顺序遵循以下5个阶段:
Phase 1: Identification
阶段1:识别
Review the conversation to identify capturable content:
What to Look For:
| Category | Example |
|---|---|
| Workflows | Multi-step procedures that took iterations to perfect |
| Domain Knowledge | Information requiring research or expertise |
| Problem Solutions | Approaches that resolved complex issues |
| Code Patterns | Reusable patterns that could help other projects |
| Decision Rationale | Architectural choices with clear reasoning |
Questions to Ask:
- Is this generalizable beyond this specific project?
- Would another Claude instance benefit from this knowledge?
- Did this require multiple iterations to get right?
- Is this non-obvious procedural knowledge?
回顾对话以确定可捕获的内容:
需要寻找的内容:
| 类别 | 示例 |
|---|---|
| 工作流 | 经过多次迭代完善的多步骤流程 |
| 领域知识 | 需要研究或专业知识的信息 |
| 问题解决方案 | 解决复杂问题的方法 |
| 代码模式 | 可用于其他项目的复用模式 |
| 决策依据 | 有明确理由的架构选择 |
需要询问的问题:
- 这是否能推广到该特定项目之外?
- 其他Claude实例是否会从这些知识中受益?
- 这是否需要多次迭代才能正确完成?
- 这是否是非显而易见的流程知识?
Phase 2: Destination Planning
阶段2:目标规划
Determine where the skill should live:
1. Check if an existing skill should be updated
- Glob for skills/*/SKILL.md
- Read related skills to check for overlap
2. If creating new skill:
- Choose descriptive kebab-case name
- Create in skills/<skill-name>/ directorySkill vs. Rule Decision:
| Create a Skill | Capture a Rule |
|---|---|
| Workflow with multiple steps | Single preference statement |
| Procedural knowledge | "always/never do X" |
| Domain expertise | Style/format preferences |
| Code patterns with context | Import/naming conventions |
If it's a rule/preference, delegate to skill instead.
rules-capture确定Skill的存储位置:
1. 检查是否应更新现有Skill
- 遍历 skills/*/SKILL.md
- 阅读相关Skill以检查是否存在重叠
2. 如果创建新Skill:
- 选择描述性的短横线命名法(kebab-case)名称
- 在 skills/<skill-name>/ 目录下创建Skill与规则的决策:
| 创建Skill | 捕获规则 |
|---|---|
| 多步骤工作流 | 单一偏好声明 |
| 流程知识 | "始终/绝不做X" |
| 领域专业知识 | 样式/格式偏好 |
| 带上下文的代码模式 | 导入/命名约定 |
如果是规则/偏好,请转而使用 Skill。
rules-capturePhase 3: Content Drafting
阶段3:内容起草
Transform conversational insights into SKILL.md format:
markdown
---
name: <skill-name>
description: <One sentence describing what the skill does and when to use it>
version: 1.0.0
tags:
- <relevant>
- <tags>
---将会话见解转换为SKILL.md格式:
markdown
---
name: <skill-name>
description: <一句话描述此Skill的功能及使用场景>
version: 1.0.0
tags:
- <相关标签>
- <相关标签>
---<Skill Title>
<Skill标题>
<Brief description of the skill's purpose>
<Skill用途的简要描述>
When to Use
使用场景
<Clear triggers for when this skill should activate>
<明确的激活触发条件>
Process
流程
<Step-by-step workflow or procedure>
<分步工作流或流程>
Examples
示例
<Concrete examples showing the skill in action>
<展示Skill实际应用的具体示例>
Integration
集成
<How this skill works with other skills, if applicable>
undefined<此Skill如何与其他Skill配合使用(如适用)>
undefinedPhase 4: Distillation
阶段4:提炼
Extract and refine the content:
- Extract the Final Approach - Capture only what worked, not the failed attempts
- Generalize - Remove project-specific details that don't apply broadly
- Add Context - Explain why certain approaches work, not just what to do
- Include Examples - Add concrete examples that demonstrate usage
Checklist:
- Removed project-specific paths and names
- Generalized any hardcoded values
- Added explanatory context for non-obvious steps
- Included both good and bad examples where helpful
- Kept language in imperative form
提取并优化内容:
- 提取最终方法 - 仅捕获有效的内容,而非失败的尝试
- 通用化 - 删除不适用于广泛场景的项目特定细节
- 添加上下文 - 解释某些方法有效的原因,而不只是说明要做什么
- 包含示例 - 添加展示用法的具体示例
检查清单:
- 移除了项目特定的路径和名称
- 通用化了所有硬编码值
- 为非显而易见的步骤添加了解释性上下文
- 酌情包含了好的和坏的示例
- 采用命令式语言(“执行X”而非“你应该执行X”)
Phase 5: Verification
阶段5:验证
Ensure the skill is ready for use:
Quality Checks:
| Check | Requirement |
|---|---|
| Length | Under 500 lines (use references/ for large content) |
| Frontmatter | Valid YAML with name and description |
| Completeness | All sections have meaningful content |
| Actionability | Instructions are specific enough to follow |
| Formatting | Follows library patterns (see rules-capture for reference) |
Validation:
bash
undefined确保Skill已准备好使用:
质量检查:
| 检查项 | 要求 |
|---|---|
| 长度 | 少于500行(大内容使用 references/ 目录) |
| 前置元数据 | 包含名称和描述的有效YAML |
| 完整性 | 所有部分都有有意义的内容 |
| 可操作性 | 说明足够具体,可遵循 |
| 格式 | 遵循库模式(参考rules-capture) |
验证:
bash
undefinedRun the package script to validate
运行包脚本进行验证
scripts/package_skill.py skills/<skill-name>
---scripts/package_skill.py skills/<skill-name>
---What to Capture
要捕获的内容
Good Candidates
合适的候选内容
- Workflows that took multiple iterations to get right
- Domain knowledge that required research
- Problem-solving approaches that worked
- Code patterns that could be reused across projects
- Decision rationale for architectural choices
- Integration patterns between tools or services
- Debugging approaches for specific technologies
- 经过多次迭代才完善的工作流
- 需要研究的领域知识
- 有效的问题解决方法
- 可跨项目复用的代码模式
- 架构选择的决策依据
- 工具或服务之间的集成模式
- 特定技术的调试方法
Anti-Patterns (Do NOT Capture)
反模式(请勿捕获)
- One-off solutions specific to a single project
- Trivial fixes or obvious patterns
- Information already documented elsewhere
- Sensitive or proprietary information
- Incomplete workflows still being refined
- Preferences without procedural value (use rules-capture instead)
- 特定于单个项目的一次性解决方案
- 微不足道的修复或明显的模式
- 已在其他地方记录的信息
- 敏感或专有信息
- 仍在完善中的不完整工作流
- 无流程价值的偏好(改用rules-capture)
Output Structure
输出结构
Create two files for each skill:
为每个Skill创建两个文件:
SKILL.md
SKILL.md
See Phase 3 template above. Key principles:
- Use imperative form ("Do X" not "You should do X")
- Be specific about triggers and activation conditions
- Include concrete examples
- Reference any bundled resources
见阶段3的模板。核心原则:
- 采用命令式语言(“执行X”而非“你应该执行X”)
- 明确说明触发条件和激活场景
- 包含具体示例
- 引用任何捆绑的资源
plugin.json
plugin.json
json
{
"name": "<skill-name>",
"version": "1.0.0",
"description": "<Same description as SKILL.md frontmatter>",
"author": {
"name": "Ship Shit Dev",
"email": "hello@shipshit.dev",
"url": "https://github.com/shipshitdev"
},
"license": "MIT",
"skills": "."
}json
{
"name": "<skill-name>",
"version": "1.0.0",
"description": "<与SKILL.md前置元数据中的描述相同>",
"author": {
"name": "Ship Shit Dev",
"email": "hello@shipshit.dev",
"url": "https://github.com/shipshitdev"
},
"license": "MIT",
"skills": "."
}Integration
集成
This skill works with:
| Skill | Integration |
|---|---|
| Delegates preference capture; handles skill creation |
| Skills captured during session are noted |
| Uses creation patterns and validation |
| For formatting help with SKILL.md |
此Skill可与以下Skill配合使用:
| Skill | 集成方式 |
|---|---|
| 委托偏好捕获;处理Skill创建 |
| 记录会话中捕获的Skill |
| 使用创建模式和验证 |
| 提供SKILL.md的格式帮助 |
Example Interaction
示例交互
Context: User spent 30 minutes debugging a NestJS queue integration issue. The solution involved specific configuration patterns.
User: "This was a pain to figure out. Let's save this for next time."
Claude:
I'll capture this as a skill. Let me analyze what we learned:
Capturable Knowledge:
- NestJS Bull queue configuration pattern
- Redis connection handling for queues
- Processor registration requirements
This would make a good standalone skill or could extend `nestjs-queue-architect`.
Let me check the existing skill...
[Reads skills/nestjs-queue-architect/SKILL.md]
The existing skill covers queue setup but not this specific debugging pattern.
I'll add a new "Troubleshooting" section.
Created: skills/nestjs-queue-architect/SKILL.md (updated)
- Added troubleshooting section
- Documented Redis connection requirements
- Added common error patterns
Should I also create session documentation for this debugging session?背景:用户花费30分钟调试NestJS队列集成问题。解决方案涉及特定的配置模式。
用户:"这个真难搞,我们把这个保存下来下次用吧。"
Claude:
我会把这个捕获为Skill。让我分析一下我们学到的内容:
可捕获的知识:
- NestJS Bull队列配置模式
- 队列的Redis连接处理
- 处理器注册要求
这可以做成一个独立的Skill,或者扩展`nestjs-queue-architect`。
让我检查现有的Skill...
[读取 skills/nestjs-queue-architect/SKILL.md]
现有Skill涵盖了队列设置,但未包含这个特定的调试模式。
我会添加一个新的“故障排除”部分。
已创建:skills/nestjs-queue-architect/SKILL.md(已更新)
- 添加了故障排除部分
- 记录了Redis连接要求
- 添加了常见错误模式
我是否也需要为这次调试会话创建会话文档?Activation Triggers
激活触发器
The skill activates on these patterns:
regex
undefined此Skill在以下模式下激活:
regex
undefinedExplicit capture requests
明确的捕获请求
(save|capture|turn|make).(skill|reusable|pattern)
(this should be|let's make this).(skill|documented|reusable)
(save|capture|turn|make).(skill|reusable|pattern)
(this should be|let's make this).(skill|documented|reusable)
Workflow completion signals
工作流完成信号
(finally|glad).(working|figured|solved)
(this was|that was).(tricky|hard|difficult|complex)
(multiple|several).*(iterations|attempts|tries)
(finally|glad).(working|figured|solved)
(this was|that was).(tricky|hard|difficult|complex)
(multiple|several).*(iterations|attempts|tries)
Learning signals
学习信号
(wish I knew|should have known|next time|for future)
---
**When this skill is active**, automatically identify valuable knowledge from the conversation and offer to persist it as reusable skills for future sessions.(wish I knew|should have known|next time|for future)
---
**当此Skill处于激活状态时**,会自动从对话中识别有价值的知识,并主动提出将其保存为可复用的Skill,供后续会话使用。