ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 musingfox

obw

Obsidian Workspace——以專案為範圍的 vault 生產力工具(擷取 / 筆記 / PM)。技能負責資料夾配置和範本;/obw:pm 會把規格拆成阻塞工單;/issue 是一個 Claude Mod 面板,會列出專案 dashboard 的檢視、把 Mermaid 繪製成文字圖表,並能透過 viz 在瀏覽器中開啟卡片。Vault I/O 透過官方 obsidian-cli 技能使用 Obsidian CLI。

musingfox@musingfox

musingfox/cc-plugins/tree/main/obsidian-workspace

已翻譯

關於這個 mod

Obsidian Workspace

以專案為範圍的 Obsidian vault 生產力工具,提供 Claude Code 的快速擷取、長篇筆記和專案管理。技能負責資料夾配置、檔案範本和 PM 慣例;/issue Claude Mod 會在面板中列出專案 dashboard 的檢視;vault I/O 透過 Obsidian CLI 執行,語法交由官方 obsidian:obsidian-cli 技能處理。每個技能檔案都維持精簡,不會消耗你的上下文預算。

外掛識別字:obw(技能可透過 /obw:<name> 或自然語言呼叫)。

技能

| 技能 | 用途 | |-------|---------| | /obw:init | 選擇 vault、寫入 .obsidian.yaml、安裝起始範本、初始化專案工作區、遷移舊配置 | | /obw:jot <text> | 快速擷取(將帶時間戳記的項目符號寫入今天的每日筆記)或長篇筆記——依輸入形態分流 | | /obw:pm [intent] | 專案範圍內的任務 / 文件生命週期;把規格拆成阻塞工單 |

運作方式

  • Vault I/O 透過 obsidian CLI 執行,直接在主要上下文中運作(沒有子代理)。這個外掛不重複 CLI 語法,而是交由官方 obsidian:obsidian-cli 技能和 obsidian help。
  • 每日筆記 使用 Obsidian 的 Daily Notes 核心外掛(資料夾 / 檔名 / 範本)。快速擷取會呼叫 daily:append。
  • 範本(task、doc)位於 vault 的 Obsidian Templates 資料夾中。執行 /obw:init 時,外掛只會在同名檔案不存在時從 templates/ 複製起始檔案——絕不覆寫你的編輯。
  • Dashboard 是 Obsidian Bases(.base 檔案——Obsidian 1.9+ 的核心功能),透過 shell substitution 從外掛內部範本產生,因此內容不會進入 Claude 的上下文。

Issue 面板

執行 /issue <view>,列出由 /obw:pm 建立的已設定專案 dashboard.base 中的一個檢視,然後選取一項,在同一個面板中讀取它的標題、狀態、優先順序和 markdown 內容。不帶引數執行 /issue 會在檢視選擇器下開啟 All Tasks 檢視,顯示可用方向鍵操作的清單:卡片依狀態(todo、in-progress、blocked、done)分組,每個標題帶有卡片數量;每列顯示 [H|M|L] <title> <due> <tags>,依優先順序排序,並在開頭摺疊 done。點擊清單讓它接收按鍵;↑↓ 移動,PgUp/PgDn 翻頁,→ 或 Enter 開啟卡片或展開標題,← 回到清單或摺疊標題。這個清單需要終端機或桌面環境;在其他地方,All Tasks 會退回其他檢視使用的扁平清單。其他檢視維持扁平清單。沒有 All Tasks 的 dashboard 會開啟 Active,並提示執行 /obw:pm refresh dashboard。/issue <card> 會直接開啟該卡片。面板會在原處回報缺少設定、CLI 輸出無法使用和缺少卡片,不會把 vault 內容加入對話。

細線會將卡片與清單分開。狀態和優先順序會顯示為彩色標籤;如果卡片的 Acceptance Criteria 區段含有核取方塊,後面會加上 AC <checked>/<total> 計數。錯誤以紅色繪製;進度和空清單通知維持暗色。

