agentleFS
YehudaFrankelYehudaFrankel/clankbrain/.claude/skills/search-memory/SKILL.md

search-memory

Skill16 starsChanged 7 months agoMITView on GitHub

Deep cross-memory search using parallel subagents. Use when asked broad conceptual questions like "what do we know about X", "have we solved X before", "find anything about X" — questions that could live in multiple memory files. Simple lookups (single known file) still use --search directly.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before searching, confirm the memory root is configured:

    line 45
  2. Very specific:

    Check if [MEM] is defined in the current session context (set by Start Session or CLAUDE.md)

    line 47
  3. Very specific:

    If not known, look for it in the project's CLAUDE.md: grep for \[MEM\] or memory path definition

    line 48
  4. Very specific:

    Verify at least one anchor file exists at the resolved path: lessons.md or error-lookup.md

    line 49
  5. Distinctive:

    Do not proceed to Step 1 until [MEM] resolves to a real path with at least one memory file present.

    line 62
  6. Distinctive:

    If any agent found a specific match, offer:

    line 150
  7. Distinctive:

    If a file doesn't exist, the agent skips it silently (no error)

    line 158

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: search-memory

Description

Parallel subagent search across all memory categories. Spawns 4 agents simultaneously — one per category group — then aggregates their findings into a single ranked answer.

Trigger phrases:

  • "what do we know about [X]"
  • "have we seen [X] before"
  • "search memory for [X]"
  • "find anything about [X]"
  • "check if we've dealt with [X]"
  • Any question where the answer could live in 2+ memory files

Simple queries → skip this skill, use --search directly:

  • "what's in lessons.md" → Read the file
  • "grep for X in error-lookup" → Grep directly
  • Known single-file lookups → no parallel needed

Memory Categories

AgentFiles it searches
Agent A — Knowledgelessons.md, decisions.md, regret.md
Agent B — Errors & Guardserror-lookup.md, critical-notes.md, guard-patterns.md
Agent C — Project Stateproject_status.md, code-map.md (if exists), your_journey_plan.md (if exists)
Agent D — Live Contextsession_journal.md (last 20 entries), todo.md, tasks/velocity.md, tasks/skill_scores.md

Memory root: [MEM] = value read from the current project's MEMORY.md


Steps

Step 0 — Resolve [MEM] (required before anything else)

Before searching, confirm the memory root is configured:

  1. Check if [MEM] is defined in the current session context (set by Start Session or CLAUDE.md)
  2. If not known, look for it in the project's CLAUDE.md: grep for \[MEM\] or memory path definition
  3. Verify at least one anchor file exists at the resolved path: lessons.md or error-lookup.md

If [MEM] cannot be resolved or anchor files are missing — STOP:

⚠ Memory root not configured.

[MEM] is not set or the memory files don't exist yet.
Run: Start Session
This pulls your memory from GitHub and initializes [MEM] for this session.

If this is a new project, run Start Session once to set up your memory root.

Do not proceed to Step 1 until [MEM] resolves to a real path with at least one memory file present.


Step 1 — Extract the query

Identify the search term from the user's question. If vague ("that thing we fixed"), ask one clarifying question.

Step 2 — Launch 4 parallel agents

Spawn all 4 in a single message (they run concurrently):

Agent A prompt:

Search for "[QUERY]" across these memory files:
- [MEM]/lessons.md
- [MEM]/decisions.md
- [MEM]/regret.md

Use Grep to search each file for the query term and related terms.
Return: file name, matching line(s), and a 1-2 sentence summary of what was found.
If nothing found, return "No match in [file]".
Do not read whole files — grep only.

Agent B prompt:

Search for "[QUERY]" across these memory files:
- [MEM]/error-lookup.md
- [MEM]/critical-notes.md (or rules/critical-notes.md if not in memory root)
- [MEM]/guard-patterns.md

Use Grep to search each file for the query term and related terms.
Return: file name, matching line(s), and a 1-2 sentence summary of what was found.
If nothing found, return "No match in [file]".
Do not read whole files — grep only.

Agent C prompt:

Search for "[QUERY]" across these memory files:
- [MEM]/project_status.md
- [MEM]/java_reference.md (if exists)
- [MEM]/js_functions.md (if exists)
- [MEM]/html_css_reference.md (if exists)

Use Grep to search each file for the query term and related terms.
Return: file name, matching line(s), and a 1-2 sentence summary of what was found.
If nothing found, return "No match in [file]".
Do not read whole files — grep only.

Agent D prompt:

Search for "[QUERY]" across these memory files:
- [MEM]/session_journal.md (last 30 lines only — use Read with offset to get tail)
- [MEM]/todo.md
- [MEM]/tasks/velocity.md (if exists)

Use Grep + Read(limit) to search each file for the query term and related terms.
Return: file name, matching content, and a 1-2 sentence summary of what was found.
If nothing found, return "No match in [file]".

Step 3 — Aggregate results

Collect all 4 agent responses. Synthesize into:

## Memory search: "[QUERY]"

### Lessons / Decisions / Regret
[Agent A summary — or "Nothing found"]

### Errors / Guards / Critical Notes
[Agent B summary — or "Nothing found"]

### Project State / Reference
[Agent C summary — or "Nothing found"]

### Recent Context / Todo
[Agent D summary — or "Nothing found"]

---
**Bottom line:** [1-2 sentences: what we know, what we tried, what to watch out for]

Step 4 — Offer to jump to source

If any agent found a specific match, offer:

"Found in [file] — want me to read the full section?"


Notes

  • Launch all 4 agents in ONE message — they must run in parallel, not sequentially
  • If a file doesn't exist, the agent skips it silently (no error)
  • Agents search only — they never write, edit, or modify memory files
  • For kit memory root: read [MEM] path from MEMORY.md or CLAUDE.md at session start
  • This skill pairs with act — search first, then act on what's found

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.