SuperAPI AI Directory

obsidian-note-workflow

Office & productivity

View repository

Updated 10-15 23:41

About this skill

Obsidian Note Workflow

Overview

General-purpose Obsidian note intelligent management system: preview first → intelligent classification → automatic creation → query management → vault initialization.

Core Principles:

  • Speed first: Automatically classify certain content; only preview when uncertain
  • Minimal preview: Show only directory + reason + candidate filenames, do not show tag options
  • Update first: Detect similar files, prefer updating over creating
  • Two-stage loading: Preview reads classification rules; after confirmation, read tag rules
  • Smart tags: Prefer matching existing tags; after creating new tags, update the rules
  • History traceability: Every operation is recorded to history.md, supports querying
  • Delayed generation: Generate tags and metadata only after confirmation
  • Metadata separation: Classification, tags, naming conventions, and history records are stored separately
  • Record user content as-is, do not proactively expand
  • No configuration file needed, intelligent analysis

Intelligent inference: By analyzing existing directories and files, automatically identify classification rules, naming conventions, and tag systems.

When to Use

digraph when_to_use {
    "用户提供内容" [shape=diamond];
    "用户查询笔记" [shape=diamond];
    "用户管理笔记" [shape=diamond];
    "初始化笔记库" [shape=diamond];

    "创建模式" [shape=box];
    "查询模式" [shape=box];
    "管理模式" [shape=box];
    "初始化模式" [shape=box];

    "用户提供内容" -> "创建模式";
    "用户查询笔记" -> "查询模式";
    "用户管理笔记" -> "管理模式";
    "初始化笔记库" -> "初始化模式";
}

Use Cases:

  • The user provides content such as meetings, ideas, to-dos, etc. that needs to be turned into notes
  • The user queries documents related to to-dos, tags, or projects
  • The user marks items as complete or organizes notes in batches
  • The user initializes an existing note vault, generating classification rules and tag rules

Mode 0: Initialize Vault (Initialization Mode) ⭐

Initialization Command

Triggered when the user says "initialize my note vault" or "generate classification rules":

digraph init_flow {
    "扫描目录结构" -> "分析文件命名模式";
    "分析文件命名模式" -> "提取常用标签";
    "提取常用标签" -> "推断分类规则";
    "推断分类规则" -> "生成 _metadata_/ 元数据文件";
    "生成 _metadata_/ 元数据文件" -> "总结笔记库结构";
}

Step 1: Scan directory structure

Use the Bash tool to scan:

# 查找所有一级目录
find . -maxdepth 1 -type d | grep -v "^\./\." | sort

# 查找所有二级目录
find . -maxdepth 2 -type d | grep -v "^\./\." | sort

# 统计每个目录的文件数量
for dir in */; do echo "$dir: $(find "$dir" -type f -name "*.md" | wc -l) files"; done

Step 2: Analyze file naming patterns

Extract naming rules:

# 查看每个目录的文件命名模式
find ./00实时会议记录 -name "*.md" -type f | head -10
find ./01临时 -name "*.md" -type f | head -10

Identify patterns:

  • Date prefix:YYYY-MM-DD-*
  • Client prefix:客户名-*
  • Type suffix:*-会议.md

Step 3: Extract commonly used tags

Extract from frontmatter:

# 提取所有 tags 字段
grep -r "^tags:" --include="*.md" -A 5 | sort | uniq -c

# 统计标签使用频率
grep -rh "^tags:" --include="*.md" -A 5 | grep "^  -" | sort | uniq -c | sort -rn

Step 4: Infer classification rules

Infer based on directory names and file contents:

Directory name Inferred purpose Typical file patterns
meetings/ 会议/ 00实时会议记录/ Meeting minutes YYYY-MM-DD-*.md
temp/ 临时/ 01临时/ Temporary notes 临时-*.md *.md
work/ 工作/ 03工作/ Work scripts *.sh *.js 脚本-*
clients/ 客户/ 04客户/ Client documents 客户名-*.md

