memory-search

memory-search is a command for Claude Code from kouroshez/coding-os. It costs 0 tokens per session (393 once invoked), scanned A, original, Apache-2.0.

A command for searching the coding agent's saved notes and patterns from earlier sessions for context related to a question.

In plain words
What is it for?
Use it during initial investigation when you want to find earlier decisions, recurring patterns, or previous fixes related to the current task.
Why use it?
It can reveal relevant past solutions without treating old notes as a substitute for checking the current code.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it during initial investigation when you want to find earlier decisions, recurring patterns, or previous fixes related to the current task.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kouroshez/coding-os/memory-search
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.

Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code.

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/commands/kouroshez/coding-os/memory-search/github.svg)](https://agentmods.dev/commands/kouroshez/coding-os/memory-search)
Your own site
<a href="https://agentmods.dev/commands/kouroshez/coding-os/memory-search"><img src="https://agentmods.dev/badge/commands/kouroshez/coding-os/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/commands/kouroshez/coding-os/memory-search"><img src="https://agentmods.dev/badge/commands/kouroshez/coding-os/memory-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 393 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.
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.00000 $0.00393
Opus 5.5 $0.00000 $0.00157
Sonnet 5.5 $0.00000 $0.00079
Haiku 4.5 $0.00000 $0.00039

Measured 1mo ago against content hash e06943abc5f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

src/core/commands/memory-search.md · 24 lines

What it actually says

Search agent memory + learned patterns for cross-session context relevant to $ARGUMENTS.

Use during the Orient phase of the Core Loop (../skills/thinking_os/SKILL.md) — never as a substitute for reading current code, only as a prefetch for "have I solved this before?".

Steps:

  1. If $ARGUMENTS is empty, ask the user what to search for.
  2. Call cos_search(query=$ARGUMENTS, min_confidence=0.3, since_days=180, limit=10).
  3. If 0 hits: try cos_doc_search(query=$ARGUMENTS, limit=5) (escalate to docs layer per ../rules/memory.md routing).
  4. If still 0 hits: tell the user "no prior context — this looks new" and suggest a fresh Skill thinking_os Cynefin classification.
  5. If hits exist, render:
    ## Memory search — "{query}"
    
    ### Top patterns ({n})
    1. [{confidence}] {title}
       Type: {memory_type} | Impact: {impact_score} | Last seen: {date}
       Summary: {short}
       Source: {cos_details tool call to fetch full body}
    
  6. For each hit ≥ 0.7 confidence: offer to invoke cos_details(id=...) to expand.
  7. Verify before recommending (per ../rules/memory.md): if a high-confidence pattern names a file or function, confirm it still exists in the repo before quoting it as authoritative.

Memory-hygiene reminder: this is a read operation. If during the work you confirm a pattern was useful, record back via cos_observation_record so the next session benefits.

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. 1mo ago First seen · 24 lines · 0 tokens per session scan A e06943abc5f0

Subscribe to this mod's changes

memory-search is a command published in the GitHub repository kouroshez/coding-os (7 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 393 tokens. 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 commands, from other repositories

slm-remember

Capture durable facts, decisions, constraints, and gotchas into SuperLocalMemory. Use when the user says "remember that", "save this decision", "note this constraint", or when a session produces a conclusion worth persisting across sessions. Always recall first to avoid duplicates.

qualixar/superlocalmemory · 60 tokens

slm-profile

Memory profiles (separate namespaces inside one SuperLocalMemory store) and MCP tool sets (which tools your host sees). Use switchprofile or slm profile switch to change the active memory profile, the profileid argument to read or write another profile for one call, and slm tools set to choose the tool set every…

qualixar/superlocalmemory · 88 tokens

slm-bot-memory

Cross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains agentid attribution vs. profile/scope access, how to namespace by agentid + profile + scope, and what must never be written to memory. Read this before the first remember/recall on a new…

qualixar/superlocalmemory · 82 tokens

slm-getting-started-bot

First-session orientation for SuperLocalMemory on a headless bot host (Grok Bot, or any Cursor-format plugin install with no hooks, no dashboard, and no interactive setup wizard). What is different here vs. Claude Code/Codex, which 19 tools are actually available, and the first three calls to make.

qualixar/superlocalmemory · 74 tokens

slm-scope

Controls memory visibility across profiles — personal (private, default), shared (selected profiles), or global (all profiles on this machine). Default is always personal. Only change scope when the user explicitly asks to share a memory across workspaces. Works with both remember (write scope) and recall (read scope…

qualixar/superlocalmemory · 67 tokens

prime

Inject preflight context for the current task into the conversation.

OnourImpram/mneme · 0 tokens