SuperAPI AI Directory

obsidian-knowledge

Office & productivity

View repository

Updated 10-16 09:45

About this skill

Obsidian Knowledge Management

You share the MyObsidian vault with the user. The user uses it through the Obsidian UI, and you use it through the obsidian CLI. This guide ensures your operations stay consistent with the user's knowledge management habits.

First Principle

Before operating on the vault for the first time, read the shared conventions:

obsidian vault=MyObsidian read file="AGENTS"

AGENTS.md contains the directory structure, tag system, frontmatter standards, linking conventions, and more. Skip it if you have already read it in the same session.

CLI Usage

All operations go through obsidian CLI,vault=MyObsidian always as the first argument:

obsidian vault=MyObsidian read file="笔记名"          # 按名称读取(无需扩展名)
obsidian vault=MyObsidian read path="folder/note.md"  # 按相对路径读取
obsidian vault=MyObsidian create name="新笔记" content="# 标题" silent  # 创建新笔记(同名则覆写)
obsidian vault=MyObsidian create path="<上一步路径>" content="<重组后全文>" overwrite silent # 覆写现有笔记
obsidian vault=MyObsidian search query="关键词"

Operation priority(from high to low):

  1. CLI first: For all vault operations, prefer the obsidian CLI. For command details, see references/obsidian-cli.md
  2. Error recovery: When the CLI reports an error, first open -a Obsidian to make sure the app is running, then retry
  3. Fall back to file editing: After confirming the CLI cannot accomplish the goal (such as section-level insertion), use the Edit tool (see Section Editing Protocol)

Section Editing Protocol

Prerequisite: This protocol requires the vault files to be on the local file system and the Agent to have file system read/write permissions.

The CLI does not support "inserting content under a specified heading" or "replacing the content of a section." When such needs arise, use the following three-step protocol:

Trigger conditions

Triggered when the operation goal is "adding content under a certain H2/H3/H4 heading" or "modifying/replacing the content in a certain section."

Step 1 — Get the file's absolute path

The note's absolute path = vault root path + "/" + relative path:

# 获取 vault 根路径
open -a Obsidian && sleep 2 && obsidian vault info=path

# daily note:获取当日笔记相对路径
obsidian vault=MyObsidian daily:path

# 普通笔记:从 search 结果获取相对路径
obsidian vault=MyObsidian search query="笔记名"

Step 2 — Read the current content and locate the section

# 快速查看文件标题结构(可选,长文件时有用)
obsidian vault=MyObsidian outline file="笔记名"
# 读取全文
obsidian vault=MyObsidian read file="笔记名"

Record the target heading text and the existing content under it (up to the next heading of the same or higher level).

Step 3 — Use the Edit tool to make precise modifications

  • Insert under the heading:old_string = heading line + existing content,new_string = heading line + existing content + new content
  • Replace section content:old_string = heading line + old content,new_string = heading line + new content
  • ProhibitedOverwriting the entire note, unless performing an explicit full-text reorganization task such as "end-of-day cleanup"

Safety constraints

  • You must read before editing; blind overwrite is not allowed
  • old_string must contain enough context to ensure a unique match
  • When #Private / #Key tagged notes are involved, refuse the operation and inform the user

Knowledge Protocol

_AgentSpace/ is a knowledge working directory autonomously managed by the Agent (see AGENTS.md for details). The internal structure of the directory is decided and maintained by the Agent itself.

_AgentSpace/ distribution model: There are multiple _AgentSpace/in the vault, distributed under various domain directories (see the _AgentSpace Convention in AGENTS.md for details). During LEARN, choose the corresponding _AgentSpace/based on the domain the content belongs to; during READ searches, use path:_AgentSpace in the query to match _AgentSpace/ directories under all domains.

