file-organizer
npx machina-cli add skill next-open-ai/openclawx/file-organizer --openclawFiles (1)
SKILL.md
958 B
File Organizer Skill
Use this skill when the user asks to organize, categorize, or rename files in a specific directory.
Workflow
- Use
lsorfindto list the files in the target directory to understand the current structure and file types. - Based on the user's intent (e.g., "group by extension", "sort images by date"), formulate a plan using
bashcommands likemkdir,mv,cp, orrename. - Before executing destructive commands (like moving or renaming many files), EXPLICITLY confirm the plan with the user by asking for permission using the
notify_usertool unless the user has already explicitly authorized it. - Execute the bash script to organize the files.
- Verify the result using
ls -laand report back to the user.
Source
git clone https://github.com/next-open-ai/openclawx/blob/main/presets/workspaces/file-assistant/skills/file-organizer/SKILL.mdView on GitHub Overview
File-organizer uses user instructions to categorize, rename, and relocate files in a target directory using Bash commands. It starts by inspecting the directory with ls or find, then plans actions (mkdir, mv, cp, rename) aligned to the goal, and finally executes and verifies the results.
How This Skill Works
It inventories the target directory with ls or find to understand structure. It crafts a Bash plan that uses mkdir, mv, cp, and rename to implement the requested organization. If any action could be destructive, it asks for permission via notify_user unless the user has already authorized.
When to Use It
- Group files by extension into separate folders (e.g., images, docs).
- Rename batches of files to a consistent naming scheme.
- Move related files into project-specific subdirectories.
- Archive or relocate temporary or stray files to designated folders.
- Sort downloads by type and date to improve accessibility.
Quick Start
- Step 1: Run ls or find in the target directory to understand current structure.
- Step 2: Plan actions with mkdir, mv, cp, or rename; confirm with notify_user if actions are destructive.
- Step 3: Execute the Bash script and verify results with ls -la, then report back.
Best Practices
- List the directory with ls or find before acting to understand structure.
- Draft a concrete plan using mkdir, mv, cp, and rename before running.
- Require explicit user permission with notify_user before destructive changes.
- Test on a copy or subset to avoid data loss.
- Verify the final structure with ls -la and spot-check critical files.
Example Use Cases
- Organize a photo dump by year and month, renaming files to IMG_YYYYMMDD.jpg.
- Group work documents by project and standardize filenames like PROJECT-Name-001.
- Move media files into media/ and docs into docs/ while preserving originals.
- Batch rename Excel files to a consistent prefix and sequence.
- Sort music by artist/album and normalize track names.
Frequently Asked Questions
Add this skill to your agents