Step 5: Generate metadata files

In _metadata_/ generate multiple metadata files in the directory:

_metadata_/classification-rules.md(Classification rules - lightweight)

Purpose: Quickly determine classification during the preview stage; the file is small and loads quickly Content:

  • Purpose description for each directory
  • Keyword matching rules
  • Confidence judgment criteria

_metadata_/tag-rules.md(Tag rules - heavyweight)

Purpose: Generate tags after confirmation; the file can be very large Content:

  • Complete tag system
  • Tag inference rules
  • Tag usage frequency statistics

_metadata_/naming-conventions.md(Naming conventions)

Purpose: Generate filenames after confirmation Content:

  • Naming conventions for various types of documents
  • Existing File Naming Examples
  • Best Practice Recommendations

_metadata_/history.md(Operation History) ⭐

Purpose: Record all operation history, support queries Content:

  • Operation records sorted in reverse chronological order
  • Timestamp, type, file, and overview of each operation
  • Support queries by count, time, type, and content
  • Continuously appended, never deleted

Step 6: Summarize the note repository structure

Generate report:

🔍 笔记库分析报告
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 基本信息
- 总目录数: X 个
- 总文件数: Y 个
- 分析时间: YYYY-MM-DD

📂 目录结构
[一级目录列表,包含文件数统计]

🏷️ 标签体系
[按频率排序的常用标签]

📝 命名规范
[检测到的命名模式]

✅ 已完成
- 创建了 _metadata_/ 元数据文件夹
- 生成了分类规则文件(轻量,预览用)
- 生成了标签规则文件(重量,确认后用)
- 生成了命名规范文件
- 创建了操作历史文件(空文件,后续追加)

💡 后续使用
AI 将使用分离的元数据文件来加速预览和分类。

Initialize metadata files

Create _metadata_/ folder, and generate multiple metadata files:

1. _metadata_/classification-rules.md(Classification Rules)

# 分类规则 - 用于预览阶段快速判断

**最后更新**: YYYY-MM-DD
**用途**: 轻量级分类规则,用于快速预览

## 目录分类规则

### 00实时会议记录/
- **用途**: 实时会议工作区
- **关键词**: 会议、录音、问答
- **置信度**: 90%(会议关键词)
- **典型文件**: 会议录音.md, 问答记录.md

### 01临时/
- **用途**: 临时笔记、快速想法
- **关键词**: 临时、测试、想法
- **置信度**: 90%(临时关键词)
- **典型文件**: 临时-*.md, 测试*.md

### 02提示词/
- **用途**: AI 工具提示词和配置
- **关键词**: 提示词、prompt、session
- **置信度**: 95%(明确类型)
- **典型文件**: *提示词.md

### 03工作/
- **用途**: 工作脚本、技术文档
- **关键词**: 脚本、插件、参数
- **置信度**: 90%(脚本关键词)
- **典型文件**: *脚本.md, *参数.md

### 04客户/
- **用途**: 客户项目文档
- **关键词**: 华为、OPPO、小天才、电信、飞速
- **置信度**: 95%(明确客户名)
- **典型文件**: [客户名]-*.md

## 置信度判断标准

- 95%: 明确客户名、明确类型(提示词、脚本)
- 90%: 明确关键词(临时、测试、会议)
- <90%: 需要预览确认

2. _metadata_/tag-rules.md(Tag Rules)

# 标签规则 - 用于确认后生成标签

**最后更新**: YYYY-MM-DD
**用途**: 完整标签体系和推断规则

## 标签分类

### 内容类型标签
- `#会议纪要` - 检测"会议"、"讨论" → 添加
- `#提示词` - 检测"提示词"、"prompt" → 添加
- `#脚本` - 检测"脚本"、"代码"、"函数" → 添加
- `#想法` - 检测"想法"、"突然想到" → 添加
- `#方案` - 检测"方案"、"解决" → 添加

