A skill that reads today's Claude Code session logs and generates a day's retrospective as a page-turnable "book".
Trigger
/daily-flipbookLaunch with- "Make today's retrospective book", "Generate a diary book", etc.
Processing Flow
Step 1: Collecting session logs
Collect today's Claude Code session logs from both paths:
# パス1: デフォルト
~/.claude/projects/
Path 2: CLAUDE_CONFIG_DIR specified
~/claude-data/projects/
**必ず両方のパスを検索すること。片方だけで「見つからない」は禁止。**
ログファイルはJSONL形式。以下のコマンドで今日のセッションを見つける:
```bash
# 今日更新されたJSONLファイルを検索
find ~/.claude/projects/ -name "*.jsonl" -newer /tmp/today_marker -not -path "*/subagents/*" 2>/dev/null
find ~/claude-data/projects/ -name "*.jsonl" -newer /tmp/today_marker -not -path "*/subagents/*" 2>/dev/null
Creating a date marker:
touch -t $(date +%Y%m%d)0000 /tmp/today_marker
Step 2: Parsing the logs
Extract the following from each JSONL file:
- User's message (
type: "user") → What was requested - Assistant responses (
type: "assistant") → What was executed - Tool usage (
tool_use) → Execution details of Write, Edit, Bash, etc.
Organize these in chronological order and summarize them into the following structure:
- セッション1: [プロジェクト名]
- やったこと: [概要]
- 成果物: [ファイル、コミット等]
- 学び: [気づき、発見]
- セッション2: ...
Step 3: Decide the book structure
Automatically generate the book structure from the collected information:
| Page | Content |
|---|---|
| Cover | Date + title ("Record of YYYY/MM/DD") |
| Introduction | Today's summary (number of sessions, main achievements) |
| Each chapter | Details per session (what was done, code, learnings) |
| Final page | Today's retrospective + actions for tomorrow |
Structure rules:
- One spread (2 pages) per session
- Up to 6 chapters (12 pages). Anything beyond that is selected by importance
- Use code blocks, quotes, and tips boxes as appropriate
Step 4: Generate the FlipBook HTML
Template (index.html) as a base,pages Generate HTML with the array replaced.
Output destination: /tmp/claude/daily-flipbook/YYYY-MM-DD.html
Available CSS classes:
.page-title— Large heading.chapter-label— Chapter number.page-body— Body text.code-block— Code (.comment,.keyword,.string,.propertyhighlighted with.quote— Quote block.tip-box— Tips (.tip-title+<ul>).comparison— Two-column comparison (.col.good/.col.bad).divider— Decorative divider line.dropcap— Drop cap (<p class="dropcap">)
Step 5: Open in the browser
open /tmp/claude/daily-flipbook/YYYY-MM-DD.html
Output example
Cover:
2026年4月5日の記録
── Today I Learned ──
Chapter example:
第一章: FlipBook UIを作った
「本のページめくるUI作れる?」から始まって、
CSS 3D transformsとWeb Audio APIで
ドラッグでめくれる本のUIを作った。
途中で「マウスで本当にめくれるように」と
要件が追加されて、ドラッグ操作の実装に。
mousedown → mousemove → mouseup で
角度を計算して、50度超えたら完了、
それ以下ならバネで戻す。
Notes
- If no session logs are found, tell the user "There are no sessions today yet"
- Exclude personal information (API keys, passwords, etc.) if it is included in the logs
- Do not include personal information in the generated HTML either
- Use the Bash tool (jq) to parse the logs