卡片內容中的 Mermaid 區塊會由 uvx [email protected] 在面板中繪製成文字圖表,需要 uv。uv 是選用的:沒有 uv 時,區塊會維持卡片中的程式碼區塊。當圖表類型不支援、以 %% 註解或 --- frontmatter 開始,或 termaid 失敗、沒有輸出、耗時超過 5 s 時,區塊也會維持程式碼區塊。卡片會先繪製,圖表準備好後逐一取代對應的程式碼區塊,因此第一次執行時,在 uv 取得 termaid 前可能會先顯示程式碼區塊。

顯示的卡片有一個 Open in browser Button,會透過 viz 外掛的 render.sh 渲染卡片內容(包含 Mermaid)。只有在 viz 已安裝、能在 $CLAUDE_CONFIG_DIR 或 ~/.claude 下的 installed_plugins.json 找到,且目前位於終端機時,Button 才會出現。開啟瀏覽器使用 macOS 的 open;透過 SSH 時,面板會改為顯示頁面 URL。面板會回報卡片渲染到哪裡,或說明為什麼沒有渲染。頁面會在執行 Claude Code 的機器上開啟:如果你是透過沒有設定 SSH 變數的終端機多工器或 relay(例如 herdr)進入工作階段,瀏覽器會在那台主機上開啟,而不是你正在查看的裝置。

若要從 tailnet 上的另一台裝置讀取頁面,可以用 tailscale serve --bg --https=18090 18090 代理 viz 的連接埠一次。每次渲染後,面板都會讀取 tailscale serve status --json;當某個對映涵蓋頁面的連接埠時,會加入一行 Tailnet: https://<machine>.<tailnet>.ts.net:18090/…。面板不會自行建立對映;沒有對映時,只會顯示已開啟的頁面。

使用以下命令測試外掛:

claude plugin test obsidian-workspace

面板需要 Claude Code 2.1.287 或更新版本,因為從該版本起 Claude Mods 預設啟用。外掛以 Claude Code 2.1.287 為目標建置和測試。

先決條件

  • 官方 obsidian 外掛(來自 obsidian-skills marketplace)——宣告為外掛相依項目,因此只要已加入該 marketplace(claude plugin marketplace add),它就會隨本外掛自動安裝
  • Obsidian 應用程式正在執行(無頭 CLI 也可以)
  • 已安裝並啟用 Obsidian 社群外掛 obsidian-cli。外掛名稱是 obsidian-cli,但它安裝的可執行檔是 obsidian(呼叫方式為 obsidian vault=<name> ...)。這不是 Yakitrak 提供的無關獨立 obsidian-cli 二進位檔。
  • 已啟用 Templates 核心外掛(/obw:pm 所需——task / doc 範本)
  • 已啟用 Daily Notes 核心外掛(/obw:jot 快速擷取所需)
  • 已啟用 Bases 核心外掛(只有 /obw:pm dashboard 需要——Obsidian 1.9+ 已內建)
  • uv(選用;讓 /issue 面板透過 uvx [email protected] 將 Mermaid 區塊繪製成文字圖表——沒有它們會顯示為程式碼區塊)
  • viz 外掛(選用;啟用 /issue 面板的 Open in browser Button——沒有它就不會繪製 Button)
  • Claude Code 2.1.287 或更新版本(只有 /issue 面板需要;技能本身不需要)

安裝

/plugin install obsidian-workspace

權限(建議)

Vault 操作會呼叫 obsidian CLI 和少量 Unix 輔助工具。為避免重複出現權限提示,可以將以下內容一次加入使用者的 settings.json(~/.claude/settings.json):

{
  "permissions": {
    "allow": [
      "Bash(obsidian:*)",
      "Bash(cat:*)",
      "Bash(jq:*)",
      "Bash(cp:*)",
      "Bash(sed:*)"
    ]
  }
}

或者在卡住的 /obw:init 之後執行 /fewer-permission-prompts,它會掃描轉錄並提出相同的清單。

設定

在專案根目錄執行 /obw:init。產生的 .obsidian.yaml:

vault: MyVault

