Auto-capture context before compaction, roll it up across projects, and start each morning with a recap that tees up the day. Four pieces, one directory, zero infra.
Four moments across the day. Two you trigger, two that just run. All four write to the same place.
Reads the last 36h of summary cards, distills a recap, and asks you 2-3 concrete questions about today. That's it — the conversation continues from there.
Every time Claude Code compacts a session, the hook silently saves the pre-compaction summary to ~/.claude/summaries/. You never see it. Nothing's lost.
Scans every session across every project from the last 24h, writes a single cross-project card. Use it as a checkpoint when something's done.
You forgot. It didn't. cron fires headless at 18:00 and writes the day's rollup whether you ran anything manually or not.
All four write to ~/.claude/summaries/ as <YYYYMMDD-HHMMSS>-<source>-<id>.md. Source is in the frontmatter too — grep and move on.
Snapshots the pre-compaction context. PostCompact's input already carries Claude's generated summary — no extra model call, just persist it.
Cross-session rollup. Only messages from the last 24h — a session spanning many days only contributes its recent slice. Current session's model.
Headless claude -p run. Persists on failure too — a blank morning review is ambiguous, the script never leaves you guessing.
Reads cards (already distilled once), redistills into a recap, and ends with 2-3 decision-shaped questions. Not a summary — a conversation starter.
Or just clone the repo and ask Claude Code to install it for you. The README has the prompt.
From the repo root:
# commands and hooks into ~/.claude/
cp commands/*.md ~/.claude/commands/
cp hooks/*.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.sh
mkdir -p ~/.claude/summaries
Merge into ~/.claude/settings.json:
{
"hooks": {
"PostCompact": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "bash \"$HOME/.claude/hooks/compact-summary-card.sh\"",
"timeout": 15
}]
}]
}
}
18:00 daily — change to your liking:
(crontab -l 2>/dev/null; \
echo "0 18 * * * /bin/bash $HOME/.claude/hooks/daily-summary-cron.sh >> $HOME/.claude/summaries/cron.log 2>&1") \
| crontab -
⚠ cron's PATH is bare — edit daily-summary-cron.sh line 14 to include wherever claude and jq live.