done

A session-ending command for a project that uses a memory bank, a set of files storing project context and progress. It runs required checks, updates the core memory-bank files and adds a progress note.

In plain words
What is it for?
Use it when finishing a work session to run tests and rule checks, scan for placeholders, update project notes and append progress information.
Why use it?
It provides a defined closing step for recording the current state and checking for problems. If no memory bank exists, it reports that state without making those updates.

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/fockus/skill-memory-bank/done
Clone the repo
git clone --depth 1 https://github.com/fockus/skill-memory-bank
Per session 16 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,562 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.00016 $0.01562
Opus 5 $0.00008 $0.00781
Sonnet 5 $0.00003 $0.00312
Haiku 4.5 $0.00002 $0.00156

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

Security

Grade A, and why

done 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.

commands/done.md · 74 lines

How it starts

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

Canonical session-end command. /mb done is an alias that dispatches here.

Storage note. Resolve the active bank path through mb_resolve_path (in scripts/_lib.sh). Bank may be local (./.memory-bank/), global (<agent_config>/memory-bank/projects/<id>/.memory-bank/, registered via --storage=global), or legacy (.claude-workspace). All mb-* scripts called below already respect the resolver — pass --mb <resolved-path> when needed. If [MEMORY BANK: ABSENT], this command is a no-op except for surfacing the absent state.

0. Mandatory done-gates (runs even without a plan)

Run the gate set first — these are mandatory whether or not a plan was active:

bash scripts/mb-done-gates.sh --mb .memory-bank

It runs three independent checks in sequence (each emits a structured JSON line):

  1. Tests — dispatches the test runner (scope=touched if a baseline commit is inferable, else scope=full). not_applicable (no stack detected) counts as PASS with a logged WARN.
  2. Rules (deterministic)scripts/mb-rules-check.sh on the working tree; a CRITICAL violation fails the gate.
  3. Placeholdersscripts/mb-rules-check.sh --placeholders-only scans staged + uncommitted source for TODO|FIXME|XXX|...|pseudocode; any hit fails the gate. The deny list is configurable via pipeline.yaml:done_placeholders.deny.

Exit semantics: exit 0 only when every required gate passes. On any failure the script exits 2 and /mb done must stop — do not close the session.

Force overridebash scripts/mb-done-gates.sh --mb .memory-bank --force --reason "<one-line>":

  • --reason is mandatory when forcing; the script refuses --force without it (non-zero exit, no mutation).
  • On a forced run with failures the script appends ### NOTE: /mb done --force — gates failed: <gates>: <reason> to progress.md under today's ## YYYY-MM-DD heading (creating the heading if absent), writes the failure detail to .memory-bank/tmp/done-gate-failure-<ts>.json, then exits 0 so the close can proceed on the record.
  • Config lives in pipeline.yaml:done_gates (enabled, required, allow_force). When allow_force: false, --force is rejected outright.

If gates pass (or are forced), continue with the rest of this flow.

Read the full file on GitHub · 74 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 · 74 lines · 16 tokens per session scan A c81f91e0fab6

Subscribe to this mod's changes

done is a command published in the GitHub repository fockus/skill-memory-bank (25 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 1,562 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-30.