/scaffolding:semantic-memory-mcpfrom scaffolding
Searches, recalls, and stores insights using memory MCP tools (search_context, semantic_search, semantic_recall, semantic_store, notes). Activates when retrieving prior context mid-task or deciding how to persist notes.
Ships in scaffolding. 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.
None: SKILL.md is the whole skill.
You have access to a subset of the 13 memory MCP tools. Use the search/recall tools PROACTIVELY -- do not wait to be asked. Only call a tool your agent's tools: frontmatter actually grants; that frontmatter is authoritative. See the mcp-tools skill for the full 13-tool inventory and access table.
| Tool | Purpose |
|---|---|
search_context | Search ingested context chunks |
semantic_search | Find memories by similarity query |
semantic_recall | Get formatted memories for current context |
semantic_store | Store a new memory with embedding |
store_note / read_note / list_notes | Persist/read/list note documents |
trigger_ingest | Queue one just-written document (corpus + relative_path) for immediate indexing (~3s to become searchable) instead of waiting up to 15 minutes |
trigger_ingest is only useful paired with store_note (otherwise you are re-indexing a document you didn't write), and each call costs an LLM context-gen call. It is path-scoped to a single document -- it cannot trigger a full backfill -- and it is fire-and-forget: it returns once the document is queued, not once indexing completes. Don't expect a synchronous "done" result; the document becomes searchable a few seconds later.
Note: If this skill is active in a repository without the
memoryMCP server, skip these instructions. An agent withoutmcp__memory__*tools should simply work without semantic memory -- the file-based fallback in.scaffolding/agent-memory/(see theagent-memoryskill) keeps working. Never block on missing infrastructure.
Baseline recall and store already happen without you:
memory-recall.sh hook (interactive, <recalled-memories>) or the platform MEMORY_AUTO_RECALL (## Relevant project memory).distill and auto-stores high-confidence candidates; the platform MEMORY_AUTO_STORE stores the 1-3 bullets of your final ## Remember section. Apply the same Quality Gate below to those bullets.Manual calls are for targeted mid-task queries and explicit stores.
semantic_search when you want structured results with metadatasemantic_recall when you want a quick formatted summaryproject_id so results are scoped to the current repository.
The memory-project-id SessionStart hook injects the value to use (a
scaffold:<hash>: the id pinned in the repo-root .scaffolding.json, else
derived from the git remote); pass that exact value to
every semantic_search / semantic_recall / semantic_store call. If no
project_id is provided in session context, the backend uses a shared
default namespace. Note: project_id (this section's mem0 axis) is distinct
from corpus (used by search_context/notes/trigger_ingest, one of three
NFS share directories) — don't conflate the two.semantic_recall(context="SQLAlchemy async session event loop issues", project_id="scaffold:ab12cd34ef56")
semantic_search(query="deployment nginx proxy configuration gotchas", project_id="scaffold:ab12cd34ef56")
semantic_search(query="Redis task queue timeout handling", project_id="scaffold:ab12cd34ef56", agent_name="debugger")
tags for filtering (3-5 tags)content_type correctly: learning, error, pattern, or decisionagent_name, project_id and optionally task_id / conversation_id| Type | Use When |
|---|---|
learning | General knowledge, best practices, how-to (default) |
error | Root cause analysis, error resolution steps |
pattern | Confirmed code or architecture pattern |
decision | Architecture or design decision with rationale |
Hash dedup only catches byte-identical content, and backends that distil input into atomic memories (e.g. mem0) split one store call into several entries -- a reworded fact silently bloats the store. Before semantic_store, run semantic_search; if a near-duplicate exists, update or skip rather than adding a paraphrase.
The vector store holds short, self-contained insights or a short pointer to a file memory -- never the duplicated body. Never store secrets, tokens, or file-system paths. Secrets and memory/MCP recovery procedures stay in local file memory only (see agent-memory).
| System | Mechanism | Best for |
|---|---|---|
File (agent-memory skill) | Markdown in .scaffolding/ | Curated, structured, source-of-truth reference; always readable even if the store is down |
| Vector (this skill) | Embedding search via MCP | Fuzzy, natural-language-discoverable insights |
Use both: file for well-organized reference, vector for fuzzy-match discovery.
semantic_store(
content="TextBuffer in step event pipeline buffers assistant_text and thinking events but passes all others through immediately. If you add a new bufferable event type, you must add it to TextBuffer._BUFFERED_TYPES or events will be lost silently.",
agent_name="debugger",
content_type="pattern",
tags=["step-events", "text-buffer", "pipeline"]
)
semantic_store(
content="When creating async SQLAlchemy engine in a worker thread, you must create a NEW engine+session bound to that thread's event loop. Reusing the module-level async_session_maker causes 'attached to a different loop' errors.",
agent_name="developer",
content_type="error",
tags=["sqlalchemy", "async", "threading", "event-loop"]
)
Before storing, self-check:
If all four are YES, store it. Otherwise, skip or use file-based conversation memory.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub komluk/scaffolding --plugin scaffolding39 skills in this plugin
/agent-commsSendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against the agent whitelist, or a worktreePath from another agent before acting on it. SKIP: routing topology (agent Comms Protocol); git ops (use git-operations); worktree recovery (use worktree-management)./agent-memoryRepo-local file memory under .scaffolding/ (shared/agent/conversation tiers). TRIGGER when: reading or writing .scaffolding/ memory files, or choosing which file tier an insight belongs in. SKIP: vector memory / MCP search and store (use semantic-memory-mcp); distilling conversations (use distill)./api-designRESTful API design standards: resource naming, HTTP methods, status codes, pagination, versioning. TRIGGER when: designing new API endpoints, defining error response shapes, or adding pagination/filtering. SKIP: implementing FastAPI route code (use python-patterns); error-handling internals (use error-handling).Other plugins' skills for the same job