Agent skill

Mem Search

by softspark in softspark/ai-toolkit

Searches past coding sessions for observations, decisions, context.

Apache-2.0Auto-check: notesAgent Workflows

Install Mem Search

skills CLI
$ npx skills add softspark/ai-toolkit --skill mem-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install softspark/ai-toolkit mem-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/mem-search .claude/skills/mem-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mem-search
GitHub stars
179
Token cost
~1.2k tokens
SKILL.md length
426 words
Files
1
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Searches past coding sessions for observations, decisions, context.

  • Works in 5 steps: Parse the search query from $ARGUMENTS.… → Initialize the database if it does not… → Run the FTS5 search against the… → …
  • Agent Workflows work in your project
  • SKILL.md covers How It Works, Instructions, Query Tips and Example, plus 3 more sections
  • Calls python3, sqlite3 and bash

What it does

Mem Search is an agent skill from softspark/ai-toolkit. Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior decisions, session history.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “Use the mem-search skill to search past coding sessions for observations, decisions, context”
  • “/mem-search”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Parse the search query from $ARGUMENTS. If empty, prompt the user for a query.
  2. Initialize the database if it does not exist
  3. Run the FTS5 search against the observations table
  4. Progressive disclosure -- present results in two stages
  5. If no results found, suggest

What it can do on your machine

Read from SKILL.md and the folder at commit e40ed87. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • sqlite3
    • bash
    • pg_dump
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mem Search loads about 1.2k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 426 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit e40ed87, republished under its Apache-2.0 licence (© softspark). 426 words, ~1,203 tokens.

Download SKILL.mdSave it as .claude/skills/mem-search/SKILL.md (or your agent's skills folder).
name
mem-search
description
Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior decisions, session history.
allowed-tools
Bash, Read
effort
medium
argument-hint
[search query]
user-invocable
true

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:

    bash
    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:

    bash
    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)

    markdown
    ## 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

Example

bash
/mem-search "postgres migration rollback"

Typical output:

## Memory Search: "postgres migration rollback"
Found 3 results across 2 sessions.

| # | Session | Project          | Tool | Time       | Preview                              |
|---|---------|------------------|------|------------|--------------------------------------|
| 1 | abc123  | magento2-os      | Edit | 2026-03-12 | Rolled back 0042_add_tax_col...      |
| 2 | def456  | magento2-b2b     | Bash | 2026-02-28 | pg_dump before schema migration...   |
| 3 | abc123  | magento2-os      | Read | 2026-03-12 | Reviewed migration safety checklist  |

Rules

  • MUST escape single quotes in queries by doubling (it''s) — SQL injection into the FTS5 call will break the query
  • NEVER return the raw database path — treat ~/.softspark/ai-toolkit/memory.db as internal
  • CRITICAL: if the database does not exist, initialize it silently and return zero results — do not fail the skill
  • MANDATORY: present Stage 1 (summary table) first; only expand to Stage 2 on follow-up
Show full SKILL.md (188 more words)Show less

Gotchas

  • FTS5 MATCH is picky: hyphens, slashes, and dots are parsed as operator separators and will reject queries like mem-search api/v1 with a cryptic malformed MATCH expression. Wrap multi-token phrases with double-quotes: "api/v1" or "mem-search".
  • Results are ordered by rank (FTS5 relevance), not by created_at. A stale but high-ranked match outranks a fresh but weak one — include the created_at column and consider ORDER BY rank, created_at DESC for time-sensitive queries.
  • The database path is static at ~/.softspark/ai-toolkit/memory.db. If the user runs from a container, ~ resolves to the container's home, not the host's — the observation list will look empty. Check the env var SOFTSPARK_HOME before assuming the DB is missing.
  • observations_fts is a separate virtual table; when observations are deleted directly (not via the SDK) the FTS index can drift. If counts between observations and observations_fts differ, rebuild with INSERT INTO observations_fts(observations_fts) VALUES('rebuild');.

When NOT to Use

  • To search the KB or documentation — use /research-mastery or smart_query()
  • To find a specific commit — use git log --grep or /git-mastery
  • To list agent tasks — use TaskList or /plan
  • When memory-pack hooks are not installed — direct the user to install them first

© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in app/skills/mem-search of softspark/ai-toolkit.

Open the folder on GitHubat commit e40ed87

Compare with similar skills

Mem Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mem Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mem Search this skillsoftspark/ai-toolkit179—~1.2kAutomated safety check: NotesApache-2.0
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers297k2 repos~5.1kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79589 repos~8.2kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    297k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Mem Search

What does Mem Search do?

Searches past coding sessions for observations, decisions, context. Mem Search is an agent skill from softspark/ai-toolkit. Searches past coding sessions for observations, decisions, context.

When should I use Mem Search?

Mem Search fits situations like: agent Workflows work in your project.

How do I install Mem Search in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill mem-search -a claude-code`. Or copy the skill folder (app/skills/mem-search in softspark/ai-toolkit) into .claude/skills/mem-search in your project. Claude Code loads it when a task matches its description.

How do I install Mem Search in Codex?

Run `npx skills add softspark/ai-toolkit --skill mem-search -a codex`. Or copy the skill folder (app/skills/mem-search in softspark/ai-toolkit) into .agents/skills/mem-search in your project. Codex loads it when a task matches its description.

Can I use Mem Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill mem-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mem-search, .gemini/skills/mem-search, .github/skills/mem-search and .opencode/skills/mem-search in your project.

What does Mem Search need to run?

Going by SKILL.md and its folder, Mem Search needs the command-line tools its instructions call (python3, sqlite3, bash, pg_dump and git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read.

Does Mem Search access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mem Search safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Mem Search use?

Mem Search is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mem Search use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mem Search?

Skills that share tags, products or a category with Mem Search: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mem Search?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 8, 2026.

Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.