Skip to content
Obsidian CLI

Obsidian CLI Skill

Lets an agent drive a running Obsidian app through the official obsidian CLI: read, create, append to and search notes, manage tasks, properties and daily notes, and reload, debug and screenshot plugins and themes.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from obsidianmd/obsidian-skills.

$ npx skills add obsidianmd/obsidian-skills --skill obsidian-cli

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/obsidian-cli/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/obsidianmd/obsidian-skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/plugins/obsidian/skills/obsidian-cli ~/.claude/skills/obsidian-cli

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/obsidian-cli/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Read, create, append and search notes by wikilink-style name or exact path
  • Daily notes, tasks, properties, tags and backlinks from the command line
  • Targets a specific vault with vault= or the most recently focused one
  • Plugin and theme dev loop: plugin:reload, dev:errors, dev:screenshot, dev:dom, dev:console
  • Runs JavaScript in the app context with eval and inspects CSS values

Obsidian CLI is the second most-installed skill in kepano's obsidian-skills collection. It teaches an agent to work with a live Obsidian instance through the obsidian command-line interface, which requires the Obsidian app to be open. Where the companion Obsidian Flavored Markdown skill is about writing files correctly, this one is about operating the vault and the app.

The skill explains the CLI's syntax, which differs from most tools: parameters take values with = (quoted when they contain spaces), flags such as silent or overwrite are bare words, and multi-line content uses \n and \t. Files are targeted either with file=, which resolves like a wikilink by name alone, or path= for an exact path from the vault root; without either, the active file is used. Commands go to the most recently focused vault unless vault= is given first.

Common patterns include reading and creating notes from templates, appending lines, searching with a result limit, reading and appending to the daily note, setting properties, listing tasks and tags by count, and listing backlinks. --copy sends output to the clipboard and total returns counts. The skill points the agent to obsidian help as the always-current command list rather than hard-coding every command.

A second half serves plugin and theme developers: a test loop of plugin:reload, dev:errors, dev:screenshot and dev:dom, console output filtered by level, eval to run JavaScript in the app context, CSS inspection and mobile emulation. On skills.sh one of its three security audits returns a warning rather than a pass. MIT-licensed.

SKILL.md

The instructions your agent loads, as published by Steph Ango (kepano).

SKILL.md
name
obsidian-cli
description
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.

Obsidian CLI

Use the obsidian CLI to interact with a running Obsidian instance. Requires Obsidian to be open.

Command reference

Run obsidian help to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli

Syntax

Parameters take a value with =. Quote values with spaces:

obsidian create name="My Note" content="Hello world"

Flags are boolean switches with no value:

obsidian create name="My Note" silent overwrite

For multiline content use \n for newline and \t for tab.

File targeting

Many commands accept file or path to target a file. Without either, the active file is used.

  • file=<name> — resolves like a wikilink (name only, no path or extension needed)
  • path=<path> — exact path from vault root, e.g. folder/note.md
Vault targeting

Commands target the most recently focused vault by default. Use vault=<name> as the first parameter to target a specific vault:

obsidian vault="My Vault" search query="test"
Common patterns
obsidian read file="My Note"
obsidian create name="New Note" content="# Hello" template="Template" silent
obsidian append file="My Note" content="New line"
obsidian search query="search term" limit=10
obsidian daily:read
obsidian daily:append content="- [ ] New task"
obsidian property:set name="status" value="done" file="My Note"
obsidian tasks daily todo
obsidian tags sort=count counts
obsidian backlinks file="My Note"

Use --copy on any command to copy output to clipboard. Use silent to prevent files from opening. Use total on list commands to get a count.

Plugin development
Develop/test cycle

After making code changes to a plugin or theme, follow this workflow:

  1. Reload the plugin to pick up changes:
   obsidian plugin:reload id=my-plugin
  1. Check for errors — if errors appear, fix and repeat from step 1:
   obsidian dev:errors
  1. Verify visually with a screenshot or DOM inspection:
   obsidian dev:screenshot path=screenshot.png
   obsidian dev:dom selector=".workspace-leaf" text
  1. Check console output for warnings or unexpected logs:
   obsidian dev:console level=error
Additional developer commands

Run JavaScript in the app context:

obsidian eval code="app.vault.getFiles().length"

Inspect CSS values:

obsidian dev:css selector=".workspace-leaf" prop=background-color

Toggle mobile emulation:

obsidian dev:mobile on

Run obsidian help to see additional developer commands including CDP and debugger controls.

Install
New

Official Obsidian skill for creating and editing Bases (.base files): database-like table, cards, list, kanban and map views of notes with filters, formulas, summaries and sorting, plus YAML quoting rules and fixes for common errors.

Featured

Google's official skill for the gws CLI — drive Gmail, Drive, Calendar, Sheets, Docs, Chat and Admin APIs from an agent, with Model Armor screening.

Browse all skills →