agentleFS
chuckplayerchuckplayer/claude-agent-pack/skills/obsidian-search/SKILL.md

obsidian-search

Skill8 starsChanged 35 days agoMITView on GitHub

Search past Claude session logs and captures in the Obsidian vault. Use when someone says "find my notes about X", "search obsidian", "what did I log about X", "find that capture", "look up session from last week", "search my Claude notes". Returns matching entries with excerpts and wikilink references. Read-only.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Search everything Claude has logged in your vault.

    line 13
  2. Very specific:

    Read OBSIDIAN_VAULT_PATH from the environment:

    line 19
  3. Distinctive:

    If empty, stop and tell the user:

    line 23
  4. Very specific:

    If OBSIDIAN_PROJECTS_FOLDER is set, also include: <OBSIDIAN_VAULT_PATH>/<OBSIDIAN_PROJECTS_FOLDER>//*.md

    line 37
  5. Very specific:

    Use OBSIDIAN_PROJECTS_FOLDER if set, otherwise default to Claude/Projects.

    line 43
  6. Distinctive:

    If the project folder does not exist or returns no results, automatically fall through to the global scope and note that you expanded the …

    line 46
  7. Distinctive:

    If the user has not already provided a search term, ask:

    line 51
  8. Distinctive:

    Use the Grep tool on the determined scope for the search term (case-insensitive).

    line 57
  9. Distinctive:

    If there are more than 10 matching files, sort by most recently modified and show only the top 10.

    line 60
  10. Distinctive:

    If no matches are found in the project scope, try the global scope automatically.

    line 72
  11. Distinctive:

    If no matches found globally, say:

    line 74
  12. Very specific:

    If OBSIDIAN_CLI_MODE is "rest-api" and there are results, offer to open the best match in Obsidian:

    line 82
  13. Distinctive:

    If yes, compute the vault-relative path (forward slashes, URL-encoded), then call:

    line 87
  14. Distinctive:

    Read-only. Never modify any vault files.

    line 95
  15. Distinctive:

    If there are many matches (more than 10), show the 10 most recently modified files first.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Obsidian Search

Search everything Claude has logged in your vault. Results are scoped to the current project by default — pass --global (or ask "search all projects") to search the entire vault.

Step 1 — Check configuration

Read OBSIDIAN_VAULT_PATH from the environment:

  • Bash: bash -c 'echo $OBSIDIAN_VAULT_PATH'
  • PowerShell: $env:OBSIDIAN_VAULT_PATH

If empty, stop and tell the user:

"OBSIDIAN_VAULT_PATH is not set. Re-run install.sh and provide your vault path when prompted, or add it manually to ~/.claude/settings.json under the env key."

Also read:

  • OBSIDIAN_PROJECTS_FOLDER (empty string if unset)
  • CLAUDE_PROJECT_DIR (or fall back to current working directory)

Step 2 — Determine search scope

If the user passed --global or asked to search "all projects" / "everywhere":

  • Search scope: <OBSIDIAN_VAULT_PATH>/Claude/**/*.md
  • If OBSIDIAN_PROJECTS_FOLDER is set, also include: <OBSIDIAN_VAULT_PATH>/<OBSIDIAN_PROJECTS_FOLDER>/**/*.md

Default (project-first):

  • Compute project_slug: basename of CLAUDE_PROJECT_DIR (or cwd), lowercase, non-alphanumeric chars replaced with hyphens, max 30 characters.
  • Use OBSIDIAN_PROJECTS_FOLDER if set, otherwise default to Claude/Projects.
  • Search <OBSIDIAN_VAULT_PATH>/<effective_folder>/<project_slug>/**/*.md

If the project folder does not exist or returns no results, automatically fall through to the global scope and note that you expanded the search.

Step 3 — Get search term

If the user has not already provided a search term, ask:

"What are you looking for?"

Step 4 — Search

Use the Grep tool on the determined scope for the search term (case-insensitive). For each matching file, read 3–5 lines of context around the match.

If there are more than 10 matching files, sort by most recently modified and show only the top 10.

Step 5 — Present results

For each match, show:

  • Wikilink — relative to the vault root, no .md extension, forward slashes: [[Projects/agent-pack/sessions/2026-05-14-1430-agent-pack]]
  • Excerpt — one line of match context
  • Type — session, capture, daily, or memory-snapshot

If no matches are found in the project scope, try the global scope automatically.

If no matches found globally, say:

"No results found for '<term>' in your Claude notes. Try a broader term, or note that session logs are written automatically when Claude Code stops (also /obsidian-recap and /obsidian-capture write notes you can search)."

Step 6 — Open best match (optional)

If OBSIDIAN_CLI_MODE is "rest-api" and there are results, offer to open the best match in Obsidian:

"Would you like me to open the top result in Obsidian?"

If yes, compute the vault-relative path (forward slashes, URL-encoded), then call:

curl -sk "https://127.0.0.1:${OBSIDIAN_REST_API_PORT:-27124}/open/<url-encoded-vault-relative-path>"

Gotchas

  • Read-only. Never modify any vault files.
  • Wikilinks must be relative to the vault root — strip the OBSIDIAN_VAULT_PATH prefix, convert backslashes to forward slashes, and remove the .md extension.
  • If there are many matches (more than 10), show the 10 most recently modified files first.
  • Memory snapshot files (memory-snapshot.md) can also contain useful context — include them in search results.

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.