Skip to content
Back to skills

Obsidian Cli

ASecurity

This skill should be used when the user wants to interact with Obsidian from Claude Code. Triggers when the user asks to "search obsidian", "query bases", "read note properties", "set note properties", "create notes in obsidian", or work with Obsidian-specific files like .base files.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
data-aibash

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add cyberstrat-forge/cyber-nexus --skill obsidian-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Obsidian Cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Obsidian Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyberstrat-forge-obsidian-cli/badge)](https://www.skillsdirectory.com/skills/cyberstrat-forge-obsidian-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: obsidian-cli
description: This skill should be used when the user wants to interact with Obsidian from Claude Code. Triggers when the user asks to "search obsidian", "query bases", "read note properties", "set note properties", "create notes in obsidian", or work with Obsidian-specific files like .base files.
---

## 概述

此 skill 提供通过 Obsidian CLI 操作 Obsidian 的能力,支持用户在 Claude Code 中查询、搜索、操作 Obsidian vault。

## 前置条件

- Obsidian 应用运行中(CLI 需要连接到运行中的 Obsidian)
- Obsidian 1.12+ 版本(CLI 支持)
- 用户已在 Obsidian 设置中启用 CLI(Settings → General → Command line interface)

## 常用命令

### 文件操作

```bash
# 创建文件
obsidian create path="folder/note.md" content="# Title\n\nContent"

# 读取文件
obsidian read file="note-name"

# 列出文件
obsidian files folder="folder-path"

# 搜索文件
obsidian search query="search term" path="folder"
```

### 属性操作

```bash
# 读取属性
obsidian property:read file="note-name" name="property-name"

# 设置属性
obsidian property:set file="note-name" name="property-name" value="value"
```

### Bases 操作

```bash
# 列出所有 .base 文件
obsidian bases

# 查询 base 结果
obsidian base:query file="base-name" view="view-name" format=json
```

## 使用示例

### 创建 Bases 索引文件

```bash
obsidian create path="intelligence/Threat-Landscape/_index.base" content="filters:
  and:
    - file.ext == \"md\"
    - file.name != \"_index\"

views:
  - type: table
    name: \"按发布时间\"
    order:
      - note.published_at
    direction: DESC"
```

### 搜索情报卡片

```bash
obsidian search query="ransomware" path="intelligence"
```

### 查询 Bases 视图

```bash
obsidian base:query file="Threat-Landscape/_index" view="最近 7 天新增" format=json
```

## 注意事项

- CLI 命令需要 Obsidian 应用运行中
- `file` 参数使用文件名(不需要完整路径和扩展名)
- `path` 参数需要完整路径(从 vault 根目录开始)
- 多行内容使用 `\n` 表示换行,`\t` 表示制表符

## 相关资源

- **`references/cli-commands.md`** - 完整 CLI 命令参考

Files in this skill

  • SKILL.md2.2 KB
  • references/cli-commands.md4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.