回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
npx skills add https://github.com/majiayu000/spellbook --skill recap
从原始行为数据(而非用户自述)回答三个问题:
cognitive-portraitbetter-auditcodex-retrospective脚本随本 skill 分发(scripts/extract_sessions.py)。Claude 安装位于 ~/.claude/skills/recap,Codex 安装位于 ~/.agents/skills/recap,先解析实际位置再运行:
SKILL_DIR=$(ls -d ~/.claude/skills/recap ~/.agents/skills/recap 2>/dev/null | head -1)
python3 "$SKILL_DIR/scripts/extract_sessions.py" --days 2
--days N 调整回看窗口(默认 2;周回顾用 7)--json 输出结构化数据供进一步处理resumed,其窗口前的历史不会混入本次回顾scripts/sync_remote_sessions.sh 把远程机器的 ~/.claude/projects rsync 到本机 ~/.claude/remote-sessions/<host>/projects,extract 脚本会自动发现这些目录并一并扫描(会话标 @<host>):
"$SKILL_DIR/scripts/sync_remote_sessions.sh" starlight # 或 RECAP_SYNC_HOSTS="host1 host2"
~/.ssh/config 里的 host 别名)--extra-root label=path 显式加入扫描;显式路径不存在时应先修正路径再继续如果用户提到 Codex,补充检查 ~/.codex/sessions(如存在)并说明覆盖范围。
把会话按意图而非项目分组。常见类别:
每组列出:涉及项目、会话数、代表性原话(引用用户消息,不要改写)。
把 Step 2 的分组映射到六大个人操作系统,输出覆盖表。判定只依据本窗口内的会话证据,没有证据就标"未运转",不推测。
| 操作系统 | 判定信号(会话中出现即计入) |
|---|---|
| 编码生产 | 库审计、spec/issue 生成、实现 PR、代码 review、构建修复、验证动作 |
| 本地/混合 AI 实验室 | GPU/推理调度、模型路由、gateway/proxy 运营、成本或质量监控 |
| 内容与知识合成 | 信息源调研、深度阅读、文章/线程/脚本产出、素材整理 |
| Agentic 编排与记忆 | 多 agent 协调、workflow/harness 设计、memory 系统操作 |
| 成长与基础设施 | portfolio/goals 管理、billing/proxy 优化、工具链演进、机器运维 |
| 分发与影响力 | 发布动作、仓库门面整改、增长实验、发布后数据回收 |
覆盖表格式(每行必须附会话 ID 证据或标注缺失):
| 操作系统 | 覆盖度 | 证据(会话ID)| 缺失环节 |
在分组之上找跨会话模式,重点检查:
| 信号 | 说明 |
|---|---|
| 重复出现的 prompt 句式 | 候选固化为 skill(引用 3 次以上的原话为证据) |
| 流水线形态 | 同一套步骤在多个项目上重复执行(如 审计→spec→实现→验证) |
| spec 通胀 | spec/issue 生成速度远超实现与验证速度 |
| 未闭环会话 | 有生成动作但无验证动作的会话 |
| 救火占比 | 诊断/修复类会话占总量的比例 |
按以下格式收尾(遵守 W-11:事实标来源,推断标置信度):
## 你这 N 天做了什么(事实)
<分组汇总,每条附会话 ID>
## 操作系统覆盖表(事实)
<Step 3 的六系统覆盖表>
## 模式(推断,附置信度)
<跨会话模式,引用原话为证据>
## 建议(附前提假设)
- 该固化的:<重复 3 次以上的流程 → skill 候选>
- 该删的:<零触发的规则/skill、未闭环的 spec>
- 该警惕的:<spec 通胀、验证缺口等>
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take majiayu000/spellbook-recap from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.