Claude, Codex and ChatGPT directories (#154)

This commit is contained in:
Steph Ango
2026-11-11 07:13:56 -08:00
committed by GitHub
24 changed files with 529 additions and 166 deletions
+20
View File
@@ -0,0 +1,20 @@
{
"name": "obsidian-skills",
"interface": {
"displayName": "Obsidian Skills"
},
"plugins": [
{
"name": "obsidian",
"source": {
"source": "local",
"path": "./plugins/obsidian"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
]
}
+6 -5
View File
@@ -1,15 +1,16 @@
{ {
"name": "obsidian-skills", "name": "obsidian-skills",
"description": "Agent Skills for Obsidian Markdown, Bases, JSON Canvas, the Obsidian CLI, Defuddle, and Knap.",
"owner": { "owner": {
"name": "Steph Ango", "name": "Obsidian",
"url": "https://stephango.com/" "url": "https://obsidian.md/"
}, },
"plugins": [ "plugins": [
{ {
"name": "obsidian", "name": "obsidian",
"source": "./", "source": "./plugins/obsidian",
"description": "Claude Skills for Obsidian", "description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, web extraction, and templates.",
"version": "1.0.1" "version": "1.1.0"
} }
] ]
} }
-19
View File
@@ -1,19 +0,0 @@
{
"name": "obsidian",
"version": "1.0.1",
"description": "Create and edit Obsidian vault files including Markdown, Bases, and Canvas. Use when working with .md, .base, or .canvas files in an Obsidian vault.",
"author": {
"name": "Steph Ango",
"url": "https://stephango.com/"
},
"repository": "https://github.com/kepano/obsidian-skills",
"license": "MIT",
"keywords": [
"obsidian",
"markdown",
"bases",
"canvas",
"pkm",
"notes"
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"name": "obsidian-skills",
"owner": {
"name": "Obsidian"
},
"metadata": {
"description": "Agent Skills for Obsidian Markdown, Bases, JSON Canvas, the Obsidian CLI, Defuddle, and Knap."
},
"plugins": [
{
"name": "obsidian",
"source": "./plugins/obsidian",
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, web extraction, and templates."
}
]
}
+51 -18
View File
@@ -4,54 +4,87 @@ These skills follow the [Agent Skills specification](https://agentskills.io/spec
## Installation ## Installation
### Marketplace ### Claude Code marketplace
From terminal:
```sh
claude plugin marketplace add obsidianmd/obsidian-skills
claude plugin install obsidian@obsidian-skills
``` ```
/plugin marketplace add kepano/obsidian-skills
From within a Claude Code session:
```sh
/plugin marketplace add obsidianmd/obsidian-skills
/plugin install obsidian@obsidian-skills /plugin install obsidian@obsidian-skills
``` ```
To get new skills later, run `claude plugin update obsidian@obsidian-skills`.
### Codex marketplace
```sh
codex plugin marketplace add obsidianmd/obsidian-skills
```
Then install Obsidian from the plugin directory in Codex or the ChatGPT desktop app.
### Cursor
Install Obsidian from the [Cursor Marketplace](https://cursor.com/marketplace).
### npx skills ### npx skills
``` ```sh
npx skills add git@github.com:kepano/obsidian-skills.git npx skills add git@github.com:obsidianmd/obsidian-skills.git
``` ```
Instead of ssh, if you prefer to use https: Instead of ssh, if you prefer to use https:
``` ```sh
npx skills add https://github.com/kepano/obsidian-skills npx skills add https://github.com/obsidianmd/obsidian-skills
``` ```
### Manually ### Manually
#### Claude Code #### Claude Code
Add the contents of this repo to a `/.claude` folder in the root of your Obsidian vault (or whichever folder you're using with Claude Code). See more in the [official Claude Skills documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview). Copy the `plugins/obsidian/skills/` directory to `.claude/skills/` in the root of your Obsidian vault (or whichever folder you're using with Claude Code). See more in the [official Claude Skills documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
#### Codex #### Codex
Copy the `skills/` directory into your Codex skills path (typically `~/.codex/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format. Copy the `plugins/obsidian/skills/` directory into your Codex skills path (typically `~/.agents/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format.
#### OpenCode #### OpenCode
Clone the entire repo into the OpenCode skills directory (`~/.opencode/skills/`): Clone the entire repo into the OpenCode skills directory (`~/.opencode/skills/`):
```sh ```sh
git clone https://github.com/kepano/obsidian-skills.git ~/.opencode/skills/obsidian-skills git clone https://github.com/obsidianmd/obsidian-skills.git ~/.opencode/skills/obsidian-skills
``` ```
Do not copy only the inner `skills/` folder — clone the full repo so the directory structure is `~/.opencode/skills/obsidian-skills/skills/<skill-name>/SKILL.md`. Do not copy only the inner `skills/` folder — clone the full repo so the directory structure is `~/.opencode/skills/obsidian-skills/plugins/obsidian/skills/<skill-name>/SKILL.md`.
OpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode. OpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode.
## Release maintenance
Update the plugin version in every manifest with:
```sh
./scripts/bump.sh patch
```
The script also accepts `major`, `minor`, or an explicit version like `1.1.0`.
## Skills ## Skills
| Skill | Description | | Skill | Description |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [obsidian-markdown](skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax | | [obsidian-markdown](plugins/obsidian/skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax |
| [obsidian-bases](skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries | | [obsidian-bases](plugins/obsidian/skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries |
| [json-canvas](skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections | | [json-canvas](plugins/obsidian/skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections |
| [obsidian-cli](skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development | | [obsidian-cli](plugins/obsidian/skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development |
| [defuddle](skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens | | [defuddle](plugins/obsidian/skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens |
| [knap](skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation | | [knap](plugins/obsidian/skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation |
@@ -0,0 +1,21 @@
{
"name": "obsidian",
"version": "1.1.0",
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, web extraction, and templates.",
"author": {
"name": "Obsidian",
"url": "https://obsidian.md/"
},
"homepage": "https://obsidian.md/",
"repository": "https://github.com/obsidianmd/obsidian-skills",
"license": "MIT",
"keywords": [
"obsidian",
"markdown",
"bases",
"canvas",
"pkm",
"notes"
],
"icon": "./assets/icon.png"
}
@@ -0,0 +1,20 @@
{
"name": "obsidian",
"version": "1.1.0",
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, web extraction, and templates.",
"author": {
"name": "Obsidian"
},
"homepage": "https://obsidian.md/",
"repository": "https://github.com/obsidianmd/obsidian-skills",
"license": "MIT",
"keywords": [
"obsidian",
"markdown",
"bases",
"canvas",
"pkm",
"notes"
],
"logo": "assets/icon.png"
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Steph Ango (@kepano)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+38
View File
@@ -0,0 +1,38 @@
# Obsidian
Skills for working with Obsidian vaults: Obsidian Markdown, Bases, Canvas, the Obsidian CLI, web pages, and templates.
## Install
In Claude Code:
```
/plugin install obsidian --marketplace obsidianmd/obsidian-skills
```
In Codex, run `codex plugin marketplace add obsidianmd/obsidian-skills`, then install Obsidian from the plugin directory.
In Cursor, install Obsidian from the [Cursor Marketplace](https://cursor.com/marketplace).
## Requirements
The CLI skill runs the `obsidian` command, which needs the Obsidian desktop app installed, running, and with the CLI turned on. See https://help.obsidian.md/cli for setup. It needs a host that can run local commands, such as Claude Code, Codex, Cursor, or a desktop app session on your computer.
The Markdown, Bases, and Canvas skills only describe file formats, so they also work in chat.
Web extraction uses [Defuddle](https://github.com/kepano/defuddle), which fetches the page you ask for. Template rendering uses [Knap](https://github.com/obsidianmd/knap), which needs Node.js 20 or later. Neither tool is bundled. When one is missing, the skill asks before installing it from npm.
## Included skills
- obsidian-cli: search, read, create, and manage notes through the running app.
- obsidian-markdown: Obsidian links, properties, callouts, and embeds.
- obsidian-bases: Bases files, views, filters, formulas, and summaries.
- json-canvas: Canvas files with nodes, edges, groups, and connections.
- defuddle: extract readable Markdown from public web pages.
- knap: render templates from structured data.
## Scope
This plugin contains skills only, with no MCP server, hooks, or background processes. Using it can bring vault content you ask about into the conversation, and that content is processed by the AI model you use, not only on your computer.
Source: https://github.com/obsidianmd/obsidian-skills
Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

+64
View File
@@ -0,0 +1,64 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "obsidian",
"version": "1.1.0",
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, web extraction, and templates.",
"author": {
"name": "Obsidian",
"url": "https://obsidian.md/"
},
"homepage": "https://obsidian.md/",
"repository": "https://github.com/obsidianmd/obsidian-skills",
"license": "MIT",
"keywords": [
"obsidian",
"markdown",
"bases",
"canvas",
"pkm",
"notes"
],
"extensions": {
"com.openai": {
"requires_local_executor": true,
"interface": {
"displayName": "Obsidian",
"shortDescription": "Work with your local vault",
"longDescription": "Search, read, create, and organize notes in a local Obsidian vault. Create and edit Obsidian Markdown with links, properties, and callouts. This plugin also lets you build Bases views, Canvas diagrams, extract web pages to Markdown, and render templates.\n\nThis plugin is currently desktop-only and requires Obsidian to be open and running with the CLI enabled. In the future we will add MCP so you can interact with your vault remotely and in the ChatGPT mobile app.",
"category": "Productivity",
"developerName": "Obsidian",
"defaultPrompt": [
"Find notes about my current project and summarize the open tasks.",
"Create a reading list Base from the books in my vault.",
"Make a Canvas connecting the main ideas in these notes."
],
"websiteURL": "https://obsidian.md/",
"supportURL": "https://obsidian.md/help/",
"privacyPolicyURL": "https://obsidian.md/privacy",
"termsOfServiceURL": "https://obsidian.md/terms",
"logo": "./assets/icon.png",
"composerIcon": "./assets/icon.png",
"logoDark": "./assets/icon.png",
"composerIconDark": "./assets/icon.png",
"brandColor": "#6C31E3",
"brandColorDark": "#A882FF"
},
"review": {
"commerce": false,
"prompts": [
"Search my selected vault for project notes and summarize their open tasks with links to the sources.",
"Create a note in my selected vault with a summary, related-note links, and a status property.",
"Create a reading list Base with table and card views from the books in my selected vault.",
"Create a Canvas with three idea cards and labeled connections in my selected vault.",
"Extract this public article into Markdown and save it as a note in my selected vault.",
"Use my supplied Knap template and JSON data to create a note in my selected vault.",
"Read a note using the CLI while Obsidian is closed and explain what is needed to continue."
]
},
"publication": {
"countries": [],
"release_notes": "Six Obsidian skills for Markdown, Bases, Canvas, the Obsidian CLI, Defuddle, and Knap, with desktop execution metadata and setup guidance for the CLI and helper tools."
}
}
}
}
@@ -5,9 +5,9 @@ description: Extract clean Markdown from HTML pages with Defuddle CLI.
# Defuddle # Defuddle
Use Defuddle CLI to extract clean readable content from web pages. Prefer over WebFetch for standard web pages — it removes navigation, ads, and clutter, reducing token usage. Use Defuddle CLI when the user wants clean Markdown extracted from a web page. It removes navigation, ads, and other page clutter.
If not installed: `npm install -g defuddle` Check availability with `defuddle --help`. If it is missing, explain the dependency and offer installation with `npm install -g defuddle`. Do not claim extraction succeeded if the tool is unavailable or returns an error.
## Usage ## Usage
@@ -92,6 +92,10 @@ Nodes are objects placed on the canvas. Array order determines z-index: first no
**Newline pitfall**: Use `\n` for line breaks in JSON strings. Do **not** use the literal `\\n` -- Obsidian renders that as the characters `\` and `n`. **Newline pitfall**: Use `\n` for line breaks in JSON strings. Do **not** use the literal `\\n` -- Obsidian renders that as the characters `\` and `n`.
**Quote escaping pitfall**: Double quotes inside `text` content must be escaped as `\"`. For example, the text `公司的"外交官"` must be stored as `"text": "公司的\"外交官\""`. Unescaped quotes break the JSON parse and the canvas will fail to render. When generating canvas JSON programmatically, always use a JSON serializer rather than manual string concatenation.
Write `.canvas` files directly. Don't create them with `obsidian create content=`, which turns every `\n` into a raw newline and breaks the JSON.
### File Nodes ### File Nodes
| Attribute | Required | Type | Description | | Attribute | Required | Type | Description |
@@ -99,6 +103,8 @@ Nodes are objects placed on the canvas. Array order determines z-index: first no
| `file` | Yes | string | Path to file within the system | | `file` | Yes | string | Path to file within the system |
| `subpath` | No | string | Link to heading or block (starts with `#`) | | `subpath` | No | string | Link to heading or block (starts with `#`) |
**File path escaping**: If a file name contains double quotes, they must be escaped as `\"` in the JSON string. For example, a file named `My "Notes".md` should be referenced as `"file": "My \"Notes\".md"`.
```json ```json
{ {
"id": "a1b2c3d4e5f67890", "id": "a1b2c3d4e5f67890",
@@ -211,13 +217,15 @@ Generate 16-character lowercase hexadecimal strings (64-bit random value):
- Space nodes 50-100px apart; leave 20-50px padding inside groups - Space nodes 50-100px apart; leave 20-50px padding inside groups
- Align to grid (multiples of 10 or 20) for cleaner layouts - Align to grid (multiples of 10 or 20) for cleaner layouts
| Node Type | Suggested Width | Suggested Height | | Node Type | Suggested Width | Suggested Height | CJK Width (1.5x) |
|-----------|-----------------|------------------| |-----------|-----------------|------------------|-------------------|
| Small text | 200-300 | 80-150 | | Small text | 200-300 | 80-150 | 300-450 |
| Medium text | 300-450 | 150-300 | | Medium text | 300-450 | 150-300 | 450-675 |
| Large text | 400-600 | 300-500 | | Large text | 400-600 | 300-500 | 600-900 |
| File preview | 300-500 | 200-400 | | File preview | 300-500 | 200-400 | 450-750 |
| Link preview | 250-400 | 100-200 | | Link preview | 250-400 | 100-200 | 375-600 |
**CJK text sizing**: CJK characters (Chinese, Japanese, Korean) are wider than Latin characters. For content primarily in CJK languages, multiply the suggested width by ~1.5× to avoid cramped layouts and awkward line breaks.
## Validation Checklist ## Validation Checklist
@@ -230,7 +238,8 @@ After creating or editing a canvas file, verify:
5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left` 5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left`
6. `fromEnd`/`toEnd` values are one of: `none`, `arrow` 6. `fromEnd`/`toEnd` values are one of: `none`, `arrow`
7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`) 7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`)
8. JSON is valid and parseable 8. Double quotes in `text` and `file` values are properly escaped as `\"`
9. JSON is valid and parseable
If validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content). If validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).
@@ -7,7 +7,7 @@ description: Render Markdown from templates and structured data using Knap CLI.
Use Knap CLI to render Markdown templates with variables, filters, and logic. Use Knap CLI to render Markdown templates with variables, filters, and logic.
If not installed: `npm install -g knap` (requires Node.js 20 or later). Alternatively, use `npx knap`. Check availability with `knap --help`. If it is missing, explain that Knap requires Node.js 20 or later and offer installation with `npm install -g knap` or execution with `npx knap`. Do not claim a template was rendered if the tool is unavailable or returns an error.
Run `knap --help` for available commands and options. Discover the language through the CLI's offline reference: Run `knap --help` for available commands and options. Discover the language through the CLI's offline reference:
@@ -53,6 +53,9 @@ views:
groupBy: # Optional: group results groupBy: # Optional: group results
property: property_name property: property_name
direction: ASC | DESC direction: ASC | DESC
sort: # Optional: sort results (supports multiple properties)
- property: property_name
direction: ASC | DESC
filters: # View-specific filters follow the same rules filters: # View-specific filters follow the same rules
and: and:
- 'status == "active"' - 'status == "active"'
@@ -268,6 +271,35 @@ views:
# Map-specific settings for lat/lng properties # Map-specific settings for lat/lng properties
``` ```
## Sorting
Sort results by one or more properties. Each sort entry specifies a `property` and `direction`, which must be uppercase `ASC` or `DESC`; an entry with any other value, or a sort written as a string, is silently ignored. Multiple sort entries are applied in order — the first entry is the primary sort key, subsequent entries break ties.
```yaml
views:
- type: table
name: "Sorted Tasks"
sort:
- property: due
direction: ASC
- property: file.name
direction: ASC
order:
- file.name
- due
- status
```
Sort options depend on the property type:
| Property Type | ASC | DESC |
|---------------|-----|------|
| Text | A→Z | Z→A |
| Number | 0→9 | 9→0 |
| Date | Old→New | New→Old |
You can sort by any property including formulas (`formula.my_formula`), file properties (`file.mtime`), and note properties.
## Default Summary Formulas ## Default Summary Formulas
| Name | Input Type | Description | | Name | Input Type | Description |
@@ -326,6 +358,11 @@ views:
groupBy: groupBy:
property: status property: status
direction: ASC direction: ASC
sort:
- property: due
direction: ASC
- property: file.name
direction: ASC
summaries: summaries:
formula.days_until_due: Average formula.days_until_due: Average
@@ -415,7 +452,9 @@ views:
## Embedding Bases ## Embedding Bases
Embed in Markdown files: ### Embed a `.base` file
Embed an external `.base` file in any Markdown note:
```markdown ```markdown
![[MyBase.base]] ![[MyBase.base]]
@@ -424,6 +463,26 @@ Embed in Markdown files:
![[MyBase.base#View Name]] ![[MyBase.base#View Name]]
``` ```
### Embed inline with a code block
Bases can also be embedded **inline** directly inside a note using a `base` fenced code block. This is useful for note-level filters (e.g. using `this.file.links`) and avoids creating a separate `.base` file:
````markdown
```base
filters:
and:
- file.hasTag("example")
views:
- type: table
name: Table
order:
- file.name
- status
```
````
When embedded inline this way, the `this` keyword refers to the containing note, so you can build per-note views such as showing all notes linked from the current file.
## YAML Quoting Rules ## YAML Quoting Rules
- Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'` - Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`
@@ -434,7 +493,7 @@ Embed in Markdown files:
### YAML Syntax Errors ### YAML Syntax Errors
**Unquoted special characters**: Strings containing `:`, `{`, `}`, `[`, `]`, `,`, `&`, `*`, `#`, `?`, `|`, `-`, `<`, `>`, `=`, `!`, `%`, `@`, `` ` `` must be quoted. **Unquoted special characters**: Strings containing `:`, `{`, `}`, `[`, `]`, `,`, `&`, `*`, `#`, `?`, `|`, `-`, `<`, `>`, `=`, `%`, `@`, `` ` ``, `!` must be quoted.
```yaml ```yaml
# WRONG - colon in unquoted string # WRONG - colon in unquoted string
@@ -0,0 +1,139 @@
---
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.
## Before using the CLI
Run `obsidian help` to check availability. If the command is missing, explain how to turn on the CLI using https://help.obsidian.md/cli. The `obsidian` command ships with the Obsidian installer; don't install the unrelated npm package `obsidian-cli`. If it can't find Obsidian, ask the user to open the desktop app, then retry. In a sandboxed shell the same message can mean the sandbox blocked the CLI's local socket.
The CLI exits with status 0 even when a command fails, so read its output before reporting that a command succeeded.
Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax.
## 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:
```bash
obsidian create name="My Note" content="Hello world"
```
**Flags** are boolean switches with no value:
```bash
obsidian create name="My Note" open overwrite
```
Use `overwrite` only when replacing an existing file is intended.
Opening is opt-in: pass `open` to open the file, and add `newtab` to open it in a new tab. There is no `silent` flag.
In `content=`, `\n` becomes a newline and `\t` a tab. Every `\n` and `\t` is converted and there's no escape, so text such as the LaTeX `\theta` or the path `C:\notes` is corrupted. Write content that contains backslashes, or is longer than about 4 KB, directly to the note's file instead.
A dot in a file name is read as the start of an extension. When a name contains a dot, include the extension: `create name="Meeting 2026.11.06.md"`, `rename name="v1.2 notes.md"`, `move to="Archive 2026.10/Note.md"`.
## 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 needed). `.md` is optional; other file types need their extension, e.g. `file="Projects.base"`. Aliases don't resolve.
- `path=<path>` — exact path from vault root, e.g. `folder/note.md`
## Vault targeting
Without `vault=`, commands target the vault that contains the current directory, then the most recently focused vault. `vault=<name>` only works as the first parameter; anywhere else it's ignored:
```bash
obsidian vault="My Vault" search query="test"
```
Use `vault=` when the user has selected a vault. If the target is unclear and the user has several vaults, ask which one before changing files.
## Common patterns
```bash
obsidian read file="My Note"
obsidian create name="New Note" template="Template" # a template replaces content=
obsidian create name="New Note" content="# Hello" open # also open in Obsidian
obsidian append file="My Note" content="New line"
obsidian rename path="folder/note.md" name="New name"
obsidian move path="folder/note.md" to="archive/"
obsidian delete path="folder/note.md"
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 `rename` and `move`, not filesystem `mv` or `obsidian eval`, so Obsidian can update links to the file. If other notes link to it and Settings → Files and links → Automatically update internal links is off, Obsidian asks in a dialog and the command waits until someone answers. `delete` moves the file to the trash; don't pass `permanent` unless the user asks for it. Prefer `create` and `append` over `eval` for writing note bodies.
Use `total` on list commands to get a count.
**Output options placement:** `--copy`, `--json`, `--md`, `--tsv`, and `--csv` only work **after** the command name. Putting them before the command (or before `vault=`) fails — often as `Command "--copy" not found` — because the first token is treated as the command. Prefer `vault=` first when used; put double-dash options last:
```bash
obsidian tasks todo total --copy
obsidian vault="My Vault" search query="TODO" --copy
obsidian tasks todo format=json # many list commands also accept format=
# Wrong: obsidian --copy vault="My Vault" tasks todo
```
## Plugin development
### Develop/test cycle
Turn on console capture once with `obsidian dev:debug on`, so messages from the reload are kept. After making code changes to a plugin or theme, follow this workflow:
1. **Reload** the plugin to pick up changes:
```bash
obsidian plugin:reload id=my-plugin
```
2. **Check for errors** — if errors appear, fix and repeat from step 1:
```bash
obsidian dev:errors
```
3. **Verify visually** with a screenshot or DOM inspection:
```bash
obsidian dev:screenshot
obsidian dev:dom selector=".workspace-leaf" text
```
4. **Check console output** for warnings or unexpected logs:
```bash
obsidian dev:console level=error
```
`dev:screenshot` saves to a temporary file and prints its path. A relative `path=` saves inside the vault.
### Additional developer commands
Run JavaScript in the app context (prefer dedicated commands like `rename`, `move`, `create`, and `append` for vault mutations):
```bash
obsidian eval code="app.vault.getFiles().length"
```
Inspect CSS values:
```bash
obsidian dev:css selector=".workspace-leaf" prop=background-color
```
Toggle mobile emulation:
```bash
obsidian dev:mobile on
```
Run `obsidian help` to see additional developer commands including CDP and debugger controls.
@@ -27,6 +27,9 @@ Create and edit valid Obsidian Flavored Markdown. Obsidian extends CommonMark an
[[Note Name#^block-id]] Link to block [[Note Name#^block-id]] Link to block
[[#Heading in same note]] Same-note heading link [[#Heading in same note]] Same-note heading link
``` ```
Inside Markdown tables, escape wikilink alias pipes as `[[Note\|Alias]]` so the alias separator is not parsed as a table cell delimiter. When a table follows a paragraph, leave a blank line above it, or it renders as plain text.
Links resolve by file name, not by the `aliases` property. A bare `[[Alias]]` stays unresolved; write `[[Note|Alias]]` to show an alias.
Define a block ID by appending `^block-id` to any paragraph: Define a block ID by appending `^block-id` to any paragraph:
@@ -89,7 +92,7 @@ cssclasses:
--- ---
``` ```
Default properties: `tags` (searchable labels), `aliases` (alternative note names for link suggestions), `cssclasses` (CSS classes for styling). Default properties: `tags` (searchable labels), `aliases` (alternative names offered in link suggestions; links still use the file name), `cssclasses` (CSS classes for styling).
See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage. See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage.
@@ -100,7 +103,7 @@ See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax
#nested/tag Nested tag with hierarchy #nested/tag Nested tag with hierarchy
``` ```
Tags can contain letters, numbers (not first character), underscores, hyphens, and forward slashes. Tags can also be defined in frontmatter under the `tags` property. Tags can contain letters, numbers, underscores, hyphens, and forward slashes, but must include at least one non-numerical character (`#1984` is invalid, `#1984book` is valid). A space ends a tag, so `#my tag` is the tag `#my`. Tags can also be defined in frontmatter under the `tags` property.
## Comments ## Comments
@@ -116,8 +119,11 @@ This entire block is hidden in reading view.
```markdown ```markdown
==Highlighted text== Highlight syntax ==Highlighted text== Highlight syntax
==🔴Highlighted text== Colored highlight (Obsidian 1.14.1 and later)
``` ```
A colored highlight starts with 🔴, 🟠, 🟡, 🟢, 🔵 or 🟣 (or the matching square) right after `==`. Other emoji stay as text.
## Math (LaTeX) ## Math (LaTeX)
```markdown ```markdown
@@ -31,12 +31,14 @@ due: 2024-02-01T14:30:00
| Date | `date: 2024-01-15` | | Date | `date: 2024-01-15` |
| Date & Time | `due: 2024-01-15T14:30:00` | | Date & Time | `due: 2024-01-15T14:30:00` |
| List | `tags: [one, two]` or YAML list | | List | `tags: [one, two]` or YAML list |
| Links | `related: "[[Other Note]]"` | | Tags | Only for the `tags` property |
Links go in Text or List properties: `related: "[[Other Note]]"`. Always quote wikilinks in YAML, because an unquoted `[[Other Note]]` is read as a nested list, not a link.
## Default Properties ## Default Properties
- `tags` - Note tags (searchable, shown in graph view) - `tags` - Note tags (searchable, shown in graph view)
- `aliases` - Alternative names for the note (used in link suggestions) - `aliases` - Alternative names for the note, offered in link suggestions. A bare `[[Alias]]` doesn't resolve; write `[[Note|Alias]]`
- `cssclasses` - CSS classes applied to the note in reading/editing view - `cssclasses` - CSS classes applied to the note in reading/editing view
## Tags ## Tags
@@ -48,7 +50,7 @@ due: 2024-02-01T14:30:00
#tag_with_underscores #tag_with_underscores
``` ```
Tags can contain: letters (any language), numbers (not first character), underscores `_`, hyphens `-`, forward slashes `/` (for nesting). Tags can contain: letters (any language), numbers, underscores `_`, hyphens `-`, forward slashes `/` (for nesting). A tag needs at least one non-numerical character (`#1984book`, not `#1984`), and a space ends it.
In frontmatter: In frontmatter:
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
exit 1
fi
files=(
"plugins/obsidian/plugin.json"
"plugins/obsidian/.claude-plugin/plugin.json"
"plugins/obsidian/.cursor-plugin/plugin.json"
".claude-plugin/marketplace.json"
)
current_version="$(sed -nE 's/^[[:space:]]*"version": "([0-9]+\.[0-9]+\.[0-9]+)".*/\1/p' "${files[0]}" | head -n 1)"
IFS=. read -r major minor patch <<< "$current_version"
case "$1" in
major) new_version="$((major + 1)).0.0" ;;
minor) new_version="$major.$((minor + 1)).0" ;;
patch) new_version="$major.$minor.$((patch + 1))" ;;
*)
if [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
new_version="$1"
else
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
exit 1
fi
;;
esac
for file in "${files[@]}"; do
perl -0pi -e "s/\"version\": \"[0-9]+\\.[0-9]+\\.[0-9]+\"/\"version\": \"$new_version\"/" "$file"
done
echo "Updated version: $current_version -> $new_version"
-106
View File
@@ -1,106 +0,0 @@
---
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:
```bash
obsidian create name="My Note" content="Hello world"
```
**Flags** are boolean switches with no value:
```bash
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:
```bash
obsidian vault="My Vault" search query="test"
```
## Common patterns
```bash
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:
```bash
obsidian plugin:reload id=my-plugin
```
2. **Check for errors** — if errors appear, fix and repeat from step 1:
```bash
obsidian dev:errors
```
3. **Verify visually** with a screenshot or DOM inspection:
```bash
obsidian dev:screenshot path=screenshot.png
obsidian dev:dom selector=".workspace-leaf" text
```
4. **Check console output** for warnings or unexpected logs:
```bash
obsidian dev:console level=error
```
### Additional developer commands
Run JavaScript in the app context:
```bash
obsidian eval code="app.vault.getFiles().length"
```
Inspect CSS values:
```bash
obsidian dev:css selector=".workspace-leaf" prop=background-color
```
Toggle mobile emulation:
```bash
obsidian dev:mobile on
```
Run `obsidian help` to see additional developer commands including CDP and debugger controls.