Answer three questions from raw behavioral data (not the user's self-report):
- What have I been doing recently?
- What reusable patterns are in there?
- What should be added to and removed from my work system?
Boundaries with closely related skills (don't reinvent)
- Deep cognitive analysis (Dreyfus/Bloom five-layer profile) → hand off to
cognitive-portrait - Combination violation verification (frozen repos, unpushed work) → hand off to
better-audit - Codex historical self-reflection → hand off to
codex-retrospective - This skill only does:Lightweight, dependency-free activity review that directly reads jsonl + system-level suggestions
Step 1: Extract data (deterministic part, use a script)
The script is distributed with this skill (scripts/extract_sessions.py). The Claude installation is located at ~/.claude/skills/recap, and the Codex installation is located at ~/.agents/skills/recap. Resolve the actual locations first, then run:
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 NAdjust the lookback window (default 2; use 7 for a weekly review)--jsonOutput structured data for further processing- Output: for each main session, the machine, project, start and end times within the window, user message count, tool call count, sub-agent count, size, and the first 3 user messages
- Statistics only count messages within the window; old sessions resumed across windows will be marked
resumed, and their history from before the window will not be mixed into this review
Cross-machine aggregation (optional)
scripts/sync_remote_sessions.sh rsync the remote machine's ~/.claude/projects to the local ~/.claude/remote-sessions/<host>/projects, and the extract script will automatically discover these directories and scan them as well (sessions marked @<host>):
"$SKILL_DIR/scripts/sync_remote_sessions.sh" starlight # 或 RECAP_SYNC_HOSTS="host1 host2"
- Prerequisite: the target machine has passwordless SSH configured (
~/.ssh/confighost alias in ) - It is recommended to set up a daily cron sync; if syncing on a machine fails, it will return a failure status to avoid mistakenly assuming the data is complete
- Other directories can be explicitly added to the scan with
--extra-root label=path; if an explicit path does not exist, correct the path first before continuing
If the user mentions Codex, additionally check ~/.codex/sessions(if it exists) and explain the coverage scope.
Step 2: Topic grouping (LLM analysis)
Group sessions byintentrather than by project. Common categories:
- Library audit/refactoring (the "look at what's wrong with this library" type)
- Meta-level audit (reading one's own records, designing a management system)
- Direction/strategy exploration ("what should I do," impact)
- Content production
- Daily operations (diagnosis, cleanup)
For each group, list: projects involved, number of sessions, and representative direct quotes (quote user messages, do not paraphrase).
Step 3: Operating system coverage mapping (fixed dimensions, required every time)
Map the Step 2 groups to the six major personal operating systems and output a coverage table. Base judgments only on session evidence within this window; if there is no evidence, mark it "not operating" and do not speculate.
| Operating system | Judgment signal (counted if it appears in a session) |
|---|---|
| Coding production | Repo audit, spec/issue generation, implementation PR, code review, build fixes, verification actions |
| Local/hybrid AI lab | GPU/inference scheduling, model routing, gateway/proxy operations, cost or quality monitoring |
| Content and knowledge synthesis | Source research, deep reading, article/thread/script output, material organization |
| Agentic orchestration and memory | Multi-agent coordination, workflow/harness design, memory system operations |
| Growth and infrastructure | Portfolio/goals management, billing/proxy optimization, toolchain evolution, machine operations |
| Distribution and influence | Publishing actions, repo storefront overhaul, growth experiments, post-publish data collection |
Coverage table format (each row must include session ID evidence or be marked as missing):
| 操作系统 | 覆盖度 | 证据(会话ID)| 缺失环节 |
- Coverage has four tiers: heavy operation / has activity / not operating / has activity but missing closure (must specify whether upstream or downstream is missing)
- Pay special attention to closure completeness: for content systems, check whether there is "post-publish data feedback"; for coding systems, check whether there is "verification wrap-up"; for lab systems, check whether there is "cost/quality monitoring"
- For systems that are "not operating" across multiple consecutive recaps → flag in the suggestions section: is it intentionally suspended (reasonable) or idle assets (should be dealt with)
Step 4: Pattern and risk identification
Find cross-session patterns above the groupings, focusing on checking:
| Signal | Description |
|---|---|
| Recurring prompt phrasing | Candidate for solidifying into a skill (cite verbatim quotes appearing 3+ times as evidence) |
| Pipeline shape | The same set of steps repeatedly executed across multiple projects (e.g., audit→spec→implementation→verification) |
| Spec inflation | Spec/issue generation speed far exceeds implementation and verification speed |
| Unclosed sessions | Sessions with generation actions but no verification actions |
| Firefighting ratio | Proportion of diagnostic/fix sessions in the total |
Step 5: Output add/remove suggestions
Wrap up in the following format (follow W-11: mark sources for facts, mark confidence for inferences):
## 你这 N 天做了什么(事实)
<分组汇总,每条附会话 ID>
## 操作系统覆盖表(事实)
<Step 3 的六系统覆盖表>
## 模式(推断,附置信度)
<跨会话模式,引用原话为证据>
## 建议(附前提假设)
- 该固化的:<重复 3 次以上的流程 → skill 候选>
- 该删的:<零触发的规则/skill、未闭环的 spec>
- 该警惕的:<spec 通胀、验证缺口等>
Rules
- Read-only, do not modify any session files
- When quoting user messages, preserve the original text; truncate at most, do not rewrite
- Keep the number of suggestions restrained: at most 3 per category, better to have fewer than to overdo it
- If there are more than 30 sessions in the window, aggregate by project first before analyzing, to avoid expanding item by item