MarkdownLLM: Command for Claude Code

.claude/commands/end-session.md

end-session is a command for Claude Code from JanoshMoshiri/MarkdownLLM. It costs 12 tokens per session (510 once invoked), scanned A, original, MIT.

A deliberate command for closing a work session while preserving useful decisions, unresolved tasks, and project history.

In plain words
What is it for?
It helps record insights, resolve or track contradictions, manage open tasks, validate their status, synchronize project records, and create a detailed Git commit.
Why use it?
It reduces the chance that important findings or unfinished work will be forgotten between sessions.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is JanoshMoshiri/MarkdownLLM's own configuration. It tells Claude Code how to work on MarkdownLLM 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 MarkdownLLM configures →

Reuse

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.

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

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/janoshmoshiri/markdownllm/end-session.svg)](https://agentmods.dev/commands/janoshmoshiri/markdownllm/end-session)
Your own site
<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>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 510 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.00012 $0.00510
Opus 5 $0.00006 $0.00255
Sonnet 5 $0.00002 $0.00102
Haiku 4.5 $0.00001 $0.00051

Measured 6d ago against content hash 46dbf286649d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

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

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:

  1. Scan this session for insights worth preserving → create type: insight things.
  2. 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 mark disposition: keep-active + a reason. Capture (step 1) grows the population; this prunes it, so the two stay balanced.
  3. Detect contradictions introduced this session → create type: conflict things.
  4. Manage open-loop things — create/update a plan or work thing for new forward intent, move resolved ones to a terminal status (orient reads them; continuity.md is retired).
  5. Commit with a rich session-end: message — the commit is the backward record (no WORKLOG file; mdllm worklog prints an on-demand view of git when wanted).
  6. Report publication debt: run python tools/mdllm.py estate-sync . --status and surface the result. Autopush is fail-closed: only a repo declaring literal git: autopush: true publishes 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).

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. 6d ago First seen · 36 lines · 12 tokens per session scan A 46dbf286649d

Subscribe to this mod's changes

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.