SuperAPI AI Directory

obsidian-organize

General & other

View repository

Updated 10-16 01:31

About this skill

Obsidian Knowledge Base Organization Skill

Overview

This Skill defines the Obsidian knowledge base folder organization standard operating procedure, with the goal of streamlining a messy directory structure into 7-10 top-level categories.

Core Principles

  1. 7±2 Principle - Keep top-level folders to 5-9 (optimal cognitive load)
  2. MECE Principle - Categories are mutually exclusive and collectively exhaustive, avoiding overlap
  3. Progressive - Preserve traces of the original structure for easy backtracking
  4. Safety First - Confirm before merging, back up before deleting

Standard Classification System (Recommended)

Category Naming Included Content
Inbox _Inbox Uncategorized notes, temporary files, content to be processed
Attachments _attachments Media files such as images, PDFs, audio
Journal Journal Diary, weekly journal, monthly review, annual summary
Reading Reading Book notes, article excerpts, podcast records
Work Work Work projects, meeting minutes, team sharing
Technology Tech Technical notes, code snippets, tool configurations
People People Person profiles, social relationships, contact information
Projects Projects Personal projects, side businesses, startup ideas
Growth Growth Cognitive improvement, learning plans, skill development

Note:_ The prefix places system folders at the very front

Standard Operating Procedure (SOP)

Phase 1: Analyze the Current State

  1. Locate the Obsidian Vault path (usually in ~/Documents/Obsidian Vault/)
  2. Count the number and names of existing top-level folders
  3. Count the number of files in each folder
  4. Identify duplicate/similar/mergeable categories
# 查看目录结构
ls -la "/path/to/Obsidian Vault/"

# 统计各文件夹文件数
for dir in "/path/to/Obsidian Vault/"*/; do
  echo "$(basename "$dir"): $(find "$dir" -type f | wc -l) files"
done

Phase 2: Develop an Organization Plan

Based on the existing folders, develop a merge mapping table:

| 原文件夹 | 目标分类 | 操作 |
|---------|---------|------|
| 日记/ | Journal | 合并 |
| 当日日记/ | Journal | 合并 |
| books/ | Reading | 合并 |
| 读书/ | Reading | 合并 |
| QAL分享/ | Work | 合并 |
| 临时文件/ | _Inbox | 合并 |

Phase 3: Execute the Merge

Merge Operation Template(using cp + rm is safer):

# 1. 创建目标目录(如不存在)
mkdir -p "/path/to/Obsidian Vault/TargetFolder"

# 2. 复制源文件夹内容到目标
cp -r "/path/to/Obsidian Vault/SourceFolder/"* "/path/to/Obsidian Vault/TargetFolder/"

# 3. 确认复制成功后删除源文件夹
rm -rf "/path/to/Obsidian Vault/SourceFolder"

Batch Merge Example:

VAULT="/Users/xxx/Documents/Obsidian Vault"

# 合并日记类
mkdir -p "$VAULT/Journal"
cp -r "$VAULT/日记/"* "$VAULT/Journal/" 2>/dev/null
cp -r "$VAULT/当日日记/"* "$VAULT/Journal/" 2>/dev/null
rm -rf "$VAULT/日记" "$VAULT/当日日记"

# 合并阅读类
mkdir -p "$VAULT/Reading"
cp -r "$VAULT/books/"* "$VAULT/Reading/" 2>/dev/null
cp -r "$VAULT/读书/"* "$VAULT/Reading/" 2>/dev/null
rm -rf "$VAULT/books" "$VAULT/读书"

Phase 4: Verify the Results

  1. Check whether the number of top-level folders is ≤ 10
  2. Confirm that no empty folders remain
  3. Spot-check whether files are complete after merging
  4. Update the Obsidian index (restart Obsidian or refresh)
# 统计最终结构
ls -d "$VAULT"/*/ | wc -l

# 查找空目录
find "$VAULT" -type d -empty

Handling Common Issues

Path contains spaces

# 错误
cd /path/Obsidian Vault  # 会失败

# 正确
cd "/path/Obsidian Vault"

Folder names contain special characters

# 文件夹名以空格开头(如 " books")
rm -rf "/path/ books"  # 包含空格

rmdir fails (directory not empty)

# 使用 rm -rf 替代 rmdir
rm -rf "/path/to/folder"

File conflicts during merging

# 使用 -n 避免覆盖
cp -rn source/* dest/

# 或使用 rsync 更精细控制
rsync -av --ignore-existing source/ dest/

Before and After Organization Example

Before Organization (20+ folders):

APP.ai/
Memory Engineering/
QAL分享/
books/
secondme/
信息熵/
当日日记/
日记/
读书/
鲲鹏会/
...(共 20+ 个)

After Organization (10 folders):

_Inbox/          # 临时文件
_attachments/    # 附件
AI-Engineering/  # AI 技术
Cognitive-Growth/# 认知成长
Journal/         # 日记
People/          # 人物
Reading/         # 阅读
Tech-Foundation/ # 技术基础
Travel-Product/  # 旅行产品
Work-Sharing/    # 工作分享

Usage Examples

Example 1: Quick Organization

用户: 我的 Obsidian 太乱了,帮我整理一下

Claude:
1. [定位 Vault 路径]
2. [统计现有文件夹]
3. [制定合并计划]
4. [用户确认后执行]
5. [验证结果]

Example 2: Specify Target Count

用户: 把我的 Obsidian 整理到 7 个分类以内

Claude:
1. [分析现有结构]
2. [设计 7 分类方案]
3. [展示合并映射表]
4. [执行并验证]

Precautions

  1. Backup First - Before large-scale organization, it is recommended to back up the entire Vault
  2. Execute Progressively - Merge one category at a time, and continue only after confirming there are no issues
  3. Keep indexes - Do not delete .obsidian/ configuration directories
  4. Update links - After merging, check whether bidirectional links need to be updated (Obsidian usually handles this automatically)

Related Resources

  • Obsidian official documentation:https://help.obsidian.md/
  • PARA methodology: Projects, Areas, Resources, Archives
  • Johnny Decimal system: a digital classification method