agentleFS
myths-labsmyths-labs/muse/skills/core/semantic-search/SKILL.md

semantic-search

Skill35 starsChanged 8 months agoMITView on GitHub

Zero-dependency TF-IDF search across MUSE memory, roles, and skills. Use when user wants to find information across their project context.

4 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

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

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

    line 11
  2. Distinctive:

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

    line 55

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Semantic Search

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

ScopeFiles Indexed
all (default)memory/ + .muse/ + MEMORIES.md + skills/
memorymemory/*.md + MEMORIES.md
roles.muse/*.md
skillsskills//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

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.