note:
  default_folder: Inbox
  filename_strategy: title     # title | slug | timestamp-title

pm:
  project: my-project          # Omit this section to disable /obw:pm

每日筆記的資料夾 / 檔名 / 範本不在 .obsidian.yaml 中——它們來自 Obsidian 的 Daily Notes 設定。

Vault 配置(/obw:pm)

pm/
├── dashboard.base        # Cross-project dashboard (optional, Bases)
└── {project}/
    ├── dashboard.base    # Project dashboard (Bases)
    ├── tasks/            # Active tasks
    │   └── archive/      # Completed tasks
    └── docs/             # Docs

每個專案都會取得 tasks/、docs/ 和 dashboard.base——/obw:init 會預先建立這三項,所以專案永遠不會只是空資料夾。

從 0.9 之前的 vault 升級:重新執行 /obw:init。它會偵測舊配置,並分別提供以下選項:將 archive/ 移到 tasks/archive/(透過 CLI,因此連結會跟著移動)、為現有筆記補寫 title 屬性,以及用新檢視重新產生 dashboard。現有檔名永遠不會重新命名。

外掛更新可能會加入 dashboard 檢視。在現有 vault 上執行 /obw:pm refresh dashboard,以帶入 All Tasks(以及其他新的範本檢視)。重新整理會從範本重新產生 dashboard.base,因此該檔案的手動編輯會被覆寫;它會先警告並詢問。

檔名

所有筆記都使用 kebab-case(Implement Auth → implement-auth.md),包括 /obw:jot 筆記和 /obw:pm 任務 / 文件。由於 Obsidian 的 {{title}} 會解析為檔名,可讀的標題存放在 title 屬性中——dashboard 顯示的就是這個屬性。

屬性 schema

Dashboard 和搜尋依賴這些 frontmatter 欄位。如果你編輯已安裝的範本,請保留欄位名稱。

  • Task——title、type: task、status(todo / in-progress / blocked / done)、priority(high / medium / low)、project、due(日期)、tags(清單)、parent(連結)、blocked_by(連結清單)、related(連結清單)、created、completed
  • Doc——title、type: doc、project、created、updated

任務關係

任務透過 wikilink,使用三個屬性彼此連結——blocked_by、related 和 parent(epic → subtask)。沒有獨立的 issue ID:kebab 檔名就是識別名稱,筆記重新命名時 Obsidian 會改寫連結。

