基础工具与工作流 · mattpocock/skills

retro

Conduct a retrospective on a coding session.

L2 本地 · 限定工作目录V1 已固定读写文件Dual-pass Audit
Author mattpocockGitHub mattpocock/skills ↗Stars 257659License MIT(GitHub API spdx MIT;仓库根 LICENSE: Copyright (c) 2026 Matt Pocock)Commit 3cca18b368
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

复盘对象不是代码而是 coding agent 的运行环境:目标是提出改进 agent 环境的建议以提升未来运行。

skills/in-progress/retro/SKILL.md
The user has asked for a **retrospective**. You are suggesting improvements to the coding agent's **environment** to improve future runs.
与 code-review(审 diff)截然不同:retro 把 session 当观测样本,输出环境改进候选。

先委托文体标准:第一步调 writing-for-agents(仓库 model-invoked 写作指南 skill)作为改进建议的书写风格。

skills/in-progress/retro/SKILL.md
Call the Skill tool with `writing-for-agents` for the writing style guide.
writing-for-agents 位于 skills/productivity/,是 model-invoked(openai.yaml 无 policy 块),retro(user-invoked)调它合规。

证据源 = 会话主源/本机会话日志:读取用户指定的 session 记录(可能在本机搜 session logs),未指定则默认当前会话。

skills/in-progress/retro/SKILL.md
Read the primary sources for the session the user specifies. This may mean searching through session logs on this machine. If the user doesn't specify a session, default to the current one.
这是 skill 唯一的数据摄入动作:本地读取,无网络。

七类改进信号扫描:navigation / automated checks / coding standards / global AGENTS.md / tool economy / no-ops / information access,每类都带『何时用』判据。

skills/in-progress/retro/SKILL.md
**Navigation**: how easy was it for the agent to find the right files? Are there hidden dependencies between files? Would a **navigation pointer** make it easier? _Use when_ the session took a long time to find a piece of information.
其余六类同构:Automated checks(_Use when_ the agent made a mistake that could have been caught by an automated check)、Coding standards(reviewer agent 漏抓时)、Global AGENTS.md(文件过大时)、Tool economy(昂贵工具调用时)、No-ops(steering 文件大而无效时)、Information access(关键信息不可得时)。

输出按严重度排序呈现给用户,并附『实施 vs 评审』的职责模型:实施 agent context 压力最大,评审 agent 压力最小 → 编码标准应由评审侧强制而非实施侧。

skills/in-progress/retro/SKILL.md
The review agent has the least context pressure - it receives a diff, so no exploration needed. It often does not need to write code or debug. This means that the review agent should be responsible for imposing coding standards, not the implementation agent.
文件职责分层(Reference > Files):CLAUDE.md/AGENTS.md 只用做 navigation pointers、CODING_STANDARDS.md 评审时读(>1000 行加导航指针)、docs 当引用文件、skills 用于描述进 context 的文档或用户命令。

2核心能力

01对指定/当前 coding session 做复盘,读取本机会话日志取证
02七类环境改进候选扫描(navigation/automated checks/coding standards/AGENTS.md/tool economy/no-ops/information access)
03按严重度排序输出改进建议
04复用 writing-for-agents 文体指南规范建议文本
05给出仓库文件层级职责模型(CLAUDE.md/CODING_STANDARDS/docs/skills 各自用途)

4管控建议与判定依据

建议配套管控措施
面向 Agent
限定工作目录
面向管理者
保留操作记录
判定依据(文件路径与关键语句摘要)
  • 本地文件: 操作本地工程文件或工作目录工件
审计说明: 。只读本地会话/文件/历史,无外发、无凭证接触、无写文件指令(建议以清单形式给用户,落地另行执行)。注意点:会话日志可能含密钥/PII,复述时宜脱敏(skill 未显式要求);STUB/实验状态 + 依赖宿主日志格式,行为可能有变。

5第二遍独立确认

  • [ok] 七类改进候选 + 每类 Use-when 判据 — SKILL.md Step 3 七类全列(Navigation/Automated checks/Coding standards/Global AGENTS.md/Tool economy/No-ops/Information access),各带 _Use when_ 条件。
  • [ok] 读取会话日志(本机) — 'This may mean searching through session logs on this machine. If the user doesn't specify a session, default to the current one.' 原文在。
  • [ok] 调 writing-for-agents 文体指南 — 'Call the Skill tool with `writing-for-agents` for the writing style guide.' 原文在;writing-for-agents 为 model-invoked,调用合规。
  • [ok] 按严重度呈现给用户 — 'Present these candidates to the user, in order of severity.' 原文在。
  • [ok] 无写文件/无网络/无凭证 — 全文 token 扫描零命中写文件类与网络类指令;输出是给用户的候选清单。
  • [discrepancy] README STUB 标注 vs SKILL.md 完整步骤(找茬点) — in-progress/README.md 标 retro 为 'STUB: design notes only, not functional yet',但同 pin 的 SKILL.md 已是完整可执行步骤(Step 1-4 + Reference 模型)。判断为 README 滞后于 SKILL.md 或作者仍视为设计稿;已在 traits/risks 如实标注,不替作者定性。
  • [ok] 元数据 + beta 状态 — GitHub API MIT/257659/2026-09-04;本地 HEAD == 3cca18b;in-progress README 列 beta。

6结论

  • 独特的复盘对象:审 agent 的运行环境而非代码,与 code-review 形成互补。
  • 七类可操作信号 + Use-when 判据,把模糊的『复盘』变成结构化扫描。
  • 职责模型清醒:context pressure 决定谁该强制编码标准(评审侧),文件层级观(CLAUDE.md 极省)直接可复用。
  • 输出克制:只给排序后的候选清单,不擅自改写用户的 steering 文件。
  • 适合: 适合定期(如每周/每大功能后)用 agent 干活的开发者:想系统性改进自己的 steering 文件、编码标准、自动检查与工具配置,把『这次会话哪里不顺』沉淀成环境改进清单。
    不适合: 不适合想要代码级 code review 的场景(应选 code-review);不适合宿主不保留可读会话日志的环境;不适合期待 skill 直接改 AGENTS.md/CODING_STANDARDS.md 的用户(它只给建议清单);因 STUB 标注,不适合生产关键流程依赖。
    Install Agent-Ready
    ① Verified Mirror 2026-09-09
    Option A · Direct DownloadDownload retro.tar.gz
    sha256: d1a796d39173a1c6…
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 3cca18b368.