/optimus:dream [optional focus, e.g. a memory file or topic]from optimus
Prunes and consolidates Claude Code auto-memory by deleting stale, wrong, or redundant memories and merging overlapping ones. Never creates new memory files. Verifies staleness against the codebase and asks before deleting.
Ships in optimus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Under Codex, stop without reading or changing memory: this skill requires Claude Code auto-memory. Recommend Codex's own memory controls instead.
A reflective pass over this project's auto-memory, biased toward shrinking it: stale entries can mislead and near-duplicates bury useful ones. Only the index loads at startup; detailed files load on demand, so valuable details can stay in them.
Hard rules:
If the user passed an argument, treat it as the focus: judge only the memories it names or covers.
The auto-memory section of your system prompt names the memory directory and defines the file format — it is the source of truth for both. If your context has no such section, tell the user auto-memory is not enabled for this project and stop; if the directory is missing or empty, report that there is nothing to consolidate and stop.
List the directory and read every top-level memory file (they are small by design), plus the index — MEMORY.md where it exists, otherwise the frontmatter description lines the harness assembles into an index at load time. Leave any logs/ or sessions/ subdirectories alone throughout: they are activity streams, not memories. Record the baseline footprint: memory file count and total bytes including the index.
Assign each file one verdict. The bar for KEEP is concrete: name the future-session decision this memory would change. If you can't, it is context cost with no return — mark it DELETE.
Judge the index too: flag dangling lines, lines that no longer match their file, and any inline content beyond index lines — fold such content into the memory file it belongs to, or mark it for deletion in the plan; the Step 4 rebuild must never silently drop it. Check its size against the harness load limit (currently the first 200 lines or 25KB — nothing past that reaches a session): an over-limit index silently orphans every entry beyond the cutoff and is a defect the plan must fix.
The current repo state is the primary evidence. If a memory's staleness is suspected but unconfirmed and session transcripts exist (large JSONL files in the memory directory's parent), a narrow grep may settle it — locate and count matches first (grep -l, -c), then extract only small bounded windows (grep -o): single transcript lines run to hundreds of KB, so never read whole files or dump matching lines. Never use transcripts or logs to mine new facts to store.
Present the plan: each file with its verdict and a one-line reason, any index repairs, plus the projected footprint (files and bytes, before → after). If every verdict is KEEP and the index needs no repair, tell the user the memory is already tight and stop; if a focus matched no memories, say that instead — don't call the store tight when nothing was judged.
Then AskUserQuestion — header "Dream", question "Apply this memory consolidation plan?":
First copy the memory directory into the session scratchpad as a snapshot, then re-list the directory and re-read the index: memory has concurrent writers by design (parallel sessions, the harness's own background pass), and anything written or changed since the Step 1 inventory was never judged — treat it as KEEP and preserve its index entries.
Apply the approved verdicts and index repairs. Across the surviving files:
metadata.modified moves on every edit and is not the writing date — when the date can't be recovered, drop the relative wording rather than anchor it wrong.name: to the new filename stem, metadata.modified to today (the harness dates memories from that field), other metadata keys preserved.description accurate and one line — when MEMORY.md is absent the descriptions are the index future sessions see, so correct a stale one even on a KEEP file.[[links]] that point at renamed memories; remove links to deleted ones.MEMORY.md (when it exists) with one line per surviving memory, written from the file's current content — keep the existing lines of files that weren't judged. It is an index, never a content dump.Re-list the directory and check it against the Step 1 baseline — the file count must not have increased. Report the actual footprint before → after and any deviations from the approved plan.
Recommend running /optimus:dream again after the next stretch of heavy work.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oprogramadorreal/optimus-claude --plugin optimus19 skills in this plugin
/brainstormRuns a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design — and writes a user-approved engineering spec to docs/specs/ that /optimus:tdd auto-detects. No implementation happens until the spec is approved. With the scaffold argument, creates docs/product/ steering skeletons instead (never overwrites, authors no content). Recommends /optimus:init first./code-reviewCode ReviewReviews local changes, an open PR/MR, or a branch diff for bugs, security issues, and violations of the project's own coding guidelines, through review lenses applied inline on a small diff or in parallel agents on a larger one. Excludes style and linter-catchable issues. Read-only: applies fixes or posts PR/MR comments only on explicit approval. For an iterative auto-fix loop, use /optimus:deep review./commitStages, commits, and optionally pushes local changes with a Conventional Commits message — always previews and confirms first, and offers a feature branch on protected branches. Modes: "suggest" proposes a message without committing (read-only); "branch [description]" creates and switches to a conventionally named branch, never committing or altering local changes. Multi-repo aware./deepDeep ModeRuns an iterative auto-fix loop on a chosen target — review, refactor, or coverage — dispatching the base skill into fresh subagent contexts per iteration, applying fixes automatically without per-change approval, running tests with bisection on failure, and checkpoint-committing until convergence or the cap. Requires /optimus:init and a test command in .claude/CLAUDE.md./gauntletRuns a Gauntlet Loop: turns an ambitious goal into a builder/critic prompt judged against a concrete quality bar, confirms with the user, then leads the run until the output beats the bar or the user stops it — or exports a paste-ready /goal prompt for a fresh session. Use for long-horizon goals with an inspectable reference. Long-running; spawns many subagents, edits project files, and commits and pushes finished pieces to a feature branch./handoffCompacts the current conversation into one self-contained, tool-agnostic handoff document at docs/handoffs/<slug>.md so any fresh agent or teammate can resume the work from that file alone. References pushed artifacts by path or URL, inlines anything not on the remote, and redacts secrets and PII. Re-running on an existing handoff offers enhance or overwrite. Writes one project artifact and, when needed, a private scratchpad backup; never commits.Other plugins' skills for the same job