### 状态标签
- `#进行中` - 正在进行的工作
- `#已完成` - 已完成的事项
- `#待验证` - 需要验证的内容

### 客户标签
- `#华为` - 检测"华为" → 添加
- `#OPPO` - 检测"OPPO"、"oppo" → 添加
- `#小天才` - 检测"小天才" → 添加
- `#电信` - 检测"电信" → 添加
- `#飞速` - 检测"飞速" → 添加

### 技术标签
- `#AI` - 检测"AI"、"智能" → 添加
- `#工具` - 检测"工具"、"软件" → 添加
- `#工作流` - 检测"工作流"、"流程" → 添加

## 标签组合规则

**会议记录**: `#会议纪要` + `#[客户名]`
**提示词**: `#提示词` + `#AI` + `#工具`
**脚本**: `#脚本` + `#工具`
**临时笔记**: `#想法`(仅此一个)
**客户方案**: `#方案` + `#[客户名]` + `#AI`

3. _metadata_/naming-conventions.md(Naming Conventions)

# 命名规范 - 用于确认后生成文件名

**最后更新**: YYYY-MM-DD
**用途**: 文件命名规范和示例

## 各类文档命名规范

### 会议记录
**格式**: `YYYY-MM-DD-[客户]-会议类型.md`
**示例**: `2026-02-08-华为-AI平台讨论会议.md`

### 技术方案
**格式**: `[客户]-方案名称.md`
**示例**: `华为-AI平台升级方案.md`

### 提示词文档
**格式**: `[工具名称]-提示词-功能.md`
**示例**: `claudecode-提示词-会议记录.md`

### 脚本文档
**格式**: `[功能描述]-脚本.md`
**示例**: `自动分类-脚本.md`

### 临时笔记
**格式**: `临时-[主题]-YYYY-MM-DD.md`
**示例**: `临时-想法-20260208.md`

## 文件名规范
- ✅ 使用中英文、数字、连字符
- ❌ 不使用空格、特殊字符
- ✅ 日期格式: YYYY-MM-DD
- ✅ 客户名使用缓存中的标准名称

4. _metadata_/history.md(Operation History)

# 操作历史

**创建时间**: YYYY-MM-DD
**用途**: 记录所有创建和更新操作

---

## [YYYY-MM-DD HH:mm:ss]
**操作**: 初始化
**文件**: _metadata_/history.md
**概览**: 初始化笔记库,创建元数据文件

---
(后续操作将按时间倒序追加到此文件)

Mode 1: Create Workflow (Creation Mode) ⚡

Quick creation process

digraph create_flow {
    rankdir=LR;
    node [shape=box, style=rounded];

    "1. 读取分类规则(轻量)" -> "2. 内容识别 + 置信度判断";
    "2. 内容识别 + 置信度判断" -> "高置信度?";
    "高置信度?" -> "是" -> "读取标签规则(重量) + 创建";
    "高置信度?" -> "否" -> "3. 极简预览";

    "3. 极简预览" -> "4. 用户确认";
    "4. 用户确认" -> "读取标签规则(重量) + 创建";
}

Step 1: Read lightweight metadata (preview stage)

Read two lightweight files(quick preview):

  1. Check whether _metadata_/classification-rules.md exists
  2. Check whether _metadata_/naming-conventions.md exists
  3. If it does not exist, automatically run the initialization process
  4. Read content:
    • classification-rules.md: directory classification rules, keywords, confidence
    • naming-conventions.md: naming conventions (used to generate candidate file names)
  5. Do not read for now tag-rules.md(heavyweight files, read after confirmation)

Step 2: Content recognition + confidence assessment + file matching

Based on cached classification rules, recognize content and assess confidence.

Perform file matching at the same time(prioritize updating existing files):

  • Search the target directory for similar files
  • Similarity assessment: title similarity, content similarity, date matching
  • If a similar file is found (≥70% similarity), recommend updating
  • If no similar file is found, recommend creating a new file

