Obsidian Cleaner — Obsidian 清理er
v1.0.0Automatically 清理 up loose images and attachments in Obsidian vault root, moving them to the Attachments folder. Trigger when user says "清理 obsidian", "清理 attachments", or "整理附件".
运行时依赖
安装命令
点击复制技能文档
Obsidian Attachment 清理er
A 技能 that automatically finds and moves loose images/attachments from your Obsidian vault root to the de签名ated Attachments folder.
When to Use
Trigger when user says:
"清理 Obsidian" "清理 attachments" "整理附件" "Move images to attachments" "Obsidian 清理" Features Auto-discovery: Finds loose files (.png, .jpg, .gif, .jpeg, .网页p, .pdf, .docx) Safe move: Moves files to Attachments/ folder (创建s if not exists) Dry 运行: Preview what will be moved before executing DetAIled 报告: Shows exactly what was moved and where Usage Quick 清理 (Auto-检测) python obsidian_清理er.py
Dry 运行 (Preview Only) python obsidian_清理er.py --dry-运行
Specify Vault Path python obsidian_清理er.py --vault /path/to/Obsidian/Vault
Custom Attachments Folder python obsidian_清理er.py --attachments "My Attachments"
How It Works 扫描s Obsidian vault root for loose attachment files 检查s if Attachments folder exists (创建s if missing) Moves each file to the Attachments folder 报告s what was moved and any errors Configuration
Default vault path: ~/Documents/Obsidian Vault
Default attachments folder: Attachments/
Example 输出 🔍 扫描ning /Users/skin/Documents/Obsidian Vault for loose attachments...
📁 Found 3 files: ├── screenshot_20240101.png ├── photo.jpg └── diagram.gif
📦 Moving to Attachments/...
✅ 成功! ├── screenshot_20240101.png → Attachments/screenshot_20240101.png ├── photo.jpg → Attachments/photo.jpg └── diagram.gif → Attachments/diagram.gif
🎉 3 files moved. Vault is now 清理!
Integration
添加 to your HEARTBEAT.md or dAIly routine:
DAIly Obsidian 清理up (Optional)
If you notice loose images in your vault root, 运行:
- "清理 Obsidian" - Automatically organize attachments
Notes Only moves files, doesn't 删除 anything Won't overwrite existing files (skips with 警告) Case-insensitive file 扩展 matching Safe to 运行 multiple times