plan

A command for creating a detailed work plan for a feature, bug fix, refactor, or experiment. It saves the plan in a memory bank, a project folder used to keep planning information.

In plain words
What is it for?
Use it to plan engineering work before implementation. It helps organize work into phases, sprints, and stages and stores the resulting plan for later reference.
Why use it?
It turns a vague task into documented steps and a clear definition of done, while checking that the project's memory bank is ready first.

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/plan
Clone the repo
git clone --depth 1 https://github.com/fockus/skill-memory-bank
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,142 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.00014 $0.02142
Opus 5 $0.00007 $0.01071
Sonnet 5 $0.00003 $0.00428
Haiku 4.5 $0.00001 $0.00214

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

Security

Grade A, and why

plan 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/plan.md · 168 lines

How it starts

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

Plan: $ARGUMENTS

Canonical planning command. /mb plan is an alias that dispatches here.

Storage note. Resolve the active bank path through mb_resolve_path (in scripts/_lib.sh). The plan file ends up at <resolved-bank>/plans/<YYYY-MM-DD>_<type>_<topic>.md regardless of whether the bank is local, registered global storage, or legacy .claude-workspace. If [MEMORY BANK: ABSENT] (rules-only mode), refuse to plan and tell the user to run /mb init first — but do not auto-initialize.

0. Validate arguments

Parse $ARGUMENTS into <type> <topic>. Allowed type: feature, fix, refactor, experiment. If type is missing or not in the allowed set, stop and ask the user. If topic is empty, stop and ask.

Hierarchy reminder: Phase → Sprint → Stage. See references/templates.md § Plan decomposition for sizing rules. Cyrillic «Этап / Спринт / Фаза» — legacy alias; the scaffold script will soft-warn if you use them in <topic>.

1. Preparation

Read before you start:

  1. ~/.claude/CLAUDE.md — global rules
  2. ~/.claude/skills/memory-bank/references/templates.mdMUST read the "Plan decomposition — Phase → Sprint → Stage" section
  3. ./RULES.MD (project-level, if present) — project-specific decomposition rules + 200k-per-Sprint hard limit
  4. ./.memory-bank/roadmap.md — current priorities (if present)
  5. ./.memory-bank/checklist.md — current tasks (if present)
  6. ./.memory-bank/lessons.md — known anti-patterns (if present)
  7. ./.memory-bank/codebase/*.md — stack / architecture / conventions / concerns summaries (if populated)

Study the codebase in the context of the topic. Find and read the files relevant to "$ARGUMENTS".

1.5. Decompose by size — Phase / Sprint / Stage

Before scaffolding, estimate the scope:

Estimate Target structure Plan file(s)
≤ 3 stages, one session Plain plan (no Phase/Sprint) 1 file, 3-5 <!-- mb-stage:N --> markers
3-7 stages, several days One Sprint = one plan file 1 file, 5-7 stages
≥ 2 Sprints with dependencies Phase roadmap + one plan file per Sprint 1 roadmap + N Sprint plan files

Read the full file on GitHub · 168 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 · 168 lines · 14 tokens per session scan A e7fd86de0b47

Subscribe to this mod's changes

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