memory

A skill for storing and retrieving project knowledge such as decisions, lessons, files, and known problems. It uses a command-line memory system that keeps information across sessions.

In plain words
What is it for?
Recording decisions and fixes, searching past knowledge, checking known problems, linking related memories, and supporting specialised agents.
Why use it?
It reduces repeated investigation and prevents useful project context from disappearing between conversations.

Skill for Claude CodeCodex

Part of the claude-memory-plugin plugin — 1 skill, 5 commands, 2 agents, 7 hooks shipped together

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 skills/gazmagik/claude-memory-plugin/memory
Any agent
npx skills add GaZmagik/claude-memory-plugin --skill memory
Clone the repo
git clone --depth 1 https://github.com/GaZmagik/claude-memory-plugin

Made for: Claude Code, Codex.

Or install claude-memory-plugin, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 2 agents, 7 hooks.

Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00111 $0.02612
Opus 5 $0.00056 $0.01306
Sonnet 5 $0.00022 $0.00522
Haiku 4.5 $0.00011 $0.00261

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

Security

Grade C, and why

memory scanned grade C with 2 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 3d ago.

The scan reads SKILL.md. This mod also ships 57 executable files (src/agents/scan-agent-directories.spec.ts, src/agents/scan-agent-directories.ts, src/agents/validate-agent-info.spec.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://bun.sh/install | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://bun.sh/install | bash
skills/memory/SKILL.md · 254 lines

How it starts

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

Purpose

Persist project knowledge across sessions. Record decisions, capture learnings, store code patterns, and retrieve context when needed. Prevents knowledge loss and repeated mistakes.

When to Invoke

  • Recording decisions, learnings, gotchas, or artifacts
  • User says "remember", "store", "save", "record this"
  • User asks "what did we decide about...", "why did we..."
  • Before starting significant work (check gotchas first!)
  • After fixing non-obvious bugs or making architectural decisions
  • When deliberating on complex choices (use think commands)
  • User says "brainstorm", "weigh options", "think through", "pros and cons"
  • When you need documented chain-of-thought before committing to a decision
  • When working with specialised agents that need their own knowledge base (--agent flag)

Usage

The memory skill is a TypeScript CLI that runs on Bun.

Prerequisites

Install Bun (if not already installed): Visit https://bun.sh/docs/installation or run:

curl -fsSL https://bun.sh/install | bash

Setup

From the plugin installation directory, run:

bun link

This creates a global memory command. The plugin directory is typically: ~/.claude/plugins/cache/local-memory-plugin/claude-memory-plugin/1.0.0/

Invocation

memory <command> [options]
memory help                    # Quick reference
memory help --full             # Detailed documentation
memory <command> -h            # Command-specific help

Command Reference

Run memory help for quick reference, or memory <command> -h for command-specific help.

Category Command Description
CRUD write [--auto-link] Create/update memory from JSON stdin
read <id> Read a memory by ID
list [type] [tag] List memories with optional filters
search <query> Search titles and content
semantic <query> Search by meaning using embeddings
delete <id> Delete a memory
agents List all registered agents with memory counts
Graph link <from> <to> Create relationship edge
unlink <from> <to> Remove relationship edge
bulk-link [file] Create multiple links from JSON
edges <id> Show inbound/outbound edges for node
graph [scope] Output graph as JSON
mermaid [options] Generate Mermaid diagram
remove-node <id> Remove node from graph (keeps file)
Analysis stats [scope] Graph statistics (ratio, hubs, sinks)
query [options] Filter memories (type, tags, edges)
impact <id> Show what depends on a memory (--json, --depth)
Tags tag <id> <tags...> Add tags to memory
untag <id> <tags...> Remove tags from memory
Quality quality <id> Assess quality score (--deep for LLM)
audit [scope] Bulk quality scan (--threshold, --deep)
audit-quick [scope] Fast deterministic-only audit
Maintenance health [scope] Quick health check with score
validate [scope] Detailed validation with issues
sync [scope] Reconcile graph, index, and disk
repair [scope] Run sync then validate
rebuild [scope] Rebuild from disk (use with caution)
reindex <id> Re-index an orphan file
bulk-delete [options] Delete memories by pattern/type/tags (--dry-run)
refresh [scope] Backfill missing frontmatter fields and edge similarity scores
setup [--force] Create local settings file from template
Bulk bulk-move [options] Move memories matching pattern
bulk-promote [options] Promote memories to type
bulk-tag [options] Add/remove tags from memories
bulk-unlink [options] Remove links from memories
Utility rename <old> <new> Rename memory ID (updates refs)
move <id> <scope> Move between local/global
promote <id> <type> Convert memory type (preserves edges)
demote <id> <type> Reverse conversion (alias for promote)
prune Remove expired temporaries
status Show system status
summarize [type] Generate summary rollups
archive <id> Archive a memory
suggest-links Suggest relationships (cached embeddings)
export [scope] Export graph snapshot to JSON
import <file> Import graph snapshot (--merge/replace)
sync-frontmatter [scope] Bulk sync frontmatter from graph.json
Thinking think create <topic> Create ephemeral thinking document
think add <thought> Add thought to current document
think counter <thought> Add counter-argument
think branch <thought> Add alternative/branch
think list List all thinking documents
think show [id] View document contents
think use <id> Switch current document
think conclude <text> Conclude (--promote type to save)
think delete <id> Delete thinking document

Read the full file on GitHub · 254 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 254 lines · 111 tokens per session scan C a43aaee235e1

Subscribe to this mod's changes

memory is a skill published in the GitHub repository GaZmagik/claude-memory-plugin (6 stars, last pushed 5mo ago), licensed MIT. It adds 111 tokens to every session and 2,612 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens