memory-search

memory-search is a skill for Claude Code, Codex from LH8PPL/core-memory-kit. It costs 208 tokens per session (2,192 once invoked), scanned A, original, MIT.

A skill that searches the project's recorded memory for past decisions, conventions, architecture notes, and file locations. Core Memory Kit is the system that stores this project knowledge.

In plain words
What is it for?
It is for finding relevant project memories and returning a selected summary with citations.
Why use it?
It helps answer questions using decisions already documented by the project instead of relying only on the current conversation.

Skill for Claude CodeCodex

Part of the core-memory-kit plugin — 4 skills, 8 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/lh8ppl/core-memory-kit/memory-search
Any agent
npx skills add LH8PPL/core-memory-kit --skill memory-search
Clone the repo
git clone --depth 1 https://github.com/LH8PPL/core-memory-kit

Made for: Claude Code, Codex.

Or install core-memory-kit, the plugin that ships this one along with the rest of its 4 skills, 8 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lh8ppl/core-memory-kit/memory-search.svg)](https://agentmods.dev/skills/lh8ppl/core-memory-kit/memory-search)
Your own site
<a href="https://agentmods.dev/skills/lh8ppl/core-memory-kit/memory-search"><img src="https://agentmods.dev/badge/skills/lh8ppl/core-memory-kit/memory-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 208 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,192 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 $0.00208 $0.02192
Opus 5 $0.00104 $0.01096
Sonnet 5 $0.00042 $0.00438
Haiku 4.5 $0.00021 $0.00219

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

Security

Grade A, and why

memory-search 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 4d 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.

plugin/skills/memory-search/SKILL.md · 173 lines

How it starts

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

Recalling from deep memory

You are a memory-retrieval agent. Search the kit's memory archive for: $ARGUMENTS

Query well: search the core noun phrases (e.g. "deploy target", "auth library decision"), not a full sentence. If the line above carries NO query (you run isolated and cannot see the conversation), start from the "When the query is vague" section below instead.

Memory is the ground truth for documented knowledge and prior decisions (the injected-snapshot authority rule). Your job is to find what is already recorded and return ONLY a curated summary — never the raw dumps.

The recall ladder (filter before you fetch; stop at the shallowest rung that answers)

Work index → neighborhood → bodies → (last resort) the session record. Full bodies are ~10x the tokens of an index line; fetch them only for the ids that survived filtering. Stop climbing the moment a rung answers the question — most questions end at step 1 or 2.

Step 1 — Search the index. Prefer the MCP tool when the cmk server is connected; otherwise the CLI:

  • MCP: mk_search with query (natural language is fine — when semantic recall is enabled the project default searches by meaning; paraphrase hits) AND source: "skill" (a telemetry tag — it lets the kit measure how often this skill fires; harmless, always pass it).
  • CLI: cmk search "<query>" --source skill

Each hit is one line: id, tier/trust, source location, snippet. Run 1-3 query variants if the first misses (synonyms; the key noun alone). Drop hits that are clearly off-topic or too generic.

Score the survivors before you fetch. After dropping off-topic hits, rate each remaining hit 1-3 for how directly it answers the question (3 = likely answers it, 1 = tangential). Fetch full bodies (step 3) ONLY when at least 2 hits survive at score ≥ 2 — a lone weak hit rarely repays the tokens; answer from the index line + a re-query instead. This is the policy-retriever discipline: filter hard, fetch little.

Relative-answer re-query. If the question is relative — "the same X as Sarah", "like the auth project", "whatever we used last time" — a single search often can't resolve it. Re-query the REFERENT first (search "Sarah" / "auth project" to find X), THEN search X for the actual answer. Two cheap searches beat one that can't land.

Read the full file on GitHub · 173 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. 4d ago First seen · 173 lines · 208 tokens per session scan A e5da1254bfa2

Subscribe to this mod's changes

memory-search is a skill published in the GitHub repository LH8PPL/core-memory-kit (7 stars, last pushed today), licensed MIT. It adds 208 tokens to every session and 2,192 once invoked, about $0.0010 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-31.

Related

Other skills, from other repositories