Borrowing it
Nothing to install: this file belongs to JanoshMoshiri/MarkdownLLM. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/JanoshMoshiri/MarkdownLLM/main/.claude/commands/end-session.mdgit clone --depth 1 https://github.com/JanoshMoshiri/MarkdownLLMWrote 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.
[](https://agentmods.dev/commands/janoshmoshiri/markdownllm/end-session)<a href="https://agentmods.dev/commands/janoshmoshiri/markdownllm/end-session"><img src="https://agentmods.dev/badge/commands/janoshmoshiri/markdownllm/end-session.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00012 | $0.00510 |
| Opus 5 | $0.00006 | $0.00255 |
| Sonnet 5 | $0.00002 | $0.00102 |
| Haiku 4.5 | $0.00001 | $0.00051 |
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 6d 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.
What it actually says
Run the session-end continuity ritual for this domain — and only because the
operator chose to end here. This is deliberate by design: insights are harvested
when you judge the session worth it, never automatically. Follow
templates/prompts/session-end-continuity.md:
- Scan this session for insights worth preserving → create
type: insightthings. - Disposition the standing insights (the brake): run
python tools/mdllm.py validate .and act on every insight-disposition finding — promote, dismiss, consolidate, link from live work, or markdisposition: keep-active+ a reason. Capture (step 1) grows the population; this prunes it, so the two stay balanced. - Detect contradictions introduced this session → create
type: conflictthings. - Manage open-loop things — create/update a
planor work thing for new forward intent, move resolved ones to a terminal status (orient reads them;continuity.mdis retired). - Commit with a rich
session-end:message — the commit is the backward record (no WORKLOG file;mdllm worklogprints an on-demand view of git when wanted). - Report publication debt: run
python tools/mdllm.py estate-sync . --statusand surface the result. Autopush is fail-closed: only a repo declaring literalgit: autopush: truepublishes after commit — false, absent, or malformed policy is off, and publication authority never comes from silence. In an opted-out repo,ahead +n (unpushed)is the normal standing state of work awaiting its deliberate release — report it, never resolve it. Only under explicitly enabled autopush is an unpushed line an anomaly (offline session, or a rejected push owed a routing decision). Never resolve a rejection by force, and never push an opted-out repo yourself (git-workflow.md → Publication;autopush-requires-explicit-authority).
If the session has no domain-relevant changes worth harvesting, say so and stop — not every session earns an insight (publication debt still gets reported: step 6 reads git, not the session).
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.
- 6d ago First seen · 36 lines · 12 tokens per session scan A 46dbf286649d
end-session is a command published in the GitHub repository JanoshMoshiri/MarkdownLLM (5 stars, last pushed 5d ago), licensed MIT. It adds 12 tokens to every session and 510 once invoked, about $0.0001 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.
Other commands, from other repositories
minutes-ideas
Surface recent voice memos and ideas captured from any device. Use when the user asks "what ideas did I have?", "what were my recent memos?", "what did I record while walking?", or wants to recall a captured thought.
learn
Force claude-smart to extract learnings from this session now.
memory-store
Store an insight, decision, or pattern to memory.
cc-memory
Configure persistent memory that survives across sessions using a layered approach: split rule files for always-loaded context, auto-memory for organic learning, and optional MCP-backed long-term memory for large codebases.
analyze-context
USE WHEN you want to analyze project context before starting work on a task. Calls context + recall, then synthesizes goals, decisions, gotchas, and relevant memories into a pre-task brief.
lians-recall
Recall current (non-stale) facts from Lians memory, optionally as-of a past date.