技能化
- 作者仓库星标 238
- 作者仓库 dotfiles
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @fredrikaverpil · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:分析会话
在提出任何问题之前,分析对话历史记录以识别: 执行了哪些可重复的流程 输入/参数是什么 不同的步骤(按顺序) 成功的工件/标准(例如,不仅仅是“编写代码”,而是“开放的 PR”
第 2 步:采访用户
您将使用 AskUserQuestion 来了解用户想要自动化什么。重要提示:使用 AskUserQuestion 解决所有问题!切勿通过纯文本提问。对于每一轮,根据需要进行迭代,直到用户满意为止。用户总是有一个自由形式的“其他”选项来输入编辑或反馈——做
第3步:编写SKILL.md
在用户在第 2 轮中选择的位置创建技能目录和文件。使用以下格式:每步骤注释:每个步骤都需要成功标准。这有助于模型了解用户对工作流程的期望,以及何时应该有
第四步:确认并保存
根据官方文档查看技能。使用`skill-creator`技能来评估它。在写入文件之前,将完整的 SKILL.md 内容作为响应中的 yaml 代码块输出,以便用户可以使用正确的语法查看它
# Skillify
You are capturing this session's repeatable process as a reusable skill.
## Your Session Context
You have the full conversation history available to you. Analyze it directly to
understand what process was performed, what tools were used, and how the user
steered you.
If a description was provided: The user described this process as:
"$description"
## Your Task
### Step 1: Analyze the Session
Before asking any questions, analyze the conversation history to identify:
- What repeatable process was performed
- What the inputs/parameters were
- The distinct steps (in order)
- The success artifacts/criteria (e.g. not just "writing code," but "an open PR
with CI fully passing") for each step
- Where the user corrected or steered you
- What tools and permissions were needed
- What agents were used
- What the goals and success artifacts were
### Step 2: Interview the User
You will use AskUserQuestion to understand what the user wants to automate.
Important notes:
- Use AskUserQuestion for ALL questions! Never ask questions via plain text.
- For each round, iterate as much as needed until the user is happy.
- The user always has a freeform "Other" option to type edits or feedback -- do
NOT add your own "Needs tweaking" or "I'll provide edits" option. Just offer
the substantive choices.
**Round 1: High level confirmation**
- Suggest a name and description for the skill based on your analysis. Ask the
user to confirm or rename.
- Suggest high-level goal(s) and specific success criteria for the skill.
**Round 2: More details**
- Present the high-level steps you identified as a numbered list. Tell the user
you will dig into the detail in the next round.
- If you think the skill will require arguments, suggest arguments based on what
you observed. Make sure you understand what someone would need to provide.
- If it's not clear, ask if this skill should run inline (in the current
conversation) or forked (as a sub-agent with its own context). Forked is
better for self-contained tasks that don't need mid-process user input; inline
is better when the user wants to steer mid-process.
- Ask where the skill should be saved. Suggest a default based on context
(repo-specific workflows -> repo, cross-repo personal workflows -> user).
Options:
- **This repo** (`.claude/skills/<name>/SKILL.md`) -- for workflows specific
to this project
- **Personal** (`~/.claude/skills/<name>/SKILL.md`) -- follows you across all
repos
**Round 3: Breaking down each step** For each major step, if it's not glaringly
obvious, ask:
- What does this step produce that later steps need? (data, artifacts, IDs)
- What proves that this step succeeded, and that we can move on?
- Should the user be asked to confirm before proceeding? (especially for
irreversible actions like merging, sending messages, or destructive
operations)
- Are any steps independent and could run in parallel? (e.g., posting to Slack
and monitoring CI at the same time)
- How should the skill be executed? (e.g. always use a Task agent to conduct
code review, or invoke an agent team for a set of concurrent steps)
- What are the hard constraints or hard preferences? Things that must or must
not happen?
You may do multiple rounds of AskUserQuestion here, one round per step,
especially if there are more than 3 steps or many clarification questions.
Iterate as much as needed.
IMPORTANT: Pay special attention to places where the user corrected you during
the session, to help inform your design.
**Round 4: Final questions**
- Confirm when this skill should be invoked, and suggest/confirm trigger phrases
too. (e.g. For a cherrypick workflow you could say: Use when the user wants to
cherry-pick a PR to a release branch. Examples: 'cherry-pick to release', 'CP
this PR', 'hotfix.')
- You can also ask for any other gotchas or things to watch out for, if it's
still unclear.
Stop interviewing once you have enough information. IMPORTANT: Don't over-ask
for simple processes!
### Step 3: Write the SKILL.md
Create the skill directory and file at the location the user chose in Round 2.
Use this format:
```markdown
---
name: { { skill-name } }
description: { { one-line description } }
allowed-tools: { { list of tool permission patterns observed during session } }
when_to_use:
{
{
detailed description of when Claude should automatically invoke this skill,
including trigger phrases and example user messages,
},
}
argument-hint: "{{hint showing argument placeholders}}"
arguments: { { list of argument names } }
context: { { inline or fork -- omit for inline } }
---
# {{Skill Title}}
Description of skill
## Inputs
- `$arg_name`: Description of this input
## Goal
Clearly stated goal for this workflow. Best if you have clearly defined
artifacts or criteria for completion.
## Steps
### 1. Step Name
What to do in this step. Be specific and actionable. Include commands when
appropriate.
**Success criteria**: ALWAYS include this! This shows that the step is done and
we can move on. Can be a list.
IMPORTANT: see the next section below for the per-step annotations you can
optionally include for each step.
...
```
**Per-step annotations**:
- **Success criteria** is REQUIRED on every step. This helps the model
understand what the user expects from their workflow, and when it should have
the confidence to move on.
- **Execution**: `Direct` (default), `Task agent` (straightforward subagents),
`Teammate` (agent with true parallelism and inter-agent communication), or
`[human]` (user does it). Only needs specifying if not Direct.
- **Artifacts**: Data this step produces that later steps need (e.g., PR number,
commit SHA). Only include if later steps depend on it.
- **Human checkpoint**: When to pause and ask the user before proceeding.
Include for irreversible actions (merging, sending messages), error judgment
(merge conflicts), or output review.
- **Rules**: Hard rules for the workflow. User corrections during the reference
session can be especially useful here.
**Step structure tips:**
- Steps that can run concurrently use sub-numbers: 3a, 3b
- Steps requiring the user to act get `[human]` in the title
- Keep simple skills simple -- a 2-step skill doesn't need annotations on every
step
**Frontmatter rules:**
- `allowed-tools`: Minimum permissions needed (use patterns like `Bash(gh:*)`
not `Bash`)
- `context`: Only set `context: fork` for self-contained skills that don't need
mid-process user input.
- `when_to_use` is CRITICAL -- tells the model when to auto-invoke. Start with
"Use when..." and include trigger phrases. Example: "Use when the user wants
to cherry-pick a PR to a release branch. Examples: 'cherry-pick to release',
'CP this PR', 'hotfix'."
- `arguments` and `argument-hint`: Only include if the skill takes parameters.
Use `$name` in the body for substitution.
### Step 4: Confirm and Save
Review the skill against the
[official documentation](https://code.claude.com/docs/en/skills). Use the
`skill-creator` skill to evaluate it.
Before writing the file, output the complete SKILL.md content as a yaml code
block in your response so the user can review it with proper syntax
highlighting. Then ask for confirmation using AskUserQuestion with a simple
question like "Does this SKILL.md look good to save?" -- do NOT use the body
field, keep the question concise.
After writing, tell the user:
- Where the skill was saved
- How to invoke it: `/{{skill-name}} [arguments]`
- That they can edit the SKILL.md directly to refine it
章节与文件索引
按说明文件中的顺序排列。
您的会话上下文
第 1 步:分析会话
第 2 步:采访用户
第3步:编写SKILL.md
第四步:确认并保存
文件/命令 -> .claude/skills/<name>/SKILL.md · ~/.claude/skills/<name>/SKILL.md · $arg_name · Direct · Task agent · Teammate · [human] · allowed-tools
内容校验值 -> de6b9322144b
当前原文的自动摘译,尚未人工审校。
您的会话上下文
您拥有完整的对话历史记录。直接分析它以了解执行了哪些流程、使用了哪些工具以及用户如何引导您。如果提供了描述:用户将此过程描述为:“$description”