session-report

A command that records what changed on the current Git branch and why. Git is a tool for tracking code changes, and a branch is a separate line of work.

In plain words
What is it for?
Use it at the end of a coding session when work spans multiple sessions and the final commit or squash needs an explanation of the changes.
Why use it?
A later commit message can lose the original reasoning behind a long-running change. This creates a report that preserves that context for the eventual commit.

Command

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 commands/damusix/atomic-claude/session-report
Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 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.00031 $0.00963
Opus 5 $0.00015 $0.00481
Sonnet 5 $0.00006 $0.00193
Haiku 4.5 $0.00003 $0.00096

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

Security

Grade A, and why

session-report 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.

context/commands/session-report.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to use

Long-running branch spanning multiple Claude Code sessions. The eventual commit (or squash) needs the why behind the work, but git diff alone loses that. Run /session-report at the end of a session to capture intent for the future commit-message synthesis.

Opt-in only. Does not auto-fire.

Refuse to run if

  • Working tree clean AND no unstaged changes since last commit → refused: no changes since last commit — nothing to report.

Steps

  1. Determine branch scope key:

    • git branch --show-current. If empty (detached HEAD), use git rev-parse --short HEAD and warn the user: detached HEAD — report scoped to <sha> not a branch.
  2. Compute paths:

    • Dir: atomic where --json's reports field — already branch-scoped, with the legacy fallback folded in. Never construct it by hand.
    • Filename: <YYYY-MM-DD-HHMM>-<slug>.md. Slug from $ARGUMENTS if provided; otherwise infer from the most prominent change in the working tree (one or two kebab-case words).
    • On filename collision (same minute + same slug): append -2, -3, etc.
  3. Gather signal:

    • git status --porcelain — list of touched files (staged + unstaged).
    • git diff --stat and git diff --cached --stat — magnitude per file.
    • Recent conversation context — what was tried, what was rejected, what the user clarified mid-flight.
  4. Write the report: seed the computed path from the embedded template — atomic template session-report > <path> — then fill every <angle-bracket> placeholder (frontmatter + ## What changed + ## Why + optional ## Open threads) and delete the guidance comment. If atomic is absent or the verb errors, stop: document template unavailable (atomic template session-report failed) — install/update the atomic binary. cannot proceed.

  5. Report path to the user: wrote <reports-dir>/<file>.md, using the reports path from atomic where --json.

<output_format>

Voice

atomic-writing voice at the length budget it gives a short-lived state file: bullets and short paragraphs, no narrative. Not atomic output style, which governs Claude's replies rather than file contents. Internal context that the commit-message synthesis will read.

Read the full file on GitHub · 65 lines

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 · 65 lines · 31 tokens per session scan A 48d80237a797

Subscribe to this mod's changes

session-report is a command published in the GitHub repository damusix/atomic-claude (83 stars, last pushed 8d ago), licensed MIT. It adds 31 tokens to every session and 963 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-30.