From agents
Safe filesystem organization, deduplication, renaming, and cleanup with cloud drive support. Delegates to best-in-class CLI tools. Use for file management. NOT for shell scripts (shell-scripter).
npx claudepluginhub wyattowalsh/agents --plugin agentsThis skill uses the workspace's default tool permissions.
Safe filesystem organization and cleanup. Delegates to best-in-class CLI tools for
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Safe filesystem organization and cleanup. Delegates to best-in-class CLI tools for deduplication, renaming, archiving, and analysis. Cloud drives (iCloud, Google Drive, Dropbox, OneDrive) are first-class citizens with auto-detection and adjusted safety.
Scope: File organization, cleanup, renaming, deduplication, archiving, and analysis. NOT for shell script generation (shell-scripter), CI/CD pipelines (devops-engineer), or database work (database-architect).
| Term | Definition |
|---|---|
| dry-run | Preview via tool's native mode (fclones group, f2 default, organize sim, detox -n) |
| manifest | JSON log at ~/.files-buddy/manifests/ enabling undo and discovery |
| blast radius | Total file count and size affected by an operation |
| protected path | Hard-blocked (system) or escalated-confirmation directory |
| trash | Reversible deletion via gomi / OS trash / .files-buddy-trash/ |
| scope pin | Hard boundary = user-referenced directory only |
| material drift | Filesystem changed >10% between preview and execution |
| batch | Non-overlapping operations; rollback unit |
| intent contract | User-confirmed description (not individual file list) |
| hardlink cluster | Files sharing same inode — NOT duplicates |
| tool delegation | Invoking CLI tool via subprocess; prefer over reimplementation |
| fallback | Python stdlib when CLI tool is not installed |
| evicted file | Cloud placeholder; must materialize before size/hash analysis |
| cloud-safe | Operations adjusted for sync implications |
| conflict copy | Duplicate from sync conflict (e.g., file (1).txt) |
| dashboard | Self-contained HTML visualization opened in browser |
| $ARGUMENTS | Mode | Destructive? |
|---|---|---|
organize <path> | organize | Yes (moves) |
clean <path> | clean | Yes (trash) |
audit <path> | audit | No (read-only) |
rename <path> <pattern> | rename | Yes (renames) |
flatten <path> | flatten | Yes (moves) |
archive <path> | archive | Yes (moves) |
sanitize <path> | sanitize | Yes (renames) |
find <path> <query> | find | No (read-only) |
watch <path> [rules] | watch | Yes (moves) |
undo <manifest> | undo | Yes (restores) |
dashboard [path] | dashboard | No (writes report) |
| Empty or unrecognized | — | Show mode menu |
rm, chmod, chown.references/protected-paths.md as the canonical path list and validation sourceos.path.realpath() before plan gen. Cycles detected (max 40 hops)..git/ always excluded.~/.ssh, ~/.gnupg, ~/.aws, ~/.config, ~/.kube, ~/.local/share/keyrings, any directory containing .env
Require full preview + explicit path naming + warning before any operation.
| Tier | Trigger | Friction |
|---|---|---|
| Low | Rename, move within parent, <10 files | Inline plan, [y/N] |
| Medium | Cross-dir move, 10-100 files, archive | Summary preview, confirmation |
| High | Any trash, recursive, 100+ files, 1 GB+ | Full preview, blast radius, type "yes" |
| Critical | Escalated paths, cloud directories | Full preview + path naming + warning |
AI-initiated ops bias one tier higher. Cloud ops always at least Medium.
Run before every mode:
~/Library/CloudStorage/*, ~/Library/Mobile Documents/com~apple~CloudDocs; tag cloud-synced dirs, adjust behaviorcommand -v fd fclones rmlint f2 dust erd gomi ouch zstd b3sum detox convmv rclone pueue bat watchexec organize 2>/dev/null; report missing, suggest installstat for read/write access).gitignore, warn before moving tracked filesbrctl download for iCloud, access for GDrive stream)Sort files by type, date, project, or custom rules using organize-tool.
references/organization-strategies.mdorganize sim <config> (dry-run) — parse output, present previeworganize run <config> with manifest loggingopen <dest> to verifyshutil.move with manual rule matching if organize-tool not installedRemove duplicates, lint filesystem, trash temp files.
references/duplicate-detection.md. Run fclones group --format json <path> for duplicatesrmlint -o json:<tmpfile> <path> for empty dirs, broken symlinks, orphan filesrclone dedupe --dry-run <remote>:path (Google Drive duplicate filenames)gomi (never rm). Log to manifesthashlib + os.walk for dedup; os.listdir for empty dirsAnalyze disk usage and find issues. Strictly read-only.
dust -j <path> for disk usage summary (JSON output)erd -l -s rsize <path> for directory tree with sizesrmlint -o json:<tmpfile> <path> for lint issues (empty dirs, broken symlinks)rclone size <remote>:path + rclone lsjson (materialize evicted files first)os.stat + os.walk for sizes; pathlib for file listingBatch rename with regex, EXIF, ID3 templates using f2.
references/rename-patterns.md. Construct f2 command from user patternf2 <flags> <path> (dry-run by default) — parse rename table- old-ugly-name_FINAL_v2.pdf
+ 2024-01-project-report.pdf
f2 -x <flags> (execute). Log to manifestf2 -u using f2's native undo supportre.sub + os.rename with collision detectionCollapse nested directories to a single level.
-1, -2, etc.)shutil.move each file. Log to manifestCompress old or unused files.
ouch compress <files> <archive.tar.zst> (or zstd for single files)rclone move <local> <remote>:archive/ for cloud archivingtarfile + gzip from Python stdlibFix filenames: remove special characters, fix encoding, normalize Unicode.
detox -n <path> (dry-run) for character cleanup previewconvmv -f <from> -t utf-8 --nfc <path> for encoding normalization previewdetox <path> and convmv --notest -f <from> -t utf-8 --nfc <path>. Log to manifestre.sub for character cleanup; unicodedata.normalize for NFC/NFDSmart file search with rich output. Strictly read-only.
fd flags: "large PDFs" -> fd -e pdf --size +10m <path>fd command, pipe matches through bat for syntax-highlighted previewrclone lsjson <remote>:path --recursive with --include/--excludeos.walk with fnmatch filteringAuto-organize files on creation using watchexec + organize-tool.
references/organization-strategies.mdwatchexec -e jpg,png,pdf -- organize run <config> (background)~/.files-buddy/watchers.json for persistencewatch start <path>, watch stop <id>, watch list, watch statusReverse a previous operation using manifest records.
manifest-manager.py list — show recent operations~/.files-buddy/manifests/.files-buddy-trash/; otherwise restore from gomi / OS trash or .files-buddy-trash/ fallbackundone. Report restored filesmv from .files-buddy-trash/ if gomi unavailableOpen a visual HTML dashboard. Analysis stays read-only, but rendering writes a local report file.
uv run python skills/files-buddy/scripts/dashboard-renderer.py --data <json-file|-> --output <path> --open~/.{gemini|copilot|codex|claude}/files-buddy/{YYYY-MM-DD}-dashboard.html unless --output is providedEvery destructive mode produces a preview before execution:
fclones group (no --delete), f2 (default), organize sim, detox -n, ouch compress --dry-run🔴 Critical, 🟠 High, 🟡 Medium, 🟢 LowTransaction-batched execution for all destructive modes:
.tmp -> os.rename()) at ~/.files-buddy/manifests/{ts}-{uuid8}-{mode}.json via manifest-manager.py createpueue for cloud) -> empty dir cleanup (sequential)completed or failed.files-buddy-trash/; cloud-tagged paths: .files-buddy-trash/ only. NEVER rmpueue with parallel 2 + delays to avoid API rate limitingpartialosascript / notify-send)| Scope | Strategy |
|---|---|
| <100 files | Direct operation, full preview |
| 100-1,000 files | Batched preview (summary + sample), pueue for parallelism |
| 1,000-10,000 files | Sampling preview (10%), batched execution, progress tracking |
| 10,000+ files | Sampling preview (1%), pueue queued batches, parallel subagents |
Cloud directories: halve the parallelism, double the batch delays.
Load ONE reference at a time. Do not preload all references into context.
| File | Content | Read When |
|---|---|---|
references/tool-integrations.md | CLI interfaces for 20+ tools: fd, fclones, rmlint, f2, dust, erdtree, gomi, ouch, zstd, b3sum, detox, convmv, rclone, pueue, bat, watchexec, organize-tool, czkawka_cli. Install commands per platform. Output parsing. | Pre-flight tool detection |
references/cloud-drives.md | Detection paths (macOS CloudStorage, iCloud Mobile Documents), brctl/fileproviderctl, evicted file handling, rclone backends, Google Drive dedupe, conflict copies, rate limiting | Pre-flight cloud detection |
references/organization-strategies.md | organize-tool YAML templates, extension-to-category mapping, date grouping, project detection, collision handling | Organize mode, watch mode |
references/protected-paths.md | Hard-blocked paths (macOS + Linux), escalated paths, validation algorithm, .git/ exclusion | Pre-flight checks |
references/duplicate-detection.md | fclones JSON parsing, rmlint lint types, rclone dedupe modes, hardlink detection, zero-byte exclusion, NFC/NFD gotchas | Clean mode |
references/rename-patterns.md | f2 patterns (regex, EXIF {xt.make}, ID3 {id3.artist}, hash {hash.blake3}), CSV batch, conflicts, f2 undo | Rename mode |
references/safety-workflow.md | Manifest schema, atomic writes, trash hierarchy, TOCTOU drift, cloud safety rules, permission restoration, corruption recovery | Undo mode, execution protocol |
| Script | When to Run |
|---|---|
scripts/manifest-manager.py | Create, list, search, validate, and close manifests — all destructive modes |
scripts/dashboard-renderer.py | Inject JSON data into HTML template, open browser — dashboard mode |
| Template | When to Render |
|---|---|
templates/dashboard.html | After audit analysis — inject data JSON into <script id="data"> tag |
rm — local paths go to gomi / OS trash or .files-buddy-trash/ fallback; cloud-tagged paths stage only to .files-buddy-trash/.gitignore — never move tracked files without confirmation.git/ always excluded~/.files-buddy/manifests/