session-end

A procedure for closing a coding-agent session with a concise handoff. It records the current result, changed files, checks performed, unresolved risks, and the next action.

In plain words
What is it for?
Use it to wrap up work, prepare a continuation note, inspect relevant changes, and update durable project notes when needed.
Why use it?
It prevents important context from being lost when a session ends, is cleared, or is handed to another agent.

Skill for Claude CodeCodex

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/puritysb/agentdeck/session-end
Any agent
npx skills add puritysb/AgentDeck --skill session-end
Clone the repo
git clone --depth 1 https://github.com/puritysb/AgentDeck

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 500 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.00061 $0.00500
Opus 5 $0.00030 $0.00250
Sonnet 5 $0.00012 $0.00100
Haiku 4.5 $0.00006 $0.00050

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

Security

Grade A, and why

session-end 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 2d 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.

.agents/skills/session-end/SKILL.md · 60 lines

What it actually says

Session End

Use this skill at the end of a work session, before /clear, /new, switching tasks, or handing work to another Codex/Claude session.

Purpose

Produce a concise handoff that lets the next session continue without rereading the whole transcript. Separate temporary handoff notes from durable project knowledge.

Workflow

  1. Read CLAUDE.md and the top of DEVELOPMENT_LOG.md.
  2. Inspect the current work state:
git status --short
git diff --stat
  1. If files changed, inspect only relevant diffs needed to summarize the work. Do not revert unrelated changes.
  2. Summarize:
    • goal and current outcome
    • files changed and why
    • verification run and results
    • unresolved risks or blockers
    • exact next action for the next session
  3. Update durable docs only when warranted:
    • DEVELOPMENT_LOG.md: add an entry for meaningful fixes, architectural decisions, hardware findings, or known pitfalls.
    • CLAUDE.md: update only for project-wide architecture, invariants, setup, or workflow changes.
    • AGENTS.md: update only for persistent agent behavior expectations.
  4. Do not write secrets, credentials, tokens, private device passcodes, or raw prompt transcripts into durable docs.
  5. If no durable doc update is warranted, say so explicitly in the final handoff.

Handoff Format

Return this shape:

**Session Handoff**
- Goal:
- Current state:
- Changed files:
- Verification:
- Open issues:
- Next action:
- Durable docs updated:

Keep it short enough to paste into a new Codex prompt. Include file paths for changed files, but avoid dumping large diffs.

Notes

  • Use Codex /compact when the active thread should continue with a compressed context.
  • Use /new or /clear after the handoff when the next task should start fresh.
  • Use Codex Memories for personal recurring preferences only; required AgentDeck rules belong in checked-in docs.
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. 2d ago First seen · 60 lines · 61 tokens per session scan A d754991aef8e

Subscribe to this mod's changes

session-end is a skill published in the GitHub repository puritysb/AgentDeck (212 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 500 once invoked, about $0.0003 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-30.