High confidence automatic creation(≥90%):

Match Pattern Target Directory Confidence
Clear client name + meeting 04客户/[客户]/会议/ 95%
Contains "prompt" 02提示词/ 95%
Contains "script", "function" 03工作/ 90%
Contains "temporary", "test" 01临时/ 90%

Low confidence requires preview(<90%):

  • New client name (unsure whether to create a subdirectory)
  • Cross-category content (matches multiple directories at the same time)
  • Content too short (fewer than 10 characters)
  • No obvious features (no keyword match)

Important Principles:

  • ⚠️ Record user content as-is; do not proactively expand
  • ⚠️ Only organize the format; do not add extra content
  • ⚠️ If content needs to be supplemented, user consent must be obtained first

Step 3: Smart preview (create vs update)

Prioritize updating existing files:

  • Search the target directory and check whether there are similar files
  • Similarity assessment: title similarity, content topic, date matching
  • Similar file found (≥70%) → recommend update
  • No similar file → recommend creation

Preview Format:

📂 归类建议
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

检测到相似文件: [是/否]

【方案1 - 更新现有】
文件: 04客户/华为/CodeBuddy工具优势.md
相似度: 85%
理由: 标题相似,内容主题匹配

【方案2 - 创建新文件】
文件名选项:
  1. CodeBuddy工具对比分析.md
  2. CodeBuddy功能特点.md
  3. AI工具-CodeBuddy优势.md

理由:
  • 包含工具功能对比分析
  • 匹配客户文档特征

请选择:
[u] 更新现有文件  [c] 创建新文件(选择1-3)  [n] 修改目录

Notes:

  • ✅ Prioritize recommending updates to existing files (avoid fragmentation)
  • ✅ Display 3 candidate file names for selection
  • ✅ Similarity judgment is based on title and content
  • ✅ Tag processing starts only after user confirmation

Step 4: Two-stage metadata generation + smart tags

Stage 1: After user confirmation (or automatically triggered with high confidence)

  1. Read tag rules(loaded in stage 2):

    • Read _metadata_/tag-rules.md
    • Read _metadata_/naming-conventions.md
    • Load these files only after confirmation(speed up preview!)
  2. Automatically generate frontmatter:

    ---
    title: [自动提取标题]
    date: [今天日期]
    tags:
      - [基于 tag-rules.md 推断3-5个标签]
    status: completed
    ---
    
  3. Smart tag generation(prioritize matching existing tags):

    Step 1: Read existing tags

    • From _metadata_/tag-rules.md read all existing tags
    • Analyze content and extract keywords

    Step 2: Match existing tags(prioritized)

    • Content keywords match existing tags
    • Customer name match → #客户名
    • Content type match → #会议纪要、#提示词、#脚本 etc.
    • Tech stack match → #AI、#工具 etc.

    Step 3: Create new tags(only when no match can be found)

    • If existing tags cannot satisfy the requirement (fewer than 3), create new tags
    • New tag naming rules:
      • Concise and clear (2-4 characters)
      • Use Chinese or English
      • Avoid duplicate and similar tags
    • Generate 3-10 tags per file
  4. Call obsidian-markdown skill to create or update notes

Step 5: Dynamically update metadata files + record history

