skill-recap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Recap
Skill 回顾
Look back over one or more sessions and work out how the agent and its sub-agents used their skills: where a skill helped the work, and where a skill, or a missing one, cost the session. End the recap with findings, each backed by evidence from the transcripts, and a verdict.
回顾一个或多个会话,弄清 Agent 及其子 Agent 如何使用 Skill:Skill 在何处帮助了工作,又在何处拖累了工作或因缺失而造成成本。最后为这次回顾提供发现,每项发现都要有会话记录中的证据支持,并给出结论。
Parameters
参数
- : the user's own skills repo on GitHub, as
<skills-repo>.owner/repo
- :用户在 GitHub 上的自有 Skill 仓库,格式为
<skills-repo>。owner/repo
1. Select the sessions
1. 选择会话
- By default, cover the current session and every sub-agent it spawned, at any depth. The session itself is in your context. Sub-agents ran in their own contexts, so read their transcripts from disk.
- When part of the session was compacted away: read its transcript for the missing stretch.
- When the user names a scope such as a time window, a project or a list of sessions, use exactly that scope, sub-agents included.
- When the scope can be read more than one way, such as which projects a time window covers: ask before reading.
- 默认情况下,覆盖当前会话及其衍生出的所有子 Agent,不限层级。当前会话本身就在你的上下文中。子 Agent 在各自的上下文中运行,因此需要从磁盘读取它们的会话记录。
- **当会话的一部分被压缩掉时:**读取其会话记录,以补全缺失的上下文。
- 当用户指定范围时,例如时间窗口、项目或会话列表,严格按该范围执行,并包含子 Agent。
- **当范围存在多种解读时,**例如某个时间窗口涵盖哪些项目:读取前先询问。
Where transcripts live
会话记录的位置
Claude Code keeps transcripts as files with one JSON object per line, laid out as below. The layout can change between versions, so when a path doesn't resolve, search for the session id.
~/.claude/projects/text
~/.claude/projects/<project>/ <project>: the session's working directory, with / and . turned into -
<session-id>.jsonl the main session
<session-id>/subagents/agent-<id>.jsonl each sub-agent, nested ones included
<session-id>/subagents/agent-<id>.meta.json its type, task description and spawn depthThe current session's id is in the environment variable. Skill loads appear as blocks named , with the skill in , and as in user messages.
CLAUDE_CODE_SESSION_IDtool_useSkillinput.skill<command-name>/<name></command-name>- For another harness: find where it stores its sessions and how a skill load shows there. Codex keeps them under and loads a skill by reading its
~/.codex/sessions/, so a read of that file is the load. A session that edits the skill reads that file too, so tell an edit's read apart from a load.skills/<name>/SKILL.md
Claude Code 会将会话记录保存为文件,每行包含一个 JSON 对象,布局如下。版本之间布局可能发生变化,因此当路径无法解析时,在 中搜索会话 ID。
~/.claude/projects/text
~/.claude/projects/<project>/ <project>: the session's working directory, with / and . turned into -
<session-id>.jsonl the main session
<session-id>/subagents/agent-<id>.jsonl each sub-agent, nested ones included
<session-id>/subagents/agent-<id>.meta.json its type, task description and spawn depth当前会话的 ID 位于 环境变量中。Skill 加载会显示为名为 的 块,其中 Skill 位于 ;在用户消息中,则显示为 。
CLAUDE_CODE_SESSION_IDSkilltool_useinput.skill<command-name>/<name></command-name>- **对于其他 harness:**找到它存储会话的位置以及 Skill 加载的呈现方式。Codex 将会话保存在 下,并通过读取
~/.codex/sessions/加载 Skill,因此读取该文件即表示加载。编辑 Skill 的会话也会读取该文件,所以要区分编辑前的读取与实际加载。skills/<name>/SKILL.md
2. Audit
2. 审计
Transcripts run long: search them for what the audit needs, such as skill loads, errors, retries, long runs of tool calls on one problem, and the user's corrections, and read around each hit rather than reading them whole.
Weigh every skill loaded in the scope, and every stretch where a skill was missing. Put in the recap anything where a skill helped or hurt the work, for example:
- tokens or time spent that a skill could have saved, or that a skill caused
- a rabbit hole a skill led into, or failed to prevent
- information in a skill that was wrong, or stale
- a surprise: something a skill assumed that turned out different in reality
- a skill that should have triggered and didn't, or triggered when it shouldn't have
- a rule the user stated in chat that no skill carries
- a workaround an agent invented for something a skill should cover
These are examples, not a checklist. Audit skills from other people's repos the same way as the user's own.
Each finding carries:
- Skill: its name and source repo, or "no skill" when one is missing
- Evidence: which session or sub-agent, and what happened there, quoted or closely paraphrased
- Cost: what it cost or risked, in tokens, time, wrong output or the user's attention
- Opportunity: the change to the skill that would fix it
Leave out anything that went wrong for reasons no skill could address, because a finding must point at a change to a skill.
会话记录可能很长:搜索审计所需的信息,例如 Skill 加载、错误、重试、针对同一问题连续进行的大量工具调用,以及用户的纠正;应阅读每处命中位置附近的内容,而不是通读整份记录。
评估范围内的每个已加载 Skill,以及 Skill 缺失的每个阶段。在回顾中列出 Skill 帮助或损害工作的所有情况,例如:
- 本可由 Skill 节省或由 Skill 消耗的 token 或时间
- Skill 导致或本可避免的无底洞式排查
- Skill 中错误或过时的信息
- 意外情况:Skill 中的某项假设在现实中并不成立
- 本应触发却未触发,或本不应触发却触发的 Skill
- 用户在聊天中提出但没有任何 Skill 包含的规则
- Agent 为 Skill 本应涵盖的事情自行想出的变通办法
这些只是示例,并非检查清单。来自其他人仓库的 Skill 也应采用与用户自有 Skill 相同的方式进行审计。
每项发现包括:
- Skill:其名称和来源仓库;若缺少 Skill,则写为“无 Skill”
- 证据:发生在哪个会话或子 Agent 中,以及具体发生了什么;可引用原文或忠实转述
- 成本:在 token、时间、错误输出或用户注意力方面造成或可能造成的代价
- 改进机会:应对该 Skill 进行的更改,以解决问题
排除那些因 Skill 无法处理的原因而出现的问题,因为每项发现都必须指向对某个 Skill 的更改。
3. Report
3. 报告
Give the findings, then the verdict:
- "No skill changes needed." when nothing qualifies. This is a good outcome, not a failed recap.
- Otherwise "<n> opportunities", naming the skills they touch.
When there are opportunities, close with the next step: the user runs to file them as issues in , unless they name another repo. works from the conversation, so the findings as written are its input.
/to-tickets<skills-repo>/to-ticketsWhen is public, write each finding the way the user's instructions say public repositories are written: that rule lives in their agent instructions, so follow it from there.
<skills-repo>- For a finding about someone else's skill: the user decides whether to file it in anyway, fork the skill, or take it to the skill's own repo.
<skills-repo>
Stop after the report, and leave creating issues, commenting and editing skills to the user, since they choose which findings are worth acting on.
先给出发现,然后给出结论:
- “无需更改 Skill。” 如果没有任何内容符合条件。这是一个好结果,并不代表回顾失败。
- 否则,写明 “<n> 个改进机会”,并指出这些机会涉及哪些 Skill。
存在改进机会时,以下一步行动结束:除非用户指定其他仓库,否则由用户运行 ,将这些发现提交为 中的 issue。 可直接从对话中运行,因此当前写出的发现就是它的输入。
/to-tickets<skills-repo>/to-tickets当 是公开仓库时,按照用户指令中针对公开仓库的表述方式撰写每项发现;该规则位于用户的 Agent 指令中,因此应遵循其中的规定。
<skills-repo>- **对于涉及他人 Skill 的发现:**由用户决定是在 中提交、fork 该 Skill,还是将问题提交到该 Skill 自己的仓库。
<skills-repo>
报告完成后即停止,不要替用户创建 issue、发表评论或编辑 Skill,因为应由用户决定哪些发现值得采取行动。