memory-search

memory-search is a skill for Claude Code from rjmurillo/ai-agents. It costs 77 tokens per session (1,462 once invoked), scanned A, original, MIT.

A semantic search tool for finding relevant facts and past decisions in stored project memory. It searches across the project's memory systems and can fall back to matching words when needed.

In plain words
What is it for?
Use it to recall prior context, search for facts or patterns, and investigate topics such as existing Git hooks before changing code.
Why use it?
It helps recover earlier context without rereading every session or memory file. This is useful when an agent needs to know what was previously decided or learned.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .claude/skills/memory/scripts/search_memory.py "git hooks".

Part of the project-toolkit plugin — 95 skills, 26 commands, 33 agents, 4 hooks shipped together

Good fit Use it to recall prior context, search for facts or patterns, and investigate topics such as existing Git hooks before changing code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents
agentmods
npx agentmods add skills/rjmurillo/ai-agents/memory-search

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 95 skills, 26 commands, 33 agents, 4 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/rjmurillo/ai-agents/memory-search/github.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/memory-search)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/memory-search"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/memory-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/memory-search"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/memory-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,462 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 151
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
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.00077 $0.01462
Opus 5 $0.00039 $0.00731
Sonnet 5 $0.00015 $0.00292
Haiku 4.5 $0.00008 $0.00146

Measured 2d ago against content hash 890afa09d85c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (tests/__init__.py, tests/test_skill_structure.py), 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.

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.

.claude/skills/memory-search/SKILL.md · 171 lines

How it starts

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

Tier 1 semantic search over memory: the focused search operation extracted from the memory router per ADR-063 (memory-skill decomposition). memory still routes here; a caller that needs only search loads this sub-skill instead of the full memory surface.

Triggers

Use this skill when the user says:

  • search memory for semantic search across stored knowledge
  • what do we know about X to recall facts, patterns, or constraints
  • recall prior context before changing existing code or architecture

Quick Start

# Search memory (Tier 1)
python3 .claude/skills/memory/scripts/search_memory.py "git hooks"

# JSON output for scripting
python3 .claude/skills/memory/scripts/search_memory.py "git hooks" --format json

The search script is canonical and shared with the memory router; this sub-skill does not reimplement it. It lives at .claude/skills/memory/scripts/search_memory.py.

Quick Reference

Operation Script Key Parameters
Search facts/patterns search_memory.py query, --max-results, --format

Routing

search_memory.py "<q>" keyword-ranks Serena memory names, also searches the Tier 2 episode store, flags large memories by token estimate, and returns the relevant *-index. Read that index, then follow its links to the atomic file.

Raw fallback when scripting: guess read_memory("<intuitive-name>") (a miss is a cheap "not found", not a list), then the domain *-index, then read_memory("memory-index"). Prefer these name and index lookups over a bare list_memories.

Progressive Disclosure

This skill implements progressive disclosure: list names, read details, deep dive on cross-references. The point is to avoid loading a large memory when a small slice answers the query.

Layer Tool Cost When to Use
Index search_memory.py ~100-500 tokens Always start here
Details read_memory ~500-10K tokens After index confirms relevance
Deep Dive Follow cross-references Variable For complete understanding

Read the full file on GitHub · 171 lines

Files

What ships with it

6 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. 2d ago Changed · -9 lines · -1 tokens per session 890afa09d85c
  2. 4d ago First seen · 180 lines · 78 tokens per session scan A b2a1c6186513

Subscribe to this mod's changes

memory-search is a skill published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 1,462 once invoked, about $0.0004 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-09-03.