Intelligently maintain the metadata system(ensure subsequent classification accuracy) + Record operation history:

  1. Detect metadata that needs updating

    • Was a new tag created?
    • Was a new directory created?
    • Was a new naming pattern discovered?
  2. Update tag-rules.md(if a new tag was created)

    • Add the new tag to the corresponding category
    • Record the inference rule for the new tag
    • Example:
      ## 内容类型标签
      - `#新标签` - 检测"关键词" → 添加
      
  3. Update classification-rules.md(if a new directory was created)

    • Add the new directory to the classification rules
    • Record the directory's purpose, keywords, and confidence
    • Example:
      ### 05新客户/
      - **用途**: 新客户项目文档
      - **关键词**: [客户名]
      - **置信度**: 95%(明确客户名)
      - **典型文件**: [客户名]-*.md
      
  4. Update naming-conventions.md(if a new naming pattern was discovered)

    • Record the newly discovered naming pattern
    • Add it to the corresponding document type
    • Example:
      ### 工具对比文档
      **格式**: [工具名]-对比-分析.md
      **示例**: CodeBuddy-对比-分析.md
      **检测时间**: YYYY-MM-DD
      
  5. Cases where no update is needed

    • All tags, directories, and naming patterns already exist
    • Only updating existing file content
  6. Record operation history(record every operation)

    • Append to _metadata_/history.md
    • Record format:
      ## [YYYY-MM-DD HH:mm:ss]
      **操作**: [创建/更新]
      **文件**: [文件路径]
      **概览**: [一句话描述]
      **标签**: [新创建的标签,如有]
      **目录**: [新创建的目录,如有]
      
    • Used for subsequent history queries

Metadata maintenance principles:

  • ✅ Dynamic updates: Automatically maintain metadata when creating new content
  • ✅ Continuous optimization: Each operation may improve classification accuracy
  • ✅ History tracking: All operations are recorded in history.md
  • ✅ No reinitialization required: Metadata stays up to date in real time

Automatically create confidence rules

High-confidence scenarios (direct creation)

✅ Clear customer name: Customer name detected in cache ✅ Clear type: Prompts, scripts, meetings ✅ Clear status: Temporary, test, idea

Low-confidence scenarios (preview required)

⚠️ New customer name: Customer name not present in cache ⚠️ Cross-category: Matches features of multiple directories at the same time ⚠️ Content too short: Fewer than 10 characters ⚠️ Ambiguous content: No clear keywords

Special scenarios

🔧 User-specified directory: If the user says "put it in the XX directory", create directly 🔧 User-specified title: If the user says "the title is XX", use the user-specified title


Mode 2: Query Functions (Query Mode)

Query type

Query type Trigger word examples Implementation method
To-do query "Query all to-dos", "List tasks" Search - [ ] format
Status query "View incomplete ones" Search task + status
Tag query "List notes tagged X" Grep frontmatter tags
Directory query "What documents are under a certain directory" Search a specific directory
Time query "Documents from a certain month" Search filenames by date
Keyword search "Search for content containing a certain word" Grep content
History query "The last 3 creations", "operations in the last 5 hours" Read _metadata_/history.md

History query (new)

Query recent operation records:

  1. Query by count

    • "Content created in the last 3 times"
    • "The last 5 modifications"
    • "The last 10 operations"
    • Implementation: Read from _metadata_/history.md the last N records
  2. Query by time

    • "Content created in the last 5 hours"
    • "Notes created today"
    • "Files modified yesterday"
    • Implementation: Parse the timestamps in history.md and filter records that meet the criteria
  3. Query by type

    • "Recently created customer documents"
    • "Recently updated prompt files"
    • Implementation: Filter by combining history.md and file paths
  4. Query by content

    • "Recent records about Huawei"
    • "Recent notes containing AI"
    • Implementation: search the overview field in history.md

History record format example:

# 操作历史

## [2026-02-08 16:45:30]
**操作**: 创建
**文件**: 04客户/小客户X/会议纪要-20260208.md
**概览**: 小客户X项目启动会议
**标签**: #会议纪要 #小客户X #启动会
**目录**: 04客户/小客户X/

## [2026-02-08 15:20:10]
**操作**: 更新
**文件**: 02提示词/claudecode提示词.md
**概览**: 添加会议记录相关提示词

## [2026-02-08 14:30:25]
**操作**: 创建
**文件**: 04客户/华为/CodeBuddy工具优势.md
**概览**: CodeBuddy工具的功能特点记录
**标签**: #工具 #CodeBuddy

## [2026-02-08 11:15:00]
**操作**: 初始化
**文件**: _metadata_/history.md
**概览**: 初始化笔记库,创建元数据文件

