semantic-memory-store

semantic-memory-store is a skill for Claude Code, Codex from komluk/scaffolding. It costs 63 tokens per session (1,251 once invoked), scanned A, original, MIT.

A guide for storing reusable insights in semantic memory so they can later be retrieved through similarity search.

In plain words
What is it for?
Use it after finding a verified insight worth reusing across sessions or projects; do not use it for temporary context, large code samples, or information already documented elsewhere.
Why use it?
It preserves non-obvious discoveries, debugging causes, architectural decisions, and confirmed patterns beyond the current task.

Skill for Claude CodeCodex

Part of the scaffolding plugin — 35 skills, 9 commands, 13 agents 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/komluk/scaffolding/semantic-memory-store
Any agent
npx skills add komluk/scaffolding --skill semantic-memory-store
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Made for: Claude Code, Codex.

Or install scaffolding, the plugin that ships this one along with the rest of its 35 skills, 9 commands, 13 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 semantic-memory-store

README.md
[![agentmods](https://agentmods.dev/badge/skills/komluk/scaffolding/semantic-memory-store.svg)](https://agentmods.dev/skills/komluk/scaffolding/semantic-memory-store)
Your own site
<a href="https://agentmods.dev/skills/komluk/scaffolding/semantic-memory-store"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/semantic-memory-store.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,251 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.1 $0.00063 $0.01251
Opus 5 $0.00032 $0.00626
Sonnet 5 $0.00013 $0.00250
Haiku 4.5 $0.00006 $0.00125

Measured 5d ago against content hash abdf644d4c81, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

semantic-memory-store 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.

skills/semantic-memory-store/SKILL.md · 115 lines

How it starts

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

Semantic Memory Store

Store knowledge as vector-embedded entries in an optional semantic memory service. When the service is available, entries are automatically embedded and retrievable via cosine similarity search by any agent in future sessions.

This skill is optional. If no semantic memory service is configured, agents should degrade gracefully and rely on the file-based memory described in the agent-memory skill.

When to Use

  • Agent discovers a non-obvious insight worth preserving beyond file-based memory
  • A debugging session reveals a root cause that would help future agents
  • An architectural decision is made that affects multiple components
  • A pattern or anti-pattern is confirmed through implementation experience
  • Cross-project knowledge that does not belong in a single file

When NOT to Use

  • Temporary task context (use conversation memory in .scaffolding/conversations/)
  • Information already in CLAUDE.md, docs/, or KNOWLEDGE.md
  • Large code snippets (use file-based memory instead)
  • Speculative or unverified conclusions

Availability Check

Before attempting to store or search, verify a semantic memory backend is reachable:

  • If mcp__memory__* MCP tools are available, use those (see the semantic-memory-mcp skill).
  • If an optional backend service is configured for the project, use its documented interface.
  • If neither is available, skip this skill entirely and use file-based memory from the agent-memory skill. Do not block on missing infrastructure.

How to Store

When a semantic memory backend is available, store an entry with the following fields. The backend embeds the content and persists it for similarity search.

Parameter Reference

Parameter Required Description
content Yes Text to embed and store (keep concise; long content may be truncated)
agent_name No Agent that created this memory (e.g. developer, debugger)
content_type No One of: learning, error, pattern, decision (default: learning)
tags No List of string tags for filtering
task_id No Source task ID if applicable
project_id No Associated project ID
conversation_id No Associated conversation ID

Read the full file on GitHub · 115 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 · 115 lines · 63 tokens per session scan A abdf644d4c81

Subscribe to this mod's changes

semantic-memory-store is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 1,251 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

export

Export a NeatContext context saved from a conversation into a self-contained bundle folder that can be shared or moved to another machine. Use only when the user explicitly invokes this skill or asks to export a NeatContext context.

XTSoftwareLabs/neatcontext-plugins · 47 tokens

use

Connect or switch Codex to a local NeatContext Context by name or list number. Use only when the user explicitly invokes this skill, names a context to connect, or agrees to a routing suggestion.

XTSoftwareLabs/neatcontext-plugins · 43 tokens

delete

Preview and permanently delete a NeatContext context while preserving any externally linked knowledge folder. Use only when the user explicitly invokes this skill or clearly asks to delete a context.

XTSoftwareLabs/neatcontext-plugins · 36 tokens