Obsidian Librarian
/install obsidian-librarian
Obsidian Librarian
A second brain for Obsidian, on autopilot. Drop any URL, article, tweet, X post, or pasted text into OpenClaw and it lands in your vault as a clean, categorized, wikilinked markdown note. Then ask your whole vault anything and get grounded answers with citations.
Use this skill when the user wants OpenClaw to store text or a URL in the Obsidian vault as a cleaned, categorized markdown note, or to search and query notes they have already saved.
Trigger shortcuts:
- Treat
save this,save it,save this url, andsave this linkas Obsidian-librarian requests when the same message contains a URL, pasted text, or quoted content to preserve. - Treat short follow-ups like
save itas Obsidian-librarian requests when the immediately preceding user message provided the text or URL to store. - Treat phrases like
search my notes,search my vault,search Obsidian,what do my notes say about ...,ask my vault, andquery my saved notesas Obsidian-librarian requests that should run the RAGaskpath. - If the message only says
save thisorsave itwith no actual content or URL available in context, do not guess; ask what should be saved. - If the intent is ambiguous between saving to the local filesystem versus saving to the knowledge vault, prefer the Obsidian vault when the content looks like a note, article, research snippet, or social post.
The vault is mounted in the container at /data/.openclaw/obsidian-vault. Raw inputs are staged in /data/.openclaw/obsidian-vault/_Inbox, then processed into category folders.
Environment
Required:
GEMINI_API_KEY: Gemini API key used for both ingest and RAG answer generation.OBSIDIAN_VAULT_PATH: Absolute path to the mounted Obsidian vault.
Conditional:
APIFY_API_KEY: Required for URL ingestion.
Optional:
OBSIDIAN_INBOX_FOLDER: Override the inbox folder name. Default:_Inbox.OBSIDIAN_GEMINI_MODEL: Primary model override for librarian operations.GEMINI_MODEL: Fallback model name whenOBSIDIAN_GEMINI_MODELis unset.OBSIDIAN_RAG_INDEX_PATH: Override the local JSON RAG index path.SUPABASE_URL: Enable Supabase-backed vector storage.SUPABASE_KEY: Supabase API key for vector storage.EMBEDDING_MODEL: Embedding model override. Default:gemini-embedding-001.EMBEDDING_DIMENSIONS: Embedding size. Default:384.
URL handling policy:
- Always use Apify to read the URL first.
- For
x.com/twitter.compost URLs, use the dedicated Apify tweet actor. - If an X post contains linked URLs, follow those linked URLs through the same Apify-first path before falling back.
- If direct URL reading fails, run a web-search fallback and stage the search-result snapshot instead.
- If both stages fail, surface the full error back to OpenClaw instead of silently swallowing it.
Supported Inputs
- Pasted text
- A local text/markdown file
- A blog/article URL
- An existing file already sitting in
_Inbox - A natural-language question about the saved vault
Workflow
- Stage the raw source in
_Inbox/. - Run Gemini pass 1 to clean and structure it into markdown.
- Run Gemini pass 2 to choose category, tags, source attribution, and candidate wikilinks.
- Scan existing vault notes for titles and aliases to resolve
[[wikilinks]]. - Write the final note with YAML frontmatter into the chosen category folder.
- Delete the
_Inboxfile only after the final note is written successfully.
Ingest From Text File
python3 {baseDir}/scripts/run_pipeline.py ingest --text-file /data/.openclaw/workspace/input.txt
Ingest From URL
python3 {baseDir}/scripts/run_pipeline.py ingest --url "https://example.com/article"
Ingest An Existing Inbox File
python3 {baseDir}/scripts/run_pipeline.py ingest --inbox-file /data/.openclaw/obsidian-vault/_Inbox/some-file.md
Ask The Vault (RAG)
python3 {baseDir}/scripts/run_pipeline.py --vault-path /data/.openclaw/obsidian-vault ask "What do my notes say about AI agents?" --print-json
Optional flags: --category \x3CCategory>, --threshold \x3Cfloat> (default 0.65), --limit \x3CN> (default 5).
Reindex The Vault
python3 {baseDir}/scripts/run_pipeline.py --vault-path /data/.openclaw/obsidian-vault reindex
Add --file \x3Cpath> to re-embed a single note instead of the full vault.
Notes
- For long pasted text, prefer writing it to a temp file under
/data/.openclaw/workspace/and usingingest --text-file. - Use
--title "Custom Title"oningestfor an explicit note title override. - Use
--keep-inboxonly when debugging. Normal behavior is to clean up the staged source after success. - X status URLs preserve deterministic post metadata and captured post content instead of relying on a generic article-style rewrite.
- The pipeline does forward-linking only in v1. Existing notes are not modified.
- URL ingestion requires
APIFY_API_KEYin the container environment. - RAG indexing runs after successful ingests. By default it uses a local JSON index; set
SUPABASE_URLandSUPABASE_KEYto use Supabase pgvector instead (requiresEMBEDDING_DIMENSIONS=384to matchsql/vault_chunks.sql). SUPABASE_URLmust point at a Supabase-compatible API surface. All requests are issued against/rest/v1/..., so self-hosted PostgREST needs a gateway or reverse proxy that serves that prefix.- Before enabling Supabase, apply
sql/vault_chunks.sqlto the target database. It provisions thevault_chunkstable, the HNSW index, and thematch_vault_chunksRPC that theaskcommand calls.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install obsidian-librarian - 安装完成后,直接呼叫该 Skill 的名称或使用
/obsidian-librarian触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Obsidian Librarian 是什么?
Obsidian second-brain and knowledge-base skill. Save any URL, article, tweet, or X post to your Obsidian vault as clean, categorized, wikilinked markdown. Tw... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 107 次。
如何安装 Obsidian Librarian?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install obsidian-librarian」即可一键安装,无需额外配置。
Obsidian Librarian 是免费的吗?
是的,Obsidian Librarian 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Obsidian Librarian 支持哪些平台?
Obsidian Librarian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Obsidian Librarian?
由 shahalay007(@shahalay007)开发并维护,当前版本 v0.2.7。