Query example and response:

User asks: "The last 3 created items" AI response:

📋 最近3次创建的内容
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. [2026-02-08 16:45] 小客户X/会议纪要-20260208.md
   小客户X项目启动会议

2. [2026-02-08 14:30] 华为/CodeBuddy工具优势.md
   CodeBuddy工具的功能特点记录

3. [2026-02-07 09:20] OPPO/AI平台升级方案.md
   OPPO智能体平台技术升级方案

User asks: "Operations in the last 5 hours" AI response:

📋 最近5小时的操作(共5条)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. [16:45] 创建 - 小客户X/会议纪要-20260208.md
2. [15:20] 更新 - claudecode提示词.md
3. [14:30] 创建 - 华为/CodeBuddy工具优势.md
4. [13:10] 创建 - 临时-想法-20260208.md
5. [12:05] 更新 - 插件调用参数.md

User asks: "Today's records about Huawei" AI response:

📋 今天关于华为的记录(共2条)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. [14:30] 华为/CodeBuddy工具优势.md
   CodeBuddy工具的功能特点记录

2. [10:15] 华为/AI平台讨论会议.md
   华为AI平台技术讨论会议纪要

Mode 3: Management (Management mode)

To-do status management

  • Mark complete:- [ ] → - [x]
  • Batch operations: query → select → update
  • Update frontmatter status field

Batch organize

  • Organize temporary directories
  • Archive completed projects
  • Unify tag format

Intelligent Directory Matching (Intelligent directory matching)

Matching logic

digraph matching {
    "读取分类规则" -> "分析内容特征";
    "分析内容特征" -> "匹配现有目录";

    "匹配现有目录" -> "是否匹配?";
    "是否匹配?" -> "是" -> "使用现有目录";
    "是否匹配?" -> "否" -> "建议新目录";

    "建议新目录" -> "用户确认";
    "用户确认" -> "创建新目录";
}

Intelligent inference

Infer new directories based on existing directory patterns:

  • Client name detected → create a directory similar to clients/[客户]/ directory
  • New type detected → ask the user or infer based on similar directories

Metadata file structure (_metadata_/)

file separation design + dynamic maintenance

Design goal: fast preview! staged metadata loading + dynamic maintenance ensures accuracy + history traceability

File Size Loading timing Primary use When to update When to query
_metadata_/classification-rules.md Small Preview stage Quickly determine classification When creating a new directory -
_metadata_/naming-conventions.md Medium Preview stage Generate candidate file names When a new naming pattern is discovered -
_metadata_/tag-rules.md Large After confirmation Generate tags When creating new tags -
_metadata_/history.md Incremental growth When querying Trace operation history After each operation When querying history

Two-stage loading + history records

预览阶段:
  ↓
读取 classification-rules.md + naming-conventions.md(轻量)
  ↓
快速显示分类建议 + 候选文件名

用户确认后:
  ↓
读取 tag-rules.md(重量)
  ↓
生成完整元数据(标签)
  ↓
创建/更新笔记

动态维护:
  ↓
检测新标签、新目录、新命名模式
  ↓
自动更新对应的元数据文件
  ↓
追加操作历史到 history.md

历史查询:
  ↓
读取 history.md
  ↓
筛选符合条件的记录(次数/时间/类型/内容)

Metadata file description

classification-rules.md(read during the preview stage + dynamically updated)

  • Purpose: quickly determine classification and directory matching
  • Read timing: preview stage (first)
  • Update timing: when creating a new directory
  • Contents included:
    • Directory purpose, keyword matching
    • Confidence standard
    • Typical file example

naming-conventions.md(read during the preview stage + dynamically updated)

  • Purpose: generate candidate file names (3 options)
  • Read timing: preview stage (second)
  • Update timing: when a new naming pattern is discovered
  • Contents included:
    • Naming conventions for various document types
    • Existing file examples
    • Best practices

