obsidian-doc-structure

obsidian-doc-structure is a skill for Claude Code from ryanzhao1011/workframe. It costs 57 tokens per session (1,407 once invoked), scanned A, original, MIT.

A read-only tool for inspecting the structure and properties of Obsidian notes. Obsidian is a note-taking app that stores linked Markdown files, and properties are fields such as status or date.

In plain words
What is it for?
Use it to inspect document structure, check required properties, count words, and prepare documents for publishing checks.
Why use it?
It lets an agent check a note's outline, tags, aliases, and metadata before reading the entire document. It can use the Obsidian command-line tool when available or fall back to reading the file directly.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 37 skills, 4 agents, 11 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ryanzhao1011/workframe/obsidian-doc-structure
Any agent
npx skills add ryanzhao1011/workframe --skill obsidian-doc-structure
Clone the repo
git clone --depth 1 https://github.com/ryanzhao1011/workframe

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 4 agents, 11 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for obsidian-doc-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryanzhao1011/workframe/obsidian-doc-structure.svg)](https://agentmods.dev/skills/ryanzhao1011/workframe/obsidian-doc-structure)
Your own site
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/obsidian-doc-structure"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/obsidian-doc-structure.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,407 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01407
Opus 5 $0.00028 $0.00704
Sonnet 5 $0.00011 $0.00281
Haiku 4.5 $0.00006 $0.00141

Measured 5d ago against content hash c752657d5b5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

obsidian-doc-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/core/skills/obsidian-doc-structure/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Obsidian Doc Structure

定位

本 skill 只读文档结构和属性,不写正文。它帮助 agent 在精读全文前先理解文档骨架,并检查 frontmatter / Properties 是否满足项目规范。

触发场景

  • 需求评估前,先读取 outline 判断需要精读哪些章节。
  • PRD / spec / plan / decision 发布前检查 typestatusupdated 等属性完整性。
  • 用户问“这份文档结构完整吗”“缺哪些属性”“大概多少字”。
  • 项目配备的发布器(<platform>-publish)发布前读取 status 与该平台的同步状态字段。

何时不用

  • 已经明确要读全文:直接 Read
  • 简单关键词搜索:直接 rg
  • 需要修改属性:调用 obsidian-safe-write
  • 需要检查坏链:调用 obsidian-link-audit

CLI Probe

优先读取 .claude/workframe-state/obsidian-cli-status.json(schema 权威定义见下方「status.json schema」):

  • do_not_probe: true永不重新 probe(不设 TTL、不做过期自判),直接按 cli_available 决定走 CLI 还是 fallback;重新启用 CLI 的唯一入口 = 用户手动删除该文件后自然触发重新检测
  • 缓存缺失 → 执行非执行检测(三步全程不运行任何 obsidian 命令):
    1. 定位命令:Get-Command obsidian(Windows)/ command -v obsidian(POSIX);不存在 → CLI 不可用
    2. GUI 启动器判定:命令所在目录存在 Obsidian.exe / resources.pak 等桌面程序特征文件 → 是 GUI 而非 CLI shim → CLI 不可用
    3. 判定不可用 → 写入 status.json(cli_available: falsedo_not_probe: truereason 注明检测依据)并走 fallback
  • 仅当非执行检测确认存在独立 CLI shim 时,才允许执行 obsidian version / obsidian vault info=path 验证,并把验证通过的命令写入 commands_verified

⚠️ 未通过非执行检测时禁止执行任何 obsidian 命令——在「装了 GUI 但未启用 CLI」的机器上会误启动 Obsidian 窗口(官方行为:If Obsidian is not running, the first command you run launches Obsidian)。

失败时 fallback 到 Read + 简单解析。

status.json schema(workframe.obsidian-cli-status.v1)

字段 类型 说明
__schema__ string 固定 workframe.obsidian-cli-status.v1
checked_at ISO-8601 最近一次检测时间
cli_available bool CLI 是否可用
commands_verified string[] 已实际验证可用的命令名
do_not_probe bool true = 永不重新 probe;重置方式 = 删除本文件
reason / note string 检测依据与人读说明(可选)

其余 3 个 obsidian-* skill 引用本表,不重复定义。

调用前检查

执行任一 Obsidian CLI 命令前,必须依序确认:

  • status.json 存在且 do_not_probe: truecli_available: false → 直接 fallback,不做任何 probe。
  • 命令在 commands_verified 数组中 → 可以使用 CLI。
  • 命令不在数组中 → 直接 fallback,不尝试执行。
  • status.json 不存在或 schema 不匹配 → 按「CLI Probe」的非执行检测流程重新检测(禁止直接执行 obsidian 命令)。

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 112 lines · 57 tokens per session scan A c752657d5b5c

Subscribe to this mod's changes

obsidian-doc-structure is a skill published in the GitHub repository ryanzhao1011/workframe (4 stars, last pushed 18d ago), licensed MIT. It adds 57 tokens to every session and 1,407 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories