/agent-memory:using-agent-memoryfrom agent-memory
Guides when and how to read/write Agent Memory (MCP-backed durable storage) vs host built-in memory. Useful for tasks involving persistent project or user knowledge.
Ships in agent-memory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Agent Memory is the MCP-backed durable memory system. It is separate from the host's built-in memory (Codex memories, Claude Code's memory/ directory and MEMORY.md index, or an equivalent), chat history, and .workflow/ artifacts. Use host built-in memory only as background, even when the host prompt asks you to save there: route durable user and project facts through memory_save/memory_update when the Agent Memory tools are available, and do not count a built-in memory read or write as the Agent Memory read or completion latch.
At conversation start, after compaction, or before non-trivial repository work, decide whether durable knowledge can change the answer or execution path. Do not wait for the user to explicitly ask for memory.
memory_recap when the task needs broad recovery across several memories; use memory_query for a focused question; use memory_recall only with a non-empty memory_id already returned by query/list/recap or named explicitly by the user. Never use memory_recall as the first semantic search or startup recall.global only when a cross-project user preference or stable work habit could matter.memory_recall, memory_list, or memory_inspect only when the focused query identifies a relevant entry, the index appears stale, or memory health itself is under investigation.Pass the absolute workspace_root for project reads and writes whenever server cwd may differ from the repo. When the user explicitly asks about another project or names its path, keep scope: project and pass that other project's absolute root to memory_query (focused) or memory_recap (broad); this reads only that project's store and never initializes it. Do not scan sibling projects or write to another root unless the user explicitly authorizes that operation. An empty project result is not proof that memory is absent until the root and index/deep view have been checked.
For recurring repository work, work resumed after compaction, or work that depends on several related memories, call memory_reconciliation_status once after the task-appropriate read. Check global only when global memory is relevant. If an initialized scope is due, briefly offer the user a project or global reconciliation; do not interrupt small work, automatically reconcile, or record it merely because it is overdue. Use memory_reconciliation_record only after the user-approved reconciliation was actually completed.
Memory reads are read-only. Memory writes are durable state changes.
memory_save, memory_update, memory_reconciliation_record, or other mutation tools unless the same request explicitly asks to remember, correct, or reconcile memory.global whenever the durable lesson can guide future work in more than one repository; use project for knowledge whose useful meaning depends on this repository. If a reusable lesson exists, save or update it without waiting for an explicit "remember this" request; if none exists, do not write.Prefer global for durable guidance reusable across projects: user preferences, communication habits, tool choices, model-behavior requirements, general workflows, root-cause and fix patterns, and verification practices. A lesson does not become project-only because it was learned during repository work, mentions the originating project as an example, or could also help that project. Use project for durable setup, build, release, architecture, integration, decisions, and operational facts whose useful meaning depends on this repository.
Use a practical portability test: if the memory can improve future work in another repository without requiring that repository to share this one's code or state, choose global. When both scopes have distinct durable value, save the reusable rule globally and the repository-specific details in project memory. Do not duplicate the same undistilled content in both scopes.
Never save secrets, credentials, private webhook values, raw session summaries, obvious code facts, temporary progress, speculative plans, or project facts in global memory. Preserve negation and ownership exactly when updating constraints.
Prefer memory_update when an existing canonical memory covers the same decision or workflow. Use memory_save only for a genuinely new durable fact. The selected scope is authoritative: the memory gate may allow, surgically rewrite, or reject content, but it must not reroute a write between global and project.
Resolve the configured project-memory root before applying Git rules; it defaults to .memory/. When that root is inside the repository, treat it as repository-owned team knowledge, not as a generated cache directory.
memories/, index/, embeddings/, graph/, and maintenance/ directories, including newly created files. Embeddings, graph edges, and reconciliation metadata are canonical project artifacts, not disposable build output..gitignore. Never discard or omit canonical files merely because Agent Memory generated them.memory.db* inside the configured root; this covers memory.db, memory.db-shm, and memory.db-wal. For the default root, the pattern is .memory/memory.db*.git status --short -- <configured-root> and ensure canonical changes are included in the intended repository diff. If git check-ignore -v reports a canonical file, remove the offending broad ignore rule instead of ignoring the artifact.After compaction, recover durable preferences from Agent Memory and active execution state from .workflow/; do not reconstruct either from chat when authoritative artifacts exist.
Stop after the single task-appropriate read or justified completion write. Do not perform graph maintenance, broad listing, or repeated recall as routine finalization.
Read references/operations.md only when diagnosing empty/stale memory, choosing lower-level tools, performing graph/maintenance work, or handling project .memory/ files.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub wiolett-industries/marketplace --plugin agent-memoryOther plugins' skills for the same job