tag-rules.md(read after confirmation + dynamically updated)

  • Purpose: generate 3-10 tags
  • Read timing: after user confirmation (weight file)
  • Update timing: when creating a new tag
  • Included content:
    • Complete tag system (can be very large)
    • Tag inference rules
    • Tag combination rules

history.md(read at query time + appended on each operation)

  • Purpose: trace operation history, query historical records
  • Read timing: when querying history
  • Update timing: appended after each note creation/update
  • Included content:
    • Operation timestamp
    • Operation type (create/update)
    • File path
    • One-sentence overview
    • New tag (if any)
    • New directory (if any)
  • Query dimensions:
    • By count: most recent N operations
    • By time: most recent N hours/days
    • By type: create/update
    • By content: keyword search overview

Dynamic maintenance examples

Scenario 1: Create a new customer directory

用户输入: 小客户X的会议记录
  ↓
检测到新客户名(不在 classification-rules.md 中)
  ↓
创建目录: 04客户/小客户X/
  ↓
更新 classification-rules.md
  + ### 小客户X/
  +   - **用途**: 小客户X项目文档
  +   - **关键词**: 小客户X
  +   - **置信度**: 95%(明确客户名)

Scenario 2: Discover a new naming pattern

用户输入: CodeBuddy工具对比
  ↓
生成候选文件名时,发现"工具对比"是新类型
  ↓
更新 naming-conventions.md
  + ### 工具对比文档
  +   **格式**: [工具名]-对比-分析.md
  +   **示例**: CodeBuddy-对比-分析.md
  +   **检测时间**: 2026-02-08

Scenario 3: Create a new tag

用户输入: 低代码平台集成方案
  ↓
生成标签时,匹配不到"低代码"相关标签
  ↓
创建新标签: #低代码
  ↓
更新 tag-rules.md
  + ### 技术标签
  +   - `#低代码` - 检测"低代码"、"无代码" → 添加

Reference: Obsidian Standards

Frontmatter format

---
title: 笔记标题
date: 2026-02-07
tags:
  - tag1
  - tag2
status: in-progress
priority: normal
aliases:
  - 备选名称
cssclasses:
  - custom-class
completed: false
due: 2026-02-15T14:30:00
---

Tags format

Inline: #tag1 #tag2 Frontmatter:

tags:
  - tag1
  - tag2

Naming rules:

  • ✅ Letters (any language), numbers (not first character),_、-、/
  • ❌ Spaces, special characters

Task Lists

- [ ] 未完成
- [x] 已完成
- [ ] 带子任务
  - [ ] 子任务1

Wikilinks & Callouts

