Obsidian 命令与快捷键管理
command-palette
从命令行运行、列出和检查 Obsidian 命令与快捷键。触发命令、枚举命令或查看快捷键绑定时使用。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 60
- Forks
- 6
01 前言 Front Matter
- name
- command-palette
- created
- 1777507200000
- modified
- 1790035200000
- reviewed
- 1790035200000
- description
- Run, list, and inspect Obsidian commands and hotkeys from the CLI. Use when triggering a command, enumerating commands, or checking hotkey bindings.
- allowed-tools
- Bash(obsidian *), Read, Grep, Glob
- user-invocable
- false
02 资源文件 1
- 参考文档agents/openai.yaml202 B
03 SKILL.md 正文
Obsidian Command Palette
When to Use This Skill
| Use this skill when... | Use the alternative instead when... |
|---|---|
Triggering a command the user would normally pick from the command palette (Ctrl/Cmd+P) |
Running JavaScript via the developer API — use dev-tools |
| Discovering what commands a plugin registers | Enabling/disabling a plugin entirely — use plugins-themes |
| Looking up which hotkey is bound to a command | Setting up a workspace — use workspaces |
The command palette is Obsidian's universal action surface — every built-in operation and every command registered by a plugin appears here. The CLI exposes the same surface, which is the leverage point for automation: any plugin command becomes scriptable without writing JavaScript.
Prerequisites
- Obsidian desktop 1.12.7+ installer with CLI enabled
- Obsidian must be running
List Commands
# All available command IDs
obsidian commands
# Filter by ID prefix (e.g. only Templater commands)
obsidian commands filter=templater
# Filter to a built-in family
obsidian commands filter=editor
obsidian commands filter=workspace
Command IDs follow the pluginid:action convention — e.g.
editor:toggle-bold, workspace:split-vertical, dataview:dataview-rebuild-current-view.
Execute a Command
# Run a built-in command
obsidian command id=editor:toggle-bold
# Run a plugin-registered command
obsidian command id=templater-obsidian:insert-templater
obsidian command id=dataview:dataview-rebuild-current-view
# Open the command palette itself
obsidian command id=command-palette:open
command always operates against the active editor / active file — there
is no file= parameter. To run a command against a specific note, open
the note first (obsidian open file=Foo), then run command.
Hotkeys
# All bound hotkeys
obsidian hotkeys
# Mark which entries are user-customised vs default
obsidian hotkeys verbose
# Count of bound hotkeys
obsidian hotkeys total
# Lookup the hotkey for one command
obsidian hotkey id=editor:toggle-bold
obsidian hotkey id=editor:toggle-bold verbose
Common Patterns
"Run a Templater template against the current note"
obsidian open file="Notes/Today"
obsidian command id=templater-obsidian:replace-in-file-templater
"Find every Dataview command"
obsidian commands filter=dataview
"Discover what hotkeys conflict with a new binding"
obsidian hotkeys format=json | jq '[.[] | select(.hotkey == "Ctrl+Shift+P")]'
(Requires the user's installed jq; the CLI itself does not pipe.)
Agentic Optimizations
| Context | Command |
|---|---|
| List all commands | obsidian commands |
| Filter commands by prefix | obsidian commands filter=PREFIX |
| Run a command | obsidian command id=PLUGIN:ACTION |
| List hotkeys (structured) | obsidian hotkeys format=json |
| Lookup one hotkey | obsidian hotkey id=PLUGIN:ACTION |
| Show user-customised hotkeys | obsidian hotkeys verbose |
Related Skills
- plugins-themes — Enable the plugin before its commands become available
- workspaces — Set up an editor state, then run a command against it
- dev-tools — When a command doesn't exist for what you need
04 同仓库更多 Skills
session-workflow-capture
Workflow-tool scripts and workflow friction from this session, filed as issues here or in the plugins repo. Use when a session ran Workflow scripts.
kitty-show-image
Show the user an image with a note on what to judge, via a file send or a labelled kitty tab. Use when the user must see an image, or icat fails with no /dev/tty.
kitty-session-persistence
Snapshot and restore kitty terminal sessions on macOS. Use when surviving WindowServer hangs without losing tabs, configuring snapshots, or restoring after a force-reboot.
kitty-remote-control
Safe kitty remote control from an agent — read panes with kitty @ ls/get-text, notify, and never mutate the live terminal unasked. Use when running inside kitty.
docs-reference-check
Dangling doc-reference gate: flag markdown naming repo paths or relative links that no longer exist. Use when docs cite moved/deleted files, or wiring a doc-drift lint.
YouTube 视频上传与编辑
youtube-upload
通过 Data API v3 将视频上传到 YouTube,并在之后编辑其标题、描述、标签或缩略图。适用于发布 YouTube 视频或修改其标题。