agentleFS
MDizzleZAMDizzleZA/claude-skills/tidy-downloads/SKILL.md

tidy-downloads

Skill0 starsChanged 3 months agoMITView on GitHub

Organises a Downloads folder (or any messy folder) by exploring its contents, asking the user how they want files sorted, generating a Python script, dry-running it for review, then executing on confirmation. Triggers on requests like "tidy my downloads", "clean up my downloads folder", "organise my downloads", or "sort my downloads".

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a shell listing to understand what's in the folder.

    line 11
  2. Very specific:

    Delete .crdownload + quarantine installers to _INSTALLERS_REVIEW/ (recommended)

    line 20
  3. Very specific:

    Read scripts/tidy_downloads.py from this skill directory and write a copy to the user's Downloads folder (or wherever they prefer).

    line 33
  4. Very specific:

    Put ["whatsapp"] -> "Personal" for personal media

    line 49
  5. Very specific:

    Run with PYTHONUTF8=1 python <script_path> (Windows) or python <script_path> (Mac/Linux).

    line 54
  6. Distinctive:

    Ask the user to confirm before going live.

    line 59
  7. Very specific:

    Windows encoding: always prefix with PYTHONUTF8=1 on Windows to avoid cp1252 errors

    line 67
  8. Distinctive:

    Root-only rule: only loose files at the root level are classified and moved.

    line 71
  9. Very specific:

    Script location: write the script to <DOWNLOADS>/tidy_downloads.py so it stays with the folder it manages

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tidy Downloads Skill

Workflow

1. Explore

Run a shell listing to understand what's in the folder. Collect:

  • Total file count and rough size (du -sh / Get-ChildItem | Measure-Object)
  • Top file types by count and size
  • Existing subfolders (names, whether any look like duplicates)
  • Presence of .crdownload, .exe, .msi files

2. Ask the user (3 questions via AskUserQuestion)

Junk files — what to do with .crdownload incomplete downloads and root-level .exe/.msi installers:

  • Delete .crdownload + quarantine installers to _INSTALLERS_REVIEW/ (recommended)
  • Quarantine only (keep .crdownload)
  • Leave junk alone

Organisation mode — how to sort loose root-level files:

  • By client/project then type: <Client>/<Type>/file (requires keyword mapping)
  • By type only: <Type>/file
  • By date then type: <YYYY-MM>/<Type>/file

Duplicate folders — if any duplicate-looking subfolders were found, ask which pairs to merge.

3. Generate the script

Read scripts/tidy_downloads.py from this skill directory and write a copy to the user's Downloads folder (or wherever they prefer). Fill in the Config section based on the user's answers:

DOWNLOADS = Path(r"<actual path>")
DELETE_CRDOWNLOADS = True/False
QUARANTINE_INSTALLERS = True/False
FOLDER_MERGES = [("Source Folder", "Dest_Folder"), ...]
ORG_MODE = "client" | "type" | "date"
CLIENT_RULES = [
    (["keyword1", "kw2"], "ClientFolderName"),
    ...
]

Client rules guidance — infer from filenames seen during exploration:

  • Group obvious brand/project keywords (e.g. ["acme", "ac_"] -> "Acme_Corp")
  • Put ["whatsapp"] -> "Personal" for personal media
  • Anything unmatched falls into _Unsorted/

4. Dry run

Run with PYTHONUTF8=1 python <script_path> (Windows) or python <script_path> (Mac/Linux). Show the user the tail of the output and the total planned action count. Flag anything that looks wrong.

5. Confirm and execute

Ask the user to confirm before going live. On confirmation:

  1. Edit DRY_RUN = False in the script
  2. Run again
  3. Reset DRY_RUN = True
  4. Report: actions executed, any skipped (locked) files, log file location

Key implementation details

  • Windows encoding: always prefix with PYTHONUTF8=1 on Windows to avoid cp1252 errors
  • Locked files: the script catches PermissionError and skips with a warning — tell the user to close open files and move them manually
  • Name collisions: safe_dest() appends _1, _2 etc. — no files are overwritten
  • Log file: tidy_downloads_log.txt written to the target folder after a live run — serves as an undo reference
  • Root-only rule: only loose files at the root level are classified and moved; files already inside subfolders are left alone (except during folder merges)
  • Script location: write the script to <DOWNLOADS>/tidy_downloads.py so it stays with the folder it manages

Result structure (client mode example)

Downloads/
├── Acme_Corp/
│   ├── Documents/
│   ├── Images/
│   └── Videos/
├── Work/
├── Personal/          <- WhatsApp and personal files
├── _Unsorted/         <- unmatched files, sorted by type
├── _INSTALLERS_REVIEW/ <- .exe/.msi for manual review
└── tidy_downloads_log.txt

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.