[[笔记]]
[[笔记|显示文本]]
[[笔记#标题]]

> [!info] 信息
> [!warning] 警告
> [!tip]+ 折叠

Required Dependency

REQUIRED SUB-SKILL: Must call obsidian-markdown for creating and editing notes.

NEVER:

  • Use Write tool directly to create notes
  • Create notes without proper Obsidian formatting
  • Displaying too much preview information affects speed

ALWAYS:

  • High-confidence content is created automatically
  • Only low-confidence content is previewed, and the preview is minimal
  • Two-stage loading: preview reads classification-rules.md, after confirmation reads tag-rules.md
  • Call obsidian-markdown skill for note creation/editing
  • Follow Obsidian Flavored Markdown standards
  • Read _metadata_/classification-rules.md for quick classification judgment

Common Mistakes

Error Consequence Correct approach
Create directly without initialization Cannot classify intelligently Run "Initialize note library" first
Use the Write tool directly Format does not meet the standard Call obsidian-markdown
Skip preview and create directly User cannot confirm Strictly follow the preview process
Proactively expand user content Deviates from user intent Record as-is, do not proactively expand
Use in frontmatter tags # Format error tags: [tag] is not tags: [#tag]
File name contains special characters File system issue Use hyphens instead

Quick Reference

Initialization checklist

  • Run the "Initialize my note library" command
  • Confirm that _metadata_/ folder was created
  • Check the 4 generated metadata files:
    • _metadata_/classification-rules.md(lightweight)
    • _metadata_/tag-rules.md(heavyweight)
    • _metadata_/naming-conventions.md(medium)
    • _metadata_/history.md(initially empty, appended later)
  • Verify whether the inferred classification rules are correct

Note creation checklist

  • Stage 1: read _metadata_/classification-rules.md + naming-conventions.md(Lightweight)
  • Search target directory, detect similar files (prioritize updates)
  • Content recognition + confidence assessment
  • High confidence → create/update directly
  • Low confidence → smart preview:
    • Display similar file detection results
    • Display 3 candidate filenames
    • Provide "Update" or "Create" options
  • Phase 2: After user confirmation, read tag-rules.md
  • Smart tag generation (3-10):
    • Prioritize matching existing tags
    • If no match, create new tags
  • Call obsidian-markdown create or update
  • Phase 3: Dynamically update metadata (if needed):
    • Create new tag? → Update tag-rules.md
    • Create new directory? → Update classification-rules.md
    • Discover new naming pattern? → Update naming-conventions.md
  • Phase 4: Record operation history (record every time):
    • Append to _metadata_/history.md
    • Record time, operation type, file path, overview
    • Record new tags, new directories (if any)

Query operations quick reference

  • To-do: grep -r "^- \[ \]" --include="*.md"
  • Tags: grep -r "tags:" --include="*.md" -A 3
  • Status: grep -r "status: in-progress" --include="*.md"
  • Last 3 operations: head -30 _metadata_/history.md (assuming 10 lines per record)
  • Created today: grep "^## \[$(date +%Y-%m-%d)" _metadata_/history.md
  • Last N hours: parse timestamps then filter

Workflow Summary

Initialization flow

用户: "初始化我的笔记库"
  ↓
扫描目录结构
  ↓
分析文件命名模式
  ↓
提取常用标签
  ↓
推断分类规则
  ↓
生成 _metadata_/ 元数据文件夹
  ├─ classification-rules.md(轻量)
  ├─ tag-rules.md(重量)
  ├─ naming-conventions.md(中等)
  └─ history.md(初始空文件,持续追加)

Creation flow (fast mode + two-stage loading + dynamic maintenance + history recording)

用户输入内容
  ↓
【阶段1】读取 classification-rules.md + naming-conventions.md(轻量)
  ↓
搜索相似文件(优先更新)
  ↓
内容识别 + 置信度判断
  ↓
┌─────────────┐
│ 高置信度?   │
└─────────────┘
  ↓ 是          ↓ 否
自动创建/更新    极简预览
  ↓             ↓
【阶段2】读取    用户确认
tag-rules.md     ↓
  ↓             ↓
生成3-10个标签  【阶段2】读取标签
  ↓             ↓
创建/更新笔记   生成标签
  ↓             ↓
【阶段3】动态    创建/更新
维护元数据      ↓
  ↓          【阶段3】动态
更新3个元数据    维护元数据
(如果需要)     (如果需要)
  ↓             ↓
【阶段4】记录    【阶段4】记录
操作历史        操作历史
  ↓             ↓
追加到          追加到
history.md      history.md

Key design principles:

  1. Fast first: Automatically categorize certain content, preview only uncertain ones
  2. Minimal preview: Display only directory + reason + candidate filenames
  3. Prioritize updates: Detect similar files, avoid fragmentation
  4. Two-stage loading: Preview reads lightweight files, read heavy files after confirmation
  5. Smart tags: Prioritize matching existing tags (3-10)
  6. Dynamic maintenance: Automatically update metadata files (tags/directories/naming rules)
  7. History traceability: Record every operation, support queries
  8. Continuous optimization: Each operation improves subsequent classification accuracy
  9. Metadata separation: Classification, tags, naming conventions, history stored separately
  10. Standard format: Strictly follow Obsidian official specifications
  11. Universal and reusable: Applicable to any Obsidian vault