strale: Command for Claude Code

.claude/commands/end-session.md

end-session is a command for Claude Code from strale-io/strale. It costs 25 tokens per session (1,547 once invoked), scanned A, original, MIT.

A session-closing command that checks the codebase, writes a handoff file and journal entry, and reports unresolved work.

In plain words
What is it for?
Use it to run final checks, record what changed, note open issues, and surface loose threads before stopping work.
Why use it?
It reduces the chance of ending a coding session with unnoticed problems or missing context for the next session.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is strale-io/strale's own configuration. It tells Claude Code how to work on strale itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything strale configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd apps/api && npx tsx --env-file=../../.env scripts/session-close-check.ts.

Reuse

Borrowing it

Nothing to install: this file belongs to strale-io/strale. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/strale-io/strale/main/.claude/commands/end-session.md
Clone the repo
git clone --depth 1 https://github.com/strale-io/strale

Made for: Claude Code.

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/commands/strale-io/strale/end-session/github.svg)](https://agentmods.dev/commands/strale-io/strale/end-session)
Your own site
<a href="https://agentmods.dev/commands/strale-io/strale/end-session"><img src="https://agentmods.dev/badge/commands/strale-io/strale/end-session/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for end-session

Your own site · 80×15
<a href="https://agentmods.dev/commands/strale-io/strale/end-session"><img src="https://agentmods.dev/badge/commands/strale-io/strale/end-session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.01547
Opus 5.5 $0.00010 $0.00619
Sonnet 5.5 $0.00005 $0.00309
Haiku 4.5 $0.00003 $0.00155

Measured 2mo ago against content hash 28ece17cd8b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.claude/commands/end-session.md · 113 lines

How it starts

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

/end-session — verify, then write session artifacts + surface loose threads

Purpose: complete the CLAUDE.md Quick Session Checklist on Petter's behalf. This command DOES write the handoff file and Journal entry — that's the standing preference (set 2026-04-27). It still does not create Decisions DB entries, To-do mutations, or other governance artifacts without explicit per-item approval.

Run these steps in order. After the checks, write the artifacts (steps 2 and 3) before producing the final report.

1. Run the codebase close-check script

cd apps/api && npx tsx --env-file=../../.env scripts/session-close-check.ts

Checks git integrity, DB↔code parity, stuck caps, open breakers, uncommitted handoff files. Exit codes: 0 clean, 1 warnings, 2 blockers. Capture findings for the final report.

2. Write the session handoff file (CLAUDE.md step 7)

Author a handoff file at handoff/_general/from-code/YYYY-MM-DD-<topic>.md covering this session's work. Convention:

  • First line is Intent: summarizing what the session set out to do.
  • Body covers what shipped, what's open, non-obvious learnings, and cost (if any).
  • Topic slug should be specific enough that future-you can grep for it (e.g. x402scan-indexing-and-pr-cleanup, not cleanup).

If a handoff file authored this session already exists for today's topic (e.g. an earlier /go invocation already wrote one), don't duplicate — report its path. Only one handoff per topic per day; if the session covered two distinct topics, write two files.

If the session was genuinely trivial (single trivial fix, nothing worth recording), still write a one-line handoff. Skipping is Petter's call, not yours.

3. Create the Journal entry in Notion (CLAUDE.md step 8)

Create a session-log entry in the Journal data source (collection://8f54383b-3227-42c2-bee4-77a091027f8f) with:

  • Title: Session log — <topic> YYYY-MM-DD (matches existing entry pattern)
  • Type: session
  • Source: code
  • Actor: claude-code
  • Action Required: no (unless the session left explicit follow-ups for Petter)
  • Content: mirror the handoff file's structure — Intent, Outcome, Open, Non-obvious learnings. Don't duplicate the entire handoff verbatim, but cover the same ground.

Read the full file on GitHub · 113 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. 2mo ago First seen · 113 lines · 25 tokens per session scan A 28ece17cd8b8

Subscribe to this mod's changes

end-session is a command published in the GitHub repository strale-io/strale (5 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,547 once invoked, about $0.0001 per session on Opus 5.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

end-session compared with commands from other repositories

end-session next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
end-sessionstrale-io/straleCommand5yesterdayMITA25Claude Code
bulkSmart-AI-Memory/attune-aiCommand11todayApache-2.0A11Claude Code
start-0-3.esminicoohei/ai-agent-campCommand3471mo agononeA2Claude Code
start-0-3minicoohei/ai-agent-campCommand3471mo agononeA2Claude Code
start-0-4.enminicoohei/ai-agent-campCommand3471mo agononeA2Claude Code
start-0-4.esminicoohei/ai-agent-campCommand3471mo agononeA2Claude Code
start-0-4minicoohei/ai-agent-campCommand3471mo agononeA2Claude Code