end-session

end-session is a skill for Claude Code, Codex from Imtylerrrrrr/second-brain. It costs 47 tokens per session (547 once invoked), scanned A, original, MIT.

A session-closing skill that records what happened in a software project and what should happen next. It saves this handoff in a second-brain vault, a separate place for durable project notes.

In plain words
What is it for?
It is for ending a work session, updating the repository dashboard, recording touched repositories, and synchronizing Git facts.
Why use it?
It preserves work history between sessions and ties the notes to Git commits and changed files, reducing uncertainty when work resumes later.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the second-brain plugin — 4 skills, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/imtylerrrrrr/second-brain/end-session
Any agent
npx skills add Imtylerrrrrr/second-brain --skill end-session
Clone the repo
git clone --depth 1 https://github.com/Imtylerrrrrr/second-brain

Made for: Claude Code, Codex.

Or install second-brain, the plugin that ships this one along with the rest of its 4 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for end-session

README.md
[![agentmods](https://agentmods.dev/badge/skills/imtylerrrrrr/second-brain/end-session.svg)](https://agentmods.dev/skills/imtylerrrrrr/second-brain/end-session)
Your own site
<a href="https://agentmods.dev/skills/imtylerrrrrr/second-brain/end-session"><img src="https://agentmods.dev/badge/skills/imtylerrrrrr/second-brain/end-session.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00047 $0.00547
Opus 5 $0.00023 $0.00273
Sonnet 5 $0.00009 $0.00109
Haiku 4.5 $0.00005 $0.00055

Measured 4d ago against content hash c0d957ffcb41, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

end-session scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/end-session/SKILL.md · 28 lines

What it actually says

second-brain: end-session

Git-anchored write. Follow the discipline below EXACTLY — Part 1 governs this skill.

!cat "${CLAUDE_PLUGIN_ROOT}/references/discipline.md"

Steps

  1. Locate the vault (cwd or ancestors containing Projects/Dashboard.md; else registered vaults in ~/.claude/second-brain/vaults, ask if several; none → "run /second-brain:setup first").
  2. Which repo(s) were touched this session? Evidence: this conversation's work + git -C <repo> status -sb + git -C <repo> log --oneline -10. Cannot tell → ASK the user; never guess.
  3. For each touched repo, update Projects/<repo>.md per Part 1:
    • ## ▶ ThreadLast: cited facts — ALL commits since that note's last_handoff_commit (hash+subject via git log <last_handoff_commit>..HEAD --oneline, or the full log if last_handoff_commit: none), not just commits made in this conversation turn; plus files changed, tests run, user decisions; Next: the user's stated intent (ask if unstated).
    • frontmatter → last_handoff_commit: $(git -C <repo> rev-parse --short HEAD), branch, last_updated: today.
    • ## 🕑 Session log → prepend one dated line.
    • Milestone candidates → append - [ ] confirm milestone "<name>" → /second-brain:analyze <repo> to ## ✅ TODO. Do NOT touch milestone boxes.
  4. Update the Dashboard row for this repo only (Last session · Next · Updated). Row missing → add it.
  5. Sync L1: bash "${CLAUDE_PLUGIN_ROOT}/scripts/sync.sh"
  6. Git hygiene: uncommitted/untracked changes in touched repos → flag them ("commit before you forget?"). Never commit for the user unless asked.
  7. Confirm in one line per repo: what was recorded + the anchor hash.

Rules

  • Facts cited, intent labeled, unknown → ask. NEVER check milestone boxes (that is /second-brain:analyze's job). No transcript summaries.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 28 lines · 47 tokens per session scan A c0d957ffcb41

Subscribe to this mod's changes

end-session is a skill published in the GitHub repository Imtylerrrrrr/second-brain (1 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 547 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

s-continue

Cheaper and faster than /compact. Restores previous session context from Claude Code AND Codex transcripts by reading them directly — no LLM calls, no token cost. Also auto-loads a handoff written by /s-compact, if one exists. Triggers on "s-continue", "restore context", "what was I doing", "pick up where I left off"…

ww-w-ai/super-token-saver · 95 tokens

handoff-more

Pull older handoffs from .claude/handoffhistory/ into the current session's context. Requires the scripts/hooks installed by this repo's ./install.sh — the history it reads only exists once those are in place. Use when the auto-loaded handoffcurrent.md is thin (placeholder Notes, missing context the user is…

Sting25/claude-code-handoff · 110 tokens

handoff

Snapshot session state to .claude/handoffcurrent.md and tell the user (loudly, with --- borders) to start a new session. Requires the scripts/hooks installed by this repo's ./install.sh — not a prompt-only skill. Use at clean boundaries (commit lands, track wraps), when the user signals context pressure ("getting…

Sting25/claude-code-handoff · 106 tokens

setup

Scaffold the handoff project-memory system into THIS repository (new or existing) — copies the template tree into .handoff/, then runs a guided discovery pass that drafts a real STATUS, MAP, TECHSTACK, and PRODUCT from the actual codebase and confirms with the user before saving. Use when the user says "set up…

AbdurRafay2004/handoff · 102 tokens

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

alive:session-history

Revive sessions (quick or heavy), browse, and search — 'what happened recently?', 'find the session where we discussed X', 'revive yesterday's session'. For single-session recall and multi-session browsing. If the human needs to merge multiple sessions into one working context or detect conflicts between parallel…

alivecontext/alive · 76 tokens