Obsidian Attachment Cleaner for Openclaw

A specialized automation tool to automatically organize loose files and images in your Obsidian vault root into a dedicated attachments directory.

sparkingskin-tech
v1.0.0
Feb 12, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install obsidian-cleaner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install obsidian-cleaner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Obsidian Attachment Cleaner?

The Obsidian Attachment Cleaner is a utility designed to solve the common messy vault root problem in Obsidian. As you paste images or download files into your notes, they often land in the root directory by default. This Openclaw Skills tool scans your vault root for specific file types—including images, PDFs, and documents—and moves them into a structured directory.

By automating this cleanup process, users can maintain a clean file structure without manual effort. The skill is built with safety in mind, ensuring no files are deleted and no existing files are overwritten, making it an essential addition to any power user's Openclaw Skills collection.

Obsidian Attachment Cleaner Use Cases

  • Cleaning up a cluttered vault root after a long research or clipping session.
  • Standardizing the location of attachments across a shared vault for consistent file paths.
  • Running a periodic maintenance routine to keep root folders organized.
  • Previewing file movements before execution using the dry-run mode to ensure accuracy.

How Obsidian Attachment Cleaner Works

  1. Scans the specified Obsidian vault root for files with extensions like .png, .jpg, .webp, .pdf, and .docx.
  2. Verifies the existence of the target attachments folder (usually 'Attachments/') and creates it if it is missing.
  3. Iterates through the discovered loose files and moves them into the designated folder.
  4. Provides a comprehensive report summarizing the files moved and flagging any conflicts.

Obsidian Attachment Cleaner Setup

To get started with this skill, ensure you have Python installed and access to your Obsidian vault path.

# Run the cleaner using default paths
python obsidian_cleaner.py

# Perform a dry run to see what would happen
python obsidian_cleaner.py --dry-run

# Specify a custom vault and attachment folder path
python obsidian_cleaner.py --vault /path/to/vault --attachments "Media"

Obsidian Attachment Cleaner Data Schema & Taxonomy

The skill operates directly on the filesystem of your Obsidian vault. It recognizes specific file extensions and organizes them into the metadata structure below:

Data Type Supported Extensions
Images .png, .jpg, .jpeg, .gif, .webp
Documents .pdf, .docx

Files are moved from the vault root to the specified attachments folder (default: Attachments/).

Obsidian Attachment Cleaner Advanced Features

  • Dry Run Support: Preview all file operations without making any changes to the filesystem.
  • Custom Directory Target: Override the default folder name via CLI arguments for specialized vault structures.
  • Conflict Prevention: Intelligent skipping of files if a name collision occurs in the destination folder to prevent data loss.
  • Silent Integration: Can be triggered as part of a daily routine or Openclaw Skills workflow using natural language commands like "clean attachments".

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*