Obsidian Cliのロゴ

Obsidian Cli

コミュニティ
seandavi
obsidian-cli

Playbook for operating this Obsidian vault via the `obsidian` CLI when it's installed — link resolution, graph hygiene (backlinks / orphans / unresolved), task reconciliation across files, frontmatter/tag/property queries, full-text search, version history. Use when doing substantial work over the vault's link graph, tasks, or frontmatter AND `obsidian` is on PATH. Describes the filesystem fallback for when it isn't. Also /obsidian-cli.

概要

公開者seandavi
リポジトリlifeos-template
スキル名obsidian-cli
スター
47
フォーク
3
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    seandaviがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルObsidian CliをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/seandavi/lifeos-template/tree/main/.claude/skills/obsidian-cli
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/seandavi/lifeos-template.git /tmp/lifeos-template
mkdir -p .claude/skills
cp -r /tmp/lifeos-template/.claude/skills/obsidian-cli .claude/skills/obsidian-cli
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでObsidian Cliを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にObsidian Cliを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Obsidian Cliは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Operating the vault via the obsidian CLI

The obsidian CLI talks to the running Obsidian app and exposes its parsed model — the resolved link graph, tasks with status chars, frontmatter properties, tags, bases — not just bytes on disk. That makes graph/task/property work a query instead of a Grep-and-guess. This skill is the playbook for using it well.

This integration is optional. LifeOS does not require Obsidian. If you don't use Obsidian (or don't have the CLI), every workflow in this vault still works — this skill simply never activates. Nothing needs to be configured or disabled.

0. Preconditions — check before relying on it

bash
command -v obsidian                  # is the CLI installed?
timeout 5 obsidian vault info=name   # is the app running + a vault open?
  • Always bound the app-running probe — vault info can hang indefinitely when the app is closed. Use timeout 5 (or gtimeout from coreutils on macOS); if neither exists, skip the probe and treat the first failed or hanging query as the signal to fall back.
  • If the CLI is absent or the app is closed → fall back to the filesystem (Glob/Grep/Read), exactly as CLAUDE.md's Wiki-Links fallback describes. Every query below has a filesystem equivalent; the CLI is faster and exact, not required. Don't block work waiting on it.
  • Target a specific vault with vault=<name> if more than one is open.

1. The golden boundary

Query and navigate with the CLI. Change prose with Edit. The CLI's write verbs (append, prepend, create, property:set) are coarse — good for appending a log line or setting one frontmatter key, wrong for surgical multi-line edits.

Live-app verbs are opt-in only. eval, command, open, daily, tabs, theme, dev:*, restart mutate the user's running session (pop tabs open, run JS in-app, change the UI). Use them only when the user explicitly asks you to drive the UI. Never as a side effect of a lookup.

Git is the version-control truth, not Obsidian Sync. history / diff / sync:restore are a handy second safety net, but recovery and commits go through git (see CLAUDE.md's Git Workflow section). Don't conflate them.

2. Link resolution & graph hygiene

bash
obsidian read file="some-name"          # resolve [[some-name]] by name, read it
obsidian backlinks file="X" counts      # what links TO X (before editing/renaming X)
obsidian links file="X"                 # what X links to
obsidian unresolved verbose             # [[stubs]] not yet written — the "worth writing" marks
obsidian orphans                        # notes nothing links to
obsidian deadends                       # notes with no outgoing links
  • Before renaming/moving a note, run backlinks first so you know what breaks. obsidian rename / obsidian move update the file; verify links after.
  • unresolved is the backlog of intentional [[future-note]] stubs — a to-write list, not errors.
  • orphans counts can be inflated by auto-generated or imported stubs; scan the list before treating the raw number as a problem.

3. Tasks — first-class across the whole vault

bash
obsidian tasks todo verbose             # every open "- [ ]" with path:line
obsidian tasks done                     # completed
obsidian tasks path="inbox.md" todo     # scope to a file
obsidian task ref="inbox.md:42" done    # mark one done (or toggle / status="x")

Use for the task-management protocol in CLAUDE.md: reconcile the same item's checkbox across inbox.md, the day's journal, and now.md instead of eyeballing. Still complete tasks in the three-step order (inbox → completed.md → journal) — the CLI toggles boxes, it doesn't do the completed.md write with strategic context.

4. Frontmatter, tags, properties

bash
obsidian tags counts sort=count                 # tag frequency across the vault
obsidian tag name="research" verbose            # files carrying a tag
obsidian properties file="people/jane-smith.md" # frontmatter of one file
obsidian property:read name="status" file="…"   # one property value
obsidian property:set name="status" value="active" type="text" file="…"  # clean write, no YAML hand-edit

Prefer property:set over hand-editing YAML frontmatter — it won't corrupt the block. For anything below the frontmatter, use Edit.

5. Search, history, bases

bash
obsidian search:context query="some-topic" path="notes"   # matches WITH line context
obsidian history file="X"      # local version list   ·   obsidian diff file="X" from=2 to=1
obsidian bases                 # Obsidian DB-view files, if the vault has any
obsidian base:query file="…" view="…" format=json         # query a base as structured data

If the vault has a base, base:query turns it into a JSON/CSV data source — the vault's own lightweight database. If not, bases returns empty; that's fine.

6. Worked patterns

  • Vault audit (feeds /audit): unresolved, orphans, deadends, tasks todo total → a health snapshot in four commands. Report the numbers; don't auto-delete orphans (many are intentional stubs).
  • Pre-edit context: before revising a note, backlinks file="X" to see who depends on it and keep cross-references honest.
  • Link a new note in: after writing notes/foo.md, backlinks file="foo" should be non-empty — if it's an orphan, add an inbound link from a relevant hub.

Discovering more

obsidian --help lists the full command set; obsidian help <command> details one. The catalog is large (plugins, snippets, workspace, dev tools) — this skill covers the vault-knowledge subset that matters for day-to-day work.

よくある質問

AIスキル「Obsidian Cli」では何ができますか?

Playbook for operating this Obsidian vault via the `obsidian` CLI when it's installed — link resolution, graph hygiene (backlinks / orphans / unresolved), task reconciliation across files, frontmatter/tag/property queries, full-text search, version history. Use when doing substantial work over the vault's link graph, tasks, or frontmatter AND `obsidian` is on PATH. Describes the filesystem fallback for when it isn't. Also /obsidian-cli.

TypingMindでObsidian Cliを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Obsidian Cliはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにObsidian Cliをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/seandavi/lifeos-template/tree/main/.claude/skills/obsidian-cliを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Obsidian Cliを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Obsidian Cliは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもObsidian Cliを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Obsidian Cli」は無料ですか?

seandaviがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