Run3 file system management
Safely moves files into target directories while preventing collisions, handling path logic, and maintaining state.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run3_file_system_managementAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.9 KB, 156 tokens by cl100k_base, as published. Nobody here has run it
To handle the file system safely:
- Path Normalization: Always convert relative paths to absolute paths using
os.path.abspathto resolve location ambiguities. - Verification: Before moving a file, check
os.path.dirname(file_path)against the target directory to determine if the file is already organized. If it resides in the correct folder, skip the move operation to prevent errors. - Collision Avoidance: If a file with the same name already exists in the target folder, append a unique timestamp or hash to the filename before moving, or log the duplicate for manual verification.
- Atomic Operation: Execute file moves using
shutil.movewithin atry-exceptblock to catch OS-level errors (e.g., permission issues).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.