这里只儲存一個方向。任務會阻塞什麼,以及它有哪些子任務,來自 Obsidian 的 backlinks 面板——在 blocked_by 旁增加 blocks 欄位只會造成漂移。加入阻塞項目會設定 status: blocked;封存任務時會列出仍依賴它的項目,並在解除阻塞前詢問。工單拆分會把阻塞邊寫入 blocked_by;未阻塞前沿是排除 -[blocked_by: wikilinks 的 search,而不是檢視。

範例

/obw:jot #worklog 完成 API 重構 PR,等 review
/obw:jot API Redesign Proposal --folder Architecture --tag design
/obw:pm add task implement-auth, high priority, due 2026-05-01
/obw:pm implement-auth is blocked by db-migration
/obw:pm implement-auth is done, archive it
/obw:pm split this spec into tickets
/obw:pm refresh dashboard

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add musingfox/cc-plugins
claude plugin install obw
原文 / README

Obsidian Workspace

Project-scoped Obsidian vault productivity for Claude Code — quick capture, long-form notes, and project management. Skills own folder layout + file templates + PM conventions, while the /issue Claude Mod lists a view of the project's dashboard in a pane; vault I/O runs through the Obsidian CLI, deferring to the official obsidian:obsidian-cli skill for syntax. Each skill file is kept small so it doesn't burn your context budget.

Plugin identifier: obw (skills invoked as /obw:<name> or via natural language).

Skills

| Skill | Purpose | |-------|---------| | /obw:init | Pick a vault, write .obsidian.yaml, install starter templates, bootstrap the project workspace, migrate an older layout | | /obw:jot <text> | Quick capture (timestamped bullet to today's daily note) or long-form note — triages by input shape | | /obw:pm [intent] | Task / document lifecycle, project-scoped; split a spec into blocking tickets |

How It Works

  • Vault I/O goes through the obsidian CLI, run directly in the main context (no sub-agent). This plugin does not duplicate CLI syntax; it defers to the official obsidian:obsidian-cli skill and obsidian help.
  • Daily notes use Obsidian's Daily Notes core plugin (folder / filename / template). Quick capture calls daily:append.
  • Templates (task, doc) live in your vault's Obsidian Templates folder. On /obw:init the plugin copies starter files from templates/ only if the same name doesn't already exist — it never overwrites your edits.
  • Dashboards are Obsidian Bases (.base files — core in Obsidian 1.9+) generated from plugin-internal templates via shell substitution, so contents never enter Claude's context.

Issue Pane

Run /issue <view> to list a view from the configured project's dashboard.base, created by /obw:pm, then select one to read its title, status, priority, and markdown body in the same pane. /issue with no argument opens the All Tasks view as an arrow-key list under the view picker: cards grouped by status (todo, in-progress, blocked, done), each heading with its card count, each row reading [H|M|L] <title> <due> <tags> sorted by priority, and done folded at the start. Click the list to give it the keys; ↑↓ move, PgUp/PgDn page, → or Enter opens a card or unfolds a heading, and ← goes back to the list or folds a heading. The list needs the terminal or desktop; elsewhere All Tasks falls back to the flat list other views use. Other views stay flat lists. A dashboard without All Tasks opens Active and says to run /obw:pm refresh dashboard. /issue <card> opens that card directly. The pane reports missing configuration, unavailable CLI output, and missing cards in place without adding vault content to the conversation.

A thin rule sets the card off from the list. Status and priority are coloured labels, followed by an AC <checked>/<total> count when the card's Acceptance Criteria section has checkboxes. Errors are drawn in red; progress and empty-list notices stay dim.

Mermaid blocks in the card body are drawn in the pane as text diagrams by uvx [email protected], which needs uv. uv is optional: without it, a block stays the code block it is in the card. A block also stays a code block when its diagram type is not supported, when it starts with a %% comment or --- frontmatter, or when termaid fails, prints nothing, or takes longer than 5 s. The card is drawn first and each diagram replaces its code block when it is ready, so the first run may show the code block until uv has fetched termaid.

A shown card has an Open in browser Button that renders the card body, Mermaid included, through the viz plugin's render.sh. The Button appears only when viz is installed, found through installed_plugins.json under $CLAUDE_CONFIG_DIR or ~/.claude, and only in the terminal. Opening the browser uses macOS open; over SSH the pane shows the page's URL instead. The pane reports where the card was rendered, or why it was not. The page opens on the machine running Claude Code: when you reach the session through a terminal multiplexer or relay that does not set the SSH variables (herdr, for example), the browser opens on that host, not on the device you are looking at.

To read the page from another device on your tailnet, proxy viz's port once with tailscale serve --bg --https=18090 18090. After each render the pane reads tailscale serve status --json and, when a mapping covers the page's port, adds a Tailnet: https://<machine>.<tailnet>.ts.net:18090/… line. The pane never creates a mapping itself; without one it shows only the opened page.

Test the plugin with:

claude plugin test obsidian-workspace

The pane needs Claude Code 2.1.287 or later, where Claude Mods are on by default. Built and tested against Claude Code 2.1.287.

Prerequisites

  • Official obsidian plugin (from the obsidian-skills marketplace) — declared as a plugin dependency, so it auto-installs with this plugin as long as that marketplace is added (claude plugin marketplace add)
  • Obsidian app running (headless CLI also works)
  • Obsidian community plugin obsidian-cli installed and enabled. The plugin's name is obsidian-cli but the executable it installs is obsidian (invoked as obsidian vault=<name> ...). This is not the unrelated standalone obsidian-cli binary by Yakitrak.
  • Templates core plugin enabled (required for /obw:pm — task / doc templates)
  • Daily Notes core plugin enabled (required for /obw:jot quick capture)
  • Bases core plugin enabled (required only for /obw:pm dashboards — bundled in Obsidian 1.9+)
  • uv (optional; lets the /issue pane draw Mermaid blocks as text diagrams through uvx [email protected] — without it they show as code blocks)
  • viz plugin (optional; enables the /issue pane's Open in browser Button — without it the Button is not drawn)
  • Claude Code 2.1.287 or later (required only for the /issue pane; the skills do not need it)

Installation

/plugin install obsidian-workspace

Permissions (recommended)

Vault operations shell out to the obsidian CLI plus a few Unix helpers. To avoid repeated permission prompts, add these to user settings.json (~/.claude/settings.json) once:

{
  "permissions": {
    "allow": [
      "Bash(obsidian:*)",
      "Bash(cat:*)",
      "Bash(jq:*)",
      "Bash(cp:*)",
      "Bash(sed:*)"
    ]
  }
}

Or run /fewer-permission-prompts after a stuck /obw:init and it will scan transcripts and propose the same list.

Configuration

Run /obw:init in a project root. The generated .obsidian.yaml:

vault: MyVault

note:
  default_folder: Inbox
  filename_strategy: title     # title | slug | timestamp-title

pm:
  project: my-project          # Omit this section to disable /obw:pm

Daily note folder / filename / template are not in .obsidian.yaml — they come from Obsidian's Daily Notes settings.

Vault Layout (/obw:pm)

pm/
├── dashboard.base        # Cross-project dashboard (optional, Bases)
└── {project}/
    ├── dashboard.base    # Project dashboard (Bases)
    ├── tasks/            # Active tasks
    │   └── archive/      # Completed tasks
    └── docs/             # Docs

Every project gets tasks/, docs/, and dashboard.base — /obw:init creates all three up front, so a project is never a bare folder.

Upgrading a vault from before 0.9: re-run /obw:init. It detects the old layout and offers, each separately, to move archive/ into tasks/archive/ (through the CLI, so links follow), backfill the title property on existing notes, and regenerate the dashboards with the new views. Existing filenames are never renamed.

A plugin update can add dashboard views. Run /obw:pm refresh dashboard to bring in All Tasks (and any other new template view) on an existing vault. The refresh regenerates dashboard.base from the template, so hand edits to that file are overwritten; it warns and asks first.

Filenames

All notes are kebab-cased (Implement Auth → implement-auth.md), for both /obw:jot notes and /obw:pm tasks / docs. Because Obsidian's {{title}} resolves to the filename, the human-readable title lives in the title property — that is what the dashboards display.

Property Schema

Dashboards and searches depend on these frontmatter fields. If you edit the installed templates, keep the field names.

  • Task — title, type: task, status (todo / in-progress / blocked / done), priority (high / medium / low), project, due (date), tags (list), parent (link), blocked_by (list of links), related (list of links), created, completed
  • Doc — title, type: doc, project, created, updated

Task Relations

Tasks link to each other by wikilink through three properties — blocked_by, related, and parent (epic → subtask). There is no separate issue ID: the kebab filename is the handle, and Obsidian rewrites links when a note is renamed.

Only one direction is stored. What a task blocks, and what its subtasks are, come from Obsidian's backlinks pane — a blocks field alongside blocked_by would only drift. Adding a blocker sets status: blocked; archiving a task lists whatever still depends on it and asks before unblocking. Ticket splitting writes its blocking edges to blocked_by; the unblocked frontier is a search excluding -[blocked_by: wikilinks, not a view.

Examples

/obw:jot #worklog 完成 API 重構 PR,等 review
/obw:jot API Redesign Proposal --folder Architecture --tag design
/obw:pm add task implement-auth, high priority, due 2026-05-01
/obw:pm implement-auth is blocked by db-migration
/obw:pm implement-auth is done, archive it
/obw:pm split this spec into tickets
/obw:pm refresh dashboard

更多類似作品