mem-search

mem-search is a skill for Claude Code, Codex from softspark/ai-toolkit. It costs 23 tokens per session (581 once invoked), scanned A, original, Apache-2.0.

A search tool for retrieving observations, decisions, and context from earlier coding sessions. It uses a searchable local database so you can ask about past work in natural language.

In plain words
What is it for?
Use it to search previous sessions for implementation notes, debugging findings, design decisions, and other saved coding observations.
Why use it?
It helps recover decisions and facts that would otherwise be buried in old conversations. This reduces repeated investigation and helps continue work with its earlier context.

Skill for Claude CodeCodex

Part of the ai-toolkit plugin — 114 skills, 44 agents, 14 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/softspark/ai-toolkit/mem-search
Any agent
npx skills add softspark/ai-toolkit --skill mem-search
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code, Codex.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 114 skills, 44 agents, 14 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 mem-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/mem-search.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/mem-search)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/mem-search"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/mem-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 581 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.00023 $0.00581
Opus 5 $0.00012 $0.00291
Sonnet 5 $0.00005 $0.00116
Haiku 4.5 $0.00002 $0.00058

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

Security

Grade A, and why

mem-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 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.

app/plugins/memory-pack/skills/mem-search/SKILL.md · 71 lines

How it starts

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

Search Session Memory

Search the persistent memory database for past coding observations, decisions, and context.

$ARGUMENTS

How It Works

This skill queries the SQLite FTS5 full-text search index at ~/.softspark/ai-toolkit/memory.db to find relevant observations from past sessions.

Instructions

  1. Parse the search query from $ARGUMENTS. If empty, prompt the user for a query.

  2. Initialize the database if it does not exist:

    python3 "$HOME/.softspark/ai-toolkit/hooks/../plugins/memory-pack/scripts/init_db.py" 2>/dev/null || true
    
  3. Run the FTS5 search against the observations table:

    sqlite3 ~/.softspark/ai-toolkit/memory.db "
      SELECT o.id, o.session_id, o.tool_name, o.content, o.created_at,
             s.project_dir, s.summary
      FROM observations_fts fts
      JOIN observations o ON o.id = fts.rowid
      LEFT JOIN sessions s ON s.session_id = o.session_id
      WHERE observations_fts MATCH '<query>'
      ORDER BY rank
      LIMIT 10;
    "
    

    Replace <query> with the user's search terms. Escape single quotes by doubling them.

  4. Progressive disclosure -- present results in two stages:

    Stage 1: Summary view (show first)

    ## Memory Search: "<query>"
    
    Found N results across M sessions.
    
    | # | Session | Project | Tool | Time | Preview |
    |---|---------|---------|------|------|---------|
    | 1 | abc123  | /path   | Edit | 2025-01-15 | First 80 chars... |
    

    Stage 2: Detail view (on request) Show the full observation content, session summary, and related observations from the same session.

  5. If no results found, suggest:

    • Trying broader search terms
    • Checking if memory-pack hooks are installed
    • Running init-db.sh if the database is missing

Query Tips

  • Use simple keywords: mem-search database migration
  • FTS5 supports prefix matching: migrat* matches "migration", "migrate"
  • Boolean operators: database AND NOT test
  • Column filters: tool_name:Edit to search only Edit tool observations

Read the full file on GitHub · 71 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 · 71 lines · 23 tokens per session scan A 2f1e7043cff4

Subscribe to this mod's changes

mem-search is a skill published in the GitHub repository softspark/ai-toolkit (168 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 581 once invoked, about $0.0001 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