← Back to Skills Marketplace
sparkingskin-tech

Obsidian Cleaner

by sparkingskin-tech · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
816
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install obsidian-cleaner
Description
Automatically clean up loose images and attachments in Obsidian vault root, moving them to the Attachments folder. Trigger when user says "clean obsidian", "clean attachments", or "整理附件".
README (SKILL.md)

Obsidian Attachment Cleaner

A skill that automatically finds and moves loose images/attachments from your Obsidian vault root to the designated Attachments folder.

When to Use

Trigger when user says:

  • "Clean Obsidian"
  • "Clean attachments"
  • "整理附件"
  • "Move images to attachments"
  • "Obsidian 清理"

Features

  • Auto-discovery: Finds loose files (.png, .jpg, .gif, .jpeg, .webp, .pdf, .docx)
  • Safe move: Moves files to Attachments/ folder (creates if not exists)
  • Dry run: Preview what will be moved before executing
  • Detailed report: Shows exactly what was moved and where

Usage

Quick Clean (Auto-detect)

python obsidian_cleaner.py

Dry Run (Preview Only)

python obsidian_cleaner.py --dry-run

Specify Vault Path

python obsidian_cleaner.py --vault /path/to/Obsidian/Vault

Custom Attachments Folder

python obsidian_cleaner.py --attachments "My Attachments"

How It Works

  1. Scans Obsidian vault root for loose attachment files
  2. Checks if Attachments folder exists (creates if missing)
  3. Moves each file to the Attachments folder
  4. Reports what was moved and any errors

Configuration

Default vault path: ~/Documents/Obsidian Vault

Default attachments folder: Attachments/

Example Output

🔍 Scanning /Users/skin/Documents/Obsidian Vault for loose attachments...

📁 Found 3 files:
  ├── screenshot_20240101.png
  ├── photo.jpg
  └── diagram.gif

📦 Moving to Attachments/...

✅ Success!
  ├── screenshot_20240101.png → Attachments/screenshot_20240101.png
  ├── photo.jpg → Attachments/photo.jpg
  └── diagram.gif → Attachments/diagram.gif

🎉 3 files moved. Vault is now clean!

Integration

Add to your HEARTBEAT.md or daily routine:

## Daily Obsidian Cleanup (Optional)

If you notice loose images in your vault root, run:
- "Clean Obsidian" - Automatically organize attachments

Notes

  • Only moves files, doesn't delete anything
  • Won't overwrite existing files (skips with warning)
  • Case-insensitive file extension matching
  • Safe to run multiple times
Usage Guidance
This tool otherwise appears coherent and local-only, but there is a notable mismatch: the SKILL.md examples list image/document extensions, while the script will also treat .md and .txt as attachments and move them from the vault root. Before installing or running: 1) Inspect the Python file yourself (it is included) and confirm the SUPPORTED_EXTENSIONS list is appropriate for your vault; remove .md/.txt if you don't want notes moved. 2) Always run with --dry-run first to review what would be moved. 3) Back up your vault (or run the script on a copy) before any real run. 4) Note the default vault path (~/Documents/Obsidian Vault) — pass --vault if your vault is elsewhere. If you want further help, I can produce a patched version that excludes .md/.txt or add additional safety checks (e.g., only move image mime types or prompt for each file).
Capability Analysis
Type: OpenClaw Skill Name: obsidian-cleaner Version: 1.0.0 The OpenClaw skill 'obsidian-cleaner' is benign. The `SKILL.md` provides clear, non-malicious instructions for an AI agent to organize files within an Obsidian vault. The `obsidian_cleaner.py` script uses standard Python libraries (`os`, `shutil`, `argparse`) to find and move specified file types (`.png`, `.pdf`, `.md`, etc.) from the vault root to a designated 'Attachments' folder. It handles file collisions safely by renaming with a timestamp or skipping, and operates strictly within the user's specified or default vault path. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent. All operations are consistent with the stated purpose of cleaning up a user's Obsidian vault.
Capability Assessment
Purpose & Capability
Name, description, SKILL.md, and the Python script all agree the tool scans an Obsidian vault root and moves loose attachment files into an Attachments folder. The code is consistent with that stated purpose and requires no external credentials, network access, or install steps. However, the code's supported-extension set is broader than the SKILL.md example list (code includes .md and .txt and .doc), which is a surprising capability for an 'attachments cleaner'.
Instruction Scope
SKILL.md describes scanning and moving images and attachments and documents .png/.jpg/.gif/.jpeg/.webp/.pdf/.docx, but the actual script also considers .md, .txt and .doc as supported extensions and will move those files from the vault root. Moving .md files could relocate actual notes, which is a high-impact side effect users likely do not expect. The instructions do provide a --dry-run option, but the doc omission of .md/.txt is an instruction–implementation mismatch that could cause data movement the user didn't anticipate.
Install Mechanism
There is no install spec or network/downloads; this is an instruction-only skill with a bundled Python script. That minimizes supply-chain risk. The script uses only standard library modules (os, shutil, argparse, pathlib, datetime).
Credentials
The skill requests no environment variables, credentials, or config paths. It operates on a user-specified filesystem path (default: ~/Documents/Obsidian Vault), which is appropriate for its purpose.
Persistence & Privilege
The skill is not set to always:true and does not request persistent system-wide privileges or modify other skills. It runs locally when invoked and prints reports; no autonomous or persistent behavior beyond normal invocation.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install obsidian-cleaner
  3. After installation, invoke the skill by name or use /obsidian-cleaner
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Automatically clean loose images and attachments in Obsidian vault root
Metadata
Slug obsidian-cleaner
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Obsidian Cleaner?

Automatically clean up loose images and attachments in Obsidian vault root, moving them to the Attachments folder. Trigger when user says "clean obsidian", "clean attachments", or "整理附件". It is an AI Agent Skill for Claude Code / OpenClaw, with 816 downloads so far.

How do I install Obsidian Cleaner?

Run "/install obsidian-cleaner" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Obsidian Cleaner free?

Yes, Obsidian Cleaner is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Obsidian Cleaner support?

Obsidian Cleaner is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Obsidian Cleaner?

It is built and maintained by sparkingskin-tech (@sparkingskin-tech); the current version is v1.0.0.

💬 Comments