memory-self-review

memory-self-review is a command for Claude Code from ucsandman/DashClaw. It costs 43 tokens per session (748 once invoked), scanned A, original, MIT.

A review command that examines recent DashClaw agent history and persistent memory for repeated problems. It produces suggested instruction or memory improvements for a person to approve.

In plain words
What is it for?
Checking memory size and health, finding repeated corrections or failure patterns, and proposing focused updates to CLAUDE.md or MEMORY.md.
Why use it?
It helps reveal recurring mistakes and keeps stored guidance useful without changing those files automatically.

Command for Claude Code

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/ucsandman/dashclaw/memory-self-review
Clone the repo
git clone --depth 1 https://github.com/ucsandman/DashClaw

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 memory-self-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/ucsandman/dashclaw/memory-self-review.svg)](https://agentmods.dev/commands/ucsandman/dashclaw/memory-self-review)
Your own site
<a href="https://agentmods.dev/commands/ucsandman/dashclaw/memory-self-review"><img src="https://agentmods.dev/badge/commands/ucsandman/dashclaw/memory-self-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 748 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.00043 $0.00748
Opus 5 $0.00022 $0.00374
Sonnet 5 $0.00009 $0.00150
Haiku 4.5 $0.00004 $0.00075

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

Security

Grade A, and why

memory-self-review 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 5d 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/memory-self-review.md · 33 lines

How it starts

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

You are running DashClaw's self-improvement loop. Your job is to turn the last $1 (default 7) days of agent history into a small, concrete set of PROPOSED improvements to the operator's persistent instructions and memory. This is human-gated: you PROPOSE, you do NOT edit CLAUDE.md, MEMORY.md, or any memory/settings file. The operator reviews and applies.

Keep it cheap and tight — this should be a short, scannable proposal, not an essay.

1. Memory health check

  • Read C:\Users\sandm\.claude\projects\C--Projects-DashClaw\memory\MEMORY.md; report its size vs the ~24.4KB cap. If it's over ~20KB, identify the longest index entries and the inline paragraphs that should move into their own topic file (the index must stay a lean pointer list — see reference_memory_system_boundary.md).
  • Flag memory files whose status reads as finished history (e.g. "SHIPPED", "RESOLVED", "LANDED on main") that could be demoted to a terse one-line pointer to keep recall sharp.

2. Mine recent history (read-only)

  • Use the claude-mem MCP (mcp-search: search, timeline, get_observations) to scan the last $1 days for: repeated corrections from the operator, the same bug class recurring, repeated tool sequences that could be a workflow, and tasks that stalled or were redone.
  • Skim C:\Users\sandm\.claude\stats-cache.json for shifts in volume, model mix (Opus vs Sonnet/Haiku share), and effort that suggest a routing or cost-discipline tweak.
  • Be evidence-based: only surface a pattern you can point to (cite session ids / observation ids / dates). A pattern must appear 3+ times to become a proposed rule. Do not invent patterns to look thorough.

3. Propose (do not apply)

For each finding, write a proposal block:

FINDING: <what recurred>  (evidence: <ids/dates>, seen Nx)
PROPOSED CHANGE: <exact edit — which file, which section, the literal line to add/change>
RATIONALE: <why this prevents the recurrence>

Prefer the smallest durable change: a new one-line rule in the right CLAUDE.md, a new/updated memory file, or a MEMORY.md trim. If something is better solved by a new subagent or workflow than a rule, say so.

Read the full file on GitHub · 33 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. 5d ago First seen · 33 lines · 43 tokens per session scan A 0bc019ed2af1

Subscribe to this mod's changes

memory-self-review is a command published in the GitHub repository ucsandman/DashClaw (295 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 748 once invoked, about $0.0002 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.