semantic-search

semantic-search is a skill for Claude Code, Codex from myths-labs/muse. It costs 32 tokens per session (495 once invoked), scanned A, original, MIT.

A keyword search tool for finding information across a MUSE project’s memory files, agent roles, and skills. It ranks matching files using how often and how rarely the search words appear.

In plain words
What is it for?
Use it to search all project context or limit the search to memory, roles, or skills with a command such as ./scripts/search.sh.
Why use it?
It avoids manually opening many files when recovering an earlier decision, lesson, role, or skill.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/search.sh "auth jwt oauth".

Good fit Use it to search all project context or limit the search to memory, roles, or skills with a command such as ./scripts/search.sh.

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/myths-labs/muse
agentmods
npx agentmods add skills/myths-labs/muse/semantic-search

Made for: Claude Code, Codex.

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 semantic-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/myths-labs/muse/semantic-search/github.svg)](https://agentmods.dev/skills/myths-labs/muse/semantic-search)
Your own site
<a href="https://agentmods.dev/skills/myths-labs/muse/semantic-search"><img src="https://agentmods.dev/badge/skills/myths-labs/muse/semantic-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 semantic-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/myths-labs/muse/semantic-search"><img src="https://agentmods.dev/badge/skills/myths-labs/muse/semantic-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 495 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.00032 $0.00495
Opus 5 $0.00016 $0.00247
Sonnet 5 $0.00006 $0.00099
Haiku 4.5 $0.00003 $0.00049

Measured 10d ago against content hash f3bf315c81e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

semantic-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 10d 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.

skills/core/semantic-search/SKILL.md · 68 lines

What it actually says

Search across your entire MUSE project context using TF-IDF ranking.

When to Use

  • User asks "where did we discuss X?"
  • User wants to find a past decision or lesson
  • User needs to locate a specific skill
  • Context recovery when resuming work

Usage

# Search everything
./scripts/search.sh "auth jwt oauth"

# Search only memory files
./scripts/search.sh "database migration" --scope memory

# Search only role files
./scripts/search.sh "dashboard" --scope roles --top 3

# Search only skills
./scripts/search.sh "testing" --scope skills --top 10

How It Works

  1. Tokenization: Query is split into lowercase terms
  2. TF (Term Frequency): For each file, count occurrences of each query term, normalized by file length
  3. IDF (Inverse Document Frequency): Terms that appear in fewer files get higher weight
  4. Score: TF × IDF summed across all query terms
  5. Ranking: Files sorted by score, top N shown with best-matching line as context snippet

Scopes

Scope Files Indexed
all (default) memory/ + .muse/ + MEMORIES.md + skills/
memory memory/*.md + MEMORIES.md
roles .muse/*.md
skills skills//SKILL.md + .agent/skills//SKILL.md

Integration

When resuming a conversation, you can use search to quickly find relevant context:

# Before /resume — find what was done last week
./scripts/search.sh "migration deploy" --scope memory --top 3

Limitations

  • Pure TF-IDF, no semantic understanding (no embeddings/vectors)
  • Exact term matching only (no synonyms)
  • Best for keyword-based queries with specific terms
  • For semantic search, consider integrating with mem0 or memsearch
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. 10d ago First seen · 68 lines · 32 tokens per session scan A f3bf315c81e4

Subscribe to this mod's changes

semantic-search is a skill published in the GitHub repository myths-labs/muse (32 stars, last pushed 4d ago), licensed MIT. It adds 32 tokens to every session and 495 once invoked, about $0.0002 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.