mission-log

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/mission-log — session 活動收割

/mission-log — session activity harvest

把「這一天所有 Claude session 做了什麼」的骨架抽出來 —— 不靠任何背景程序,因為 Claude Code 本來就在全程記錄(transcript 落在
~/.claude/projects/
),本 skill 只是收割器。
🤖 R2-D2 時刻:astromech 的飛行記錄器從不休息 —— X-wing 落地後,技師才把記錄拉出來看。 記錄一直都在,你需要的是讀取器。
Extract the skeleton of "everything all Claude sessions did that day" — without any background daemon, because Claude Code already records everything (transcripts land in
~/.claude/projects/
); this skill is just a harvester.
🤖 R2-D2 moment: an astromech's flight recorder never sleeps — after the X-wing lands, the mechanic pulls out the log. The record is always there; what you need is a reader.

用法

Usage

/mission-log [日期]
—— 不帶參數=今天;
yesterday
=昨天;
YYYY-MM-DD
=指定日。
/mission-log [date]
— no argument = today;
yesterday
= yesterday;
YYYY-MM-DD
= a specific date.

動作

Actions

  1. 跑收割器(本 skill 附帶的腳本,純標準庫、零 token):
    bash
    python3 <本skill目錄>/scripts/harvest.py --date <日期>
    輸出每個活躍 session 的:時間段、專案@分支、turns、token 消耗、模型、工具直方圖、使用者原話(前 5 句)。機器可讀版加
    --format jsonl
    。
  2. 呈現:把骨架整理給使用者看;若使用者追問某個 session 細節,再視需要深讀該 transcript(骨架裡有 session id 前綴可定位),深讀前先告知會消耗較多 context。
  1. Run the harvester (script bundled with this skill, pure standard library, zero tokens):
    bash
    python3 <this skill directory>/scripts/harvest.py --date <date>
    For each active session it outputs: time range, project@branch, turns, token usage, model, tool histogram, user's verbatim messages (first 5). Add
    --format jsonl
    for machine-readable output.
  2. Present: show the skeleton to the user; if the user asks for details about a session, deep-read that transcript as needed (the skeleton has the session id prefix to locate it), and warn before deep-reading that it will consume more context.

鐵律

Rules

  • 🚫 只讀不寫:本 skill 不落任何檔、不改任何狀態;落檔是 /daily-debrief 的事。
  • ✅ 骨架說什麼就是什麼:不腦補骨架裡沒有的活動;抽不到資料就回報「該日無記錄」。
  • ⚠️ 回溯上限=transcript 保留期:Claude Code 預設 30 天後刪 transcript(
    cleanupPeriodDays
    可調大);超過保留期的日期無料可收,直說。
  • 🚫 Read-only: this skill writes no files and changes no state; writing files is /daily-debrief's job.
  • ✅ The skeleton is the source of truth: do not invent activity that isn't in the skeleton; if no data is found, report "no record for that day".
  • ⚠️ Lookback limit = transcript retention period: Claude Code deletes transcripts after 30 days by default (
    cleanupPeriodDays
    can be increased); dates beyond the retention period have nothing to harvest — say so directly.

進階:跨機器收割

Advanced: cross-machine harvesting

腳本是單檔自包含,可直接經 ssh 餵給另一台機器的 python3(該機零安裝):
bash
ssh <你的主機> "python3 - --date <日期>" < <本skill目錄>/scripts/harvest.py
輸出自帶主機名,多台結果可直接並列。
The script is a single self-contained file, so you can pipe it directly via ssh to another machine's python3 (zero installation there):
bash
ssh <your host> "python3 - --date <date>" < <this skill directory>/scripts/harvest.py
The output includes the hostname, so results from multiple machines can be listed side by side.