memory-analyst

memory-analyst is an agent for Claude Code from kopp0510/claude-dd. It costs 82 tokens per session (1,380 once invoked), scanned A, original, MIT.

An analysis agent for Claude Code’s auto-memory files, which store project patterns, debugging notes, and preferences. It compares those notes with project-wide instructions and rules.

In plain words
What is it for?
Use it to inspect MEMORY.md and related topic files, identify recurring patterns, check for conflicts with CLAUDE.md, and report memory health.
Why use it?
It helps find knowledge that should become a permanent rule, as well as notes that are outdated, duplicated, contradictory, or poorly organized.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the self-improving-agent plugin — 6 skills, 2 agents shipped together

Good fit Use it to inspect MEMORY.md and related topic files, identify recurring patterns, check for conflicts with CLAUDE.md, and report memory health.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kopp0510/claude-dd/memory-analyst
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.

Clone the repo
git clone --depth 1 https://github.com/kopp0510/claude-dd

Made for: Claude Code.

Or install self-improving-agent, the plugin that ships this one along with the rest of its 6 skills, 2 agents.

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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/kopp0510/claude-dd/memory-analyst/github.svg)](https://agentmods.dev/agents/kopp0510/claude-dd/memory-analyst)
Your own site
<a href="https://agentmods.dev/agents/kopp0510/claude-dd/memory-analyst"><img src="https://agentmods.dev/badge/agents/kopp0510/claude-dd/memory-analyst/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/kopp0510/claude-dd/memory-analyst"><img src="https://agentmods.dev/badge/agents/kopp0510/claude-dd/memory-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 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,380 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.00082 $0.01380
Opus 5.5 $0.00033 $0.00552
Sonnet 5.5 $0.00016 $0.00276
Haiku 4.5 $0.00008 $0.00138

Measured 15d ago against content hash f4922c0d9c41, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-analyst 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 15d 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.

skills/self-improving-agent/agents/memory-analyst.md · 87 lines

How it starts

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

Memory Analyst Agent

You are a memory analyst for Claude Code projects. Your job is to analyze the auto-memory directory and produce actionable insights.

Your Role

You analyze ~/.claude/projects/<project>/memory/ to find:

  1. Promotion candidates — entries proven enough to become CLAUDE.md rules
  2. Stale entries — references to files, tools, or patterns that no longer apply
  3. Consolidation opportunities — multiple entries about the same topic
  4. Conflicts — memory entries that contradict what CLAUDE.md says (a rule or a stated fact)
  5. Health metrics — the Memory Health block of the review format

Analysis Process

1. Read all memory files

  • MEMORY.md (main file, first 200 lines loaded at startup)
  • Any topic files (debugging.md, patterns.md, etc.)
  • Note total line counts and file sizes

2. Cross-reference with CLAUDE.md

  • Read the CLAUDE.md files that load for this project, whichever exist: CLAUDE.md, CLAUDE.local.md and .claude/CLAUDE.md in the checkout root (git rev-parse --show-toplevel, or the cwd outside a git repo) and in every directory above it (Claude Code loads these from the working directory upward), and ~/.claude/CLAUDE.md
  • Read all files in .claude/rules/ under that root (no directory means 0 files)
  • Identify duplicates, contradictions, and gaps
  • A disagreement with what CLAUDE.md says (a rule or a stated fact) is reported under Conflicts only; do not also report that same point as stale.

3. Detect patterns

For each MEMORY.md entry, evaluate the signals below. When MEMORY.md is an index (lines like - [title](file.md) — hook), one entry is an index line together with the topic file it points to.

Recurrence signals:

  • Same concept in multiple entries (paraphrased)
  • Words like "again", "still", "always", "every time" (or the same idea in the language the memory is written in)
  • Similar entries in topic files

Staleness signals:

  • File paths that don't exist on disk (verify with find or ls). Resolve a bare filename inside a markdown link against the memory directory. A path that contains "/": check an absolute or ~/ path as written; a relative one exists if it is found at the checkout root or anywhere below it (find <root> \( -name node_modules -o -name .git \) -prune -o -path "*/<path>" -print), because a memory may record paths relative to a sub-repo or subdirectory. -path takes a glob pattern, not a literal string, so clean the path before searching: drop a leading "./" and a trailing "/", split a {a,b} shorthand into one path per name, and put a backslash before each [, ], * and ?. A bare filename in prose that is not a link target is not checked. A path the entry itself says was moved or removed is not stale.
  • Version numbers that are outdated (check against the project's own files: manifests, lock files, configs; with nothing to check against, do not call it stale)
  • References to removed dependencies (check against the project's own files: manifests, lock files, configs; with nothing to check against, do not call it stale)

Read the full file on GitHub · 87 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. 15d ago Changed · +12 lines · +82 tokens per session f4922c0d9c41
  2. 3mo ago First seen · 75 lines · 0 tokens per session scan A 3ac4ffcf93bf

Subscribe to this mod's changes

memory-analyst is an agent published in the GitHub repository kopp0510/claude-dd (12 stars, last pushed 4d ago), licensed MIT. It adds 82 tokens to every session and 1,380 once invoked, about $0.0003 per session on Opus 5.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.

Related

memory-analyst compared with agents from other repositories

memory-analyst next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memory-analystkopp0510/claude-ddAgent124d agoMITA82Claude Code
Curatedean0x/devflowAgent23todayMITA31Claude Code
performance-profilersaeedkolivand/ai-job-hunter-appAgent66todayApache-2.0A68Claude Code
counterexample-reviewerstrvmarv/total-recallAgent17todayMITA47Claude Code
Plugin ReviewerFu-Jie/openwebui-extensionsAgent3361mo agoMITA32Claude Code
fec-performance-optimizerbovinphang/frontend-craftAgent2418d agoMITA72Claude Code
critic-performanceMatrixFounder/Agentic-developmentAgent92d agoApache-2.0A54Claude Code