session-end
Skill42 starsChanged 5 months agoApache-2.0View on GitHub
Manages .claude/session-log.md — a per-project rolling log of session summaries, one entry per day, last 10 days kept. Review the current conversation and write today's entry to .claude/session-log.md. Use this before switching projects or closing Claude Code. The Stop hook (if configured) auto-generates a summary on exit, but /session-end produces better output — full session context, not transcript extraction. If an entry for today already exists it is replaced, not duplicated. After write, the log is rotated to keep the…
12 other projects use a version of this.
Adopted by
Most recently taken up by
- puritysb/AgentDecktheir own version, first seen Sep 28, 2026
- mae616/ai-templatetheir own version, first seen Aug 22, 2026
- lumatic2/askewly-harnesstheir own version, first seen Aug 21, 2026
- redamancy231-create/claude-skillstheir own version, first seen Jul 15, 2026
- iamneilroberts/claude-skillstheir own version, first seen Jul 3, 2026
- faizkhairi/claude-code-blueprinttheir own version, first seen Jul 3, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- puritysb/AgentDeck★ 256same name
- faizkhairi/claude-code-blueprint★ 71same name
- iamneilroberts/claude-skills★ 26same name
- itsjwill/claude-memory★ 15same name
- IlyaGorsky/memory-toolkit★ 13same name
- mae616/ai-template★ 9same name
- freskhu/genesis★ 4same name
- jkm-4314/claude-code-skills★ 4same name
- redamancy231-create/claude-skills★ 3same name
- DanielGuru/repomemory★ 2same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- apply-dreamingSkill
- curate-minionsSkill
- debugSkill
- doubt-driven-developmentSkill
- find-bugsSkill
- fix-reviewSkill
- grill-meSkill
- housekeepingSkill
- improveSkill
- revivalSkill
- self-learnSkill
- shipSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If an entry for today already exists it is replaced, not duplicated.
- Distinctive: line 23
After write, the log is rotated to keep the last 10 day-entries.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/session-end
Manages .claude/session-log.md — a per-project rolling log of session
summaries, one entry per day, last 10 days kept.
/session-end → write today's summary (manual, high quality)
/session-end show → print the last entry
/session-end all → print all entries (oldest → newest)/session-end (no args) — write today's summary
Review the current conversation and write today's entry to
.claude/session-log.md. Use this before switching projects or closing
Claude Code. The Stop hook (if configured) auto-generates a summary on
exit, but /session-end produces better output — full session context,
not transcript extraction.
If an entry for today already exists it is replaced, not duplicated. After write, the log is rotated to keep the last 10 day-entries.
Entry format
## YYYY-MM-DD
### Що зробили
- completed item
### Поточний стан
- current branch / open PR number
- what is working / what is broken
### Відкриті питання
- unresolved question (omit section if none)
### Наступні кроки
- next item, in priority orderRules: 10–20 bullets total · Ukrainian for content · English for code/files/identifiers · include PR number and branch in Поточний стан · omit Відкриті питання if none.
Write logic
Build the entry text (starting with ## YYYY-MM-DD, following the format
above), then call the shared rotation helper — same one used by the
session-end.sh Stop hook, so both paths behave identically:
source .claude/hooks/_lib/hook-common.sh
ENTRY="## $(date '+%Y-%m-%d')
### Що зробили
- ...
### Поточний стан
- ...
### Наступні кроки
- ..."
hook_rotate_log .claude/session-log.md "$ENTRY"After writing, report:
"Session log updated —
.claude/session-log.md, entry for {today}."
/session-end show — print last entry
source .claude/hooks/_lib/hook-common.sh
if [[ ! -f .claude/session-log.md ]]; then
echo 'No session log found. Run `/session-end` to create one.'
else
hook_read_log_entries .claude/session-log.md
if (( ${#LOG_ENTRIES[@]} > 0 )); then
printf '%s\n' "${LOG_ENTRIES[-1]}"
else
echo '(no entries)'
fi
fi/session-end all — print all entries
source .claude/hooks/_lib/hook-common.sh
if [[ ! -f .claude/session-log.md ]]; then
echo 'No session log found.'
else
hook_read_log_entries .claude/session-log.md
for entry in "${LOG_ENTRIES[@]}"; do
printf '%s\n\n' "$entry"
done
if (( ${#LOG_ENTRIES[@]} > 0 )); then
first_date=$(head -1 <<< "${LOG_ENTRIES[0]}" | sed 's/^## //')
last_date=$(head -1 <<< "${LOG_ENTRIES[-1]}" | sed 's/^## //')
echo "${#LOG_ENTRIES[@]} entries: $first_date → $last_date"
fi
fiHow the full system works
Session ends (exit / /exit)
└─ Stop hook: .claude/hooks/session-end.sh (configured ✓)
├─ Skip if /session-end ran within 2h (file mtime check)
├─ Try agy -p — Gemini 3.5 Flash (Low → Medium → High), Gemini 3.1 Pro (Low → High)
├─ Try opencode run --format json — ollama/glm-5.2:cloud, kimi-k2.7-code:cloud,
│ minimax-m3:cloud, qwen3.5:cloud
└─ Fallback: raw transcript excerpt
Next session opens
└─ SessionStart hook: .claude/hooks/session-last.sh (configured ✓)
├─ Reads last ## YYYY-MM-DD entry from session-log.md
├─ Skips if entry is >30 days old
└─ Injects as additionalContext: "Previous session context (Xd Yh ago): ..."LLM fallback chain (Stop hook):
agy— Gemini 3.5 Flash (cheapest first), Gemini 3.1 Proopencode— glm-5.2:cloud, kimi-k2.7-code:cloud, minimax-m3:cloud, qwen3.5:cloud- Raw transcript excerpt (fallback)
The skill works standalone (without hooks) — you just run /session-end
manually. The hooks add automation.
Log file: .claude/session-log.md (gitignored ✓)
Troubleshooting (if hooks misbehave):
tail -30 ~/.cache/session-indexer/hooks.log
cat .claude/session-log.mdDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