The following operations apply to all notes under the _AgentSpace/ directory.

  • READ:When the conversation involves known concepts, search _AgentSpace/ and incorporate them into the answer (Executor: Knowledge Retriever)
  • LEARN:When new knowledge needs to be recorded to _AgentSpace/ ,create a knowledge note (Executors: Note Creator, Clipping Save, Knowledge Organizer)
  • LINK:When creating/updating a knowledge note, use [[wikilinks]] to reference relevant existing notes (utilizing Obsidian's native backlinks)
  • UPDATE:When updating an existing knowledge note, directly modify the content and update the frontmatter updated field (Executor: Note Editor)

Proactive LEARN rules:When the following situations occur in the conversation, the Agent should proactively suggest recording to _AgentSpace/(rather than waiting for user instructions):

  • The user corrected the Agent's understanding of a business concept
  • A domain term or rule not yet included in _AgentSpace/ appeared in the conversation
  • The user made an important technical/business decision, and the rationale for the decision is worth preserving

Suggestion method: briefly prompt "Should this concept/decision be recorded to the knowledge base?", and execute LEARN after user confirmation. Do not interrupt the main conversation flow.

All _AgentSpace/ notes follow the frontmatter standards of AGENTS.md, additionally adding source: ai-generated and managed-by: agent。

Roles

Identify user intent and automatically switch to the corresponding role. When multiple roles may match, choose according to the following priority:

  1. Involves daily note content → Daily Notes Collaborator
  2. Involves daily note tasks → Daily Task Manager
  3. Involves saving/refining web content → Clipping Save
  4. Involves organizing WebClips / organizing knowledge in a certain domain → Knowledge Organizer
  5. Involves finding information → Knowledge Retriever
  6. Involves modifying existing notes → Note Editor
  7. Involves creating new notes → Note Creator

Daily Notes Collaborator

Responsible for appending content to daily notes, as well as end-of-day organization.The task of appending is handled by Daily Task Manager。

Daily note structure conventions:

All content generated by the Agent is uniformly placed under the ## 🤖 Assistant Generated section.

Section existence check (general rule):

Before appending any sub-section content, you must first obsidian vault=MyObsidian daily:read check whether the target section already exists:

  1. ## 🤖 Assistant Generated Does not exist → when appending, include H2 + H3 header + content
  2. H2 exists but the target H3 does not exist → when appending, include H3 header + content
  3. H3 also exists → directly append content, do not repeat the header

Append content:

Choose the corresponding section according to the nature of the content:

Content type section title Applicable scenarios
Structured points ### 📝 Notes Meeting notes, study notes
Ideas/feelings ### 💭 Thoughts Free text
Web links ### 🔗 Links H4 entries, see Clipping Save
# section 不存在时(带 header):
obsidian vault=MyObsidian daily:append content="### 📝 Notes\n<内容>"
# section 已存在时(直接追加):
obsidian vault=MyObsidian daily:append content="<内容>"

Add the HH:MM prefix to time-sensitive content.

End-of-day organization:

Triggered when the user mentions "organize today", "today's summary", or "daily review":

Analysis and planning stage(read-only, do not write files):

  1. obsidian vault=MyObsidian daily:read Read the full text of the day
  2. Content organization plan:
    • ## 🤖 Assistant Generated Within: merge scattered H3 sections of the same type, with the order fixed as Notes → Thoughts → Links
    • ## 🤖 Assistant Generated Non-task content outside: ask the user whether to include it in the corresponding section,do not move automatically; the user confirms
  3. Task organization and planning:
    • obsidian vault=MyObsidian tasks daily Display the day's task list
    • obsidian vault=MyObsidian tasks todo path="01_Daily" Summarize recently incomplete tasks, grouped and displayed by note (date)
    • Plan migration of historical incomplete tasks: append to the top of the day's note, mark the original task as [-] and add (已迁移至[[<今日笔记名>]])

Confirmation and execution phase:

  1. Show the reorganized complete content to the user, and wait for confirmation
  2. After the user confirms, execute all write operations at once:
    # Step 5a: 获取当日笔记相对路径
    obsidian vault=MyObsidian daily:path
    # Step 5b: 覆写(overwrite flag 防止创建新文件)
    obsidian vault=MyObsidian create path="<上一步路径>" content="<重组后全文>" overwrite silent
    

Daily Task Manager

Focus on task management in daily notes. Triggered when the user is viewing/updating tasks in today's or historical daily notes.

# 新增任务到当日笔记顶部
obsidian vault=MyObsidian daily:prepend content="- [ ] 任务描述"

# 查看当日任务
obsidian vault=MyObsidian tasks daily
# 汇总近期每日笔记中的未完成任务
obsidian vault=MyObsidian tasks todo path="01_Daily"

# 标记当日任务完成
obsidian vault=MyObsidian task daily line=<行号> done
# 标记历史每日笔记任务完成
obsidian vault=MyObsidian task path="01_Daily/YYYY/MM月/YYYY-MM-DD.md" line=<行号> done

Workflow:

Scenario Action
"What else is left to do today" tasks daily Display today's tasks
"Completed XXX" tasks daily Find the line number → task daily line=N done
"What has been left unfinished recently" tasks todo path="01_Daily" Summarize and display grouped by date
Migrate historical incomplete tasks Append to the top of the day's note, mark the original task as [-] and add (已迁移至[[<今日笔记名>]])

Clipping Save

Save the web content already extracted and analyzed by search-and-fetch to the Obsidian vault, and complete knowledge distillation immediately.

Trigger conditions:

Situation Handling
After search-and-fetch completes content extraction/analysis, the user says "save", "record", "archive", "clip", "save" Execute directly
After search-and-fetch completes, the user has not clearly indicated an intent to save Ask: "Save to Obsidian?"

Prerequisite dependencies: search-and-fetch's integration mode output (title, summary, key points, analysis, full body text, entities).

After triggering, execute in sequence:

Step 1 — Append summary to the daily note(always execute)

Handle according to Daily Notes Collaborator's general rule for checking section existence ### 🔗 Links section:

# section 不存在时:
obsidian vault=MyObsidian daily:append content="### 🔗 Links\n<H4 条目>"
# section 已存在时:
obsidian vault=MyObsidian daily:append content="<H4 条目>"

Format of each link:

#### [页面标题](url)
> 一句话摘要

- 要点一(来自剖析)
- 要点二

**🛠 Tools**: Cursor · Windsurf      ← 工具/软件(如有)
**📈 Stocks**: $AAPL Apple           ← 股票/市场(如有)
**👤 People**: 姓名(身份)           ← 人物(如有)
**📚 Resources**: 书名               ← 书籍/论文(如有)

Step 2 — Content triage

The Agent determines the value type based on content characteristics, suggests a disposition method to the user (with a one-sentence explanation of the reason), and executes after the user confirms or adjusts:

Content characteristics Suggested disposition Action
Contains persistent knowledge (concepts, rules, best practices, architectural patterns, etc.) Distill into the knowledge base Execute Step 3
Needs the original text retained for reference (tutorials, long articles, data reports, etc.) Archive to WebClips Save the full text to 31_WebClips/<标题>.md
Time-sensitive content (news, announcements, price information, etc.) or low value Keep only the summary Do not save additionally; the process ends

Exception: when the user's original message has already clearly specified the disposition method (such as "save the full text", "record to the knowledge base", "clip"), skip the question and execute directly.

Step 3 — Knowledge distillation(executed only for "distill into the knowledge base")

  1. Extract core knowledge points (concepts, terms, rules, patterns) from the search-and-fetch output
  2. Search _AgentSpace/ to check whether related notes already exist (READ), to avoid duplication
  3. Related notes exist → UPDATE to add new information; no related notes → LEARN to create new knowledge notes
  4. Use [[wikilinks]] LINK to existing knowledge
  5. At the end of the H4 entry in the daily note, annotate → 已提炼至 [[知识笔记名]]

Knowledge Organizer

Organize 31_WebClips/ cut content, extract knowledge into the respective domain _AgentSpace/。

Trigger words: organize knowledge, organize clippings, organize WebClips, organize bookmarks

WebClips batch organization:

31_WebClips/ is the shared space for users and Agents. Unorganized clippings remain in the root directory; after organization is complete, the original text is archived to 31_WebClips/_Archive/。

  1. List the content to be organized:obsidian vault=MyObsidian search query="path:31_WebClips -path:_Archive"
  2. Read one by one, analyze which domain the content belongs to (refer to the AGENTS.md directory structure)
  3. For each clipping, perform:
    • Extract: extract knowledge points such as core concepts, terms, rules, etc. from the full text
    • Assign: determine which domain's _AgentSpace/it should be assigned to; if it cannot be clearly categorized, place it in 19_Misc/_AgentSpace/
    • LEARN: for each knowledge point, trigger the Knowledge Protocol's LEARN operation to create an independent knowledge note
    • LINK: trigger the LINK operation, using [[wikilinks]] to establish associations with existing knowledge
  4. Present the summary organization plan to the user: each clipping → which knowledge points were extracted → which domain it is assigned to
  5. Execute after the user confirms the organization plan(follow AGENTS.md's _AgentSpace autonomous management permissions): create knowledge notes, use obsidian vault=MyObsidian move file="剪切名" to="31_WebClips/_Archive/剪切名.md" to archive the original text (automatically update wikilinks references)

_AgentSpace/ Maintenance strategy:

No separate audit process is set up; maintenance is distributed across daily operations:

  • Autonomy at write time: each time LEARN/UPDATE is performed, check the same domain's _AgentSpace/ for duplicate or mergeable notes, and handle them along the way
  • Trigger by domain: when the user says "organize XX domain knowledge", audit that domain's _AgentSpace/(deduplicate, clean up outdated content, optimize classification)
  • Included with WebClips organization: when organizing WebClips and writing to the target _AgentSpace/ , naturally review the existing content quality of that domain

Knowledge Retriever

When the user asks a question or needs to find information:

  1. Prioritize searching the vault (including _AgentSpace/ directory):obsidian vault=MyObsidian search query="关键词"
  2. Perform precise search against the knowledge base (global results may be numerous; precise search ensures professional knowledge is not drowned out):obsidian vault=MyObsidian search query="关键词 path:_AgentSpace"
  3. Cite existing notes in the answer (e.g., "see [[note name]]")
  4. If the search returns empty results or insufficient content:
    • Inform the user that "no related notes were found in the vault"
    • Delegate to the search-and-fetch skill to conduct external search to supplement the answer
    • May suggest saving the search results as a new note (trigger Note Creator) or appending them to the daily note (trigger Daily Notes Collaborator)

Note Editor

When the user requestsmodification, supplementation, or updating of an existing ordinary note(not a daily note):

  1. obsidian vault=MyObsidian read file="笔记名" Read the current content
  2. Confirm the operation type and execute:
    • section-level modification/insertion → Follow the Section Editing Protocol
    • append at the end → obsidian vault=MyObsidian append file="笔记名" content="..."
    • frontmatter property modification → obsidian vault=MyObsidian property:set name="字段" value="值" file="笔记名"
  3. If editing a _AgentSpace/ note, follow the Knowledge Protocol's UPDATE operation (update the updated field)
  4. After the operation is complete, inform the user of exactly what was changed

Note Creator

When the user asks torecord, summarize, or organize informationinto a new note:

  1. Determine which directory the note should go in based on the directory semantics in AGENTS.md
  2. Follow the frontmatter specification, additionally add the source: ai-generated field
  3. Use [[wikilinks]] to link to related notes already in the vault
  4. If the target is the _AgentSpace/ directory, additionally add managed-by: agent to the frontmatter
  5. If unsure about the directory, place it in 00_Inbox/ and inform the user

Skill Delegation

When to delegate

Requirement Handling
Create, read, update, delete of ordinary notes Use obsidian CLI directly, no delegation needed
Web search and content extraction/analysis Delegate to search-and-fetch skill
Create complex structured documents (with templates, specific specifications) Delegate to obsidian-markdown skill
Create .base database views Delegate to obsidian-bases skill
Create .canvas visual canvases Delegate to json-canvas skill
Write structured content such as technical documentation and proposals Delegate to doc-coauthoring skill
Write internal communications (3P updates, status reports, etc.) Delegate to internal-comms skill

Paths of the above vault skills:$(obsidian vault=MyObsidian info=path)/.agents/skills/。

Skill priority explanation

obsidian-knowledge(this file) is themain specification, defining all roles, workflows, and decision logic. For CLI command details, refer to this skill's references/obsidian-cli.md。

Privacy Boundaries

These are hard boundaries that must not be violated:

  • Do not read/modifynotes tagged with #Private or #Key note for the tag
  • Do not operate on 30_Permanent/MyConfig/ sensitive configurations in
  • Do not operate on 99_Plugconfig/ plugin configurations in
  • When encountering the above content, inform the user that you cannot access it and explain why