agentleFS
quietdaemonquietdaemon/starter-skills/skills/vault-query/SKILL.md

vault-query

Skill1 starsChanged 5 months agoMITView on GitHub

Search a local Markdown / Obsidian 'second brain' vault via an MCP filesystem server, with freshness and search-scope gotchas handled. Use when the user asks about their notes, knowledge base, documented decisions, references, or 'what do I know about X?'

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. Howie126313/obsidian-vault-kit★ 3same name
    2. bohanyt/hermes-custom-skills★ 1same name
    3. Lucioway/way-stack★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    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. Distinctive:

    Run an MCP filesystem server scoped to your vault, e.g.:

    line 23
  2. Distinctive:

    If the user writes to the vault from other machines, your local copy is only as fresh as the last pull.

    line 48
  3. Very specific:

    If origin/main is ahead, pull before searching:

    line 55
  4. Distinctive:

    When the term lives *inside* a page (not in its filename), glob search misses it.

    line 70
  5. Distinctive:

    Stale cache is the #1 false-empty: Run the Step 0 git fetch *every* time the vault is a synced clone, not only when something looks missing.

    line 88
  6. Distinctive:

    Mind privacy scope: Only point the MCP server at directories you intend the assistant to read.

    line 95

“Common” is measured: kept by at least 6 in 10 of the 3 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

Vault Query

Give your assistant read access to a personal Markdown vault (Obsidian or plain .md files) through an MCP filesystem server, and let it actually find and surface what's in there. The hard-won part isn't the search call — it's the two failure modes below that make searches silently come back empty.

Setup

Run an MCP filesystem server scoped to your vault, e.g.:

# in your agent's MCP config
vault_filesystem:
  command: npx
  args: ["-y", "@modelcontextprotocol/server-filesystem", "<VAULT_PATH>"]

This exposes mcp_vault_filesystem_* tools (read/search/list). If your vault is a git clone kept fresh by a pull cron, see Step 0.

When to activate

The user asks about:

  • Their notes, wiki, or anything they've documented
  • Concepts, frameworks, protocols, references, sources
  • People, places, or entities they track
  • Their decision log, action items, priorities
  • "What do I know about X?" / "Pull up my notes on Y"

How to query

Step 0 — Check freshness FIRST (if the vault is a git clone)

If the user writes to the vault from other machines, your local copy is only as fresh as the last pull. Before concluding something isn't there:

cd <VAULT_PATH> && git fetch origin && git log --oneline origin/main -5

If origin/main is ahead, pull before searching:

git pull --rebase origin main

This is the single most common cause of a false "I couldn't find it."

Step 1 — Locate files

mcp_vault_filesystem_search_files with a glob pattern (e.g. *labs*) and the vault path. ⚠️ This matches FILENAMES, not file contents.

Step 2 — Content search fallback

When the term lives inside a page (not in its filename), glob search misses it. Use grep:

grep -ril "keyword" <VAULT_PATH>/

Step 3 — Read + answer

mcp_vault_filesystem_read_file on the 2–3 most relevant hits, then answer in your own words from the content.

Always surface the actual findings. Deliver the specific entries / values / dates / names — don't just say "I found it." A lookup the user never sees the result of is worthless.

Pitfalls (the reason this skill exists)

  • Stale cache is the #1 false-empty. Run the Step 0 git fetch every time the vault is a synced clone, not only when something looks missing.
  • MCP glob search ≠ content search. search_files matches filename patterns only. For words inside files, use grep -ril.
  • Filesystem search is case-sensitive on Linux. *Protocols* and *protocols* can return different results — prefer lowercase unless you know the casing.
  • Don't over-read. On a broad hit, read the top 2–3 files, not everything.
  • Mind privacy scope. Only point the MCP server at directories you intend the assistant to read; it can read everything in scope.

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.