organize-by-project
Skill2 starsChanged 45 days agoMITView on GitHub
Sort a folder into project folders using a local model, a human-written project list, and an approved plan. Use for requests like "group my Downloads by what the files are for" when contents may be sensitive.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- avoid-ai-writingSkill
- edit-chapterSkill
- organize-folderSkill
- vet-skillSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Ask the user before choosing --flat or the nested Projects/ layout.
- Distinctive: line 43
STOP. Apply only after an explicit yes.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Organize a folder by project
Paths below are relative to chapters/01-files-and-folders/1d-projects/ (call it $P) and its parent ($C).
Input: the folder, and a project list. Ask for both if missing. Back-up status: ask whether the folder is
backed up before the first apply. Work on a copy when the user has any doubt.
1. Check the local model is up
curl -s localhost:1234/v1/models (LM Studio) or localhost:11434/v1/models (Ollama). If neither answers,
tell the user to start one. Do not fall back to a cloud model: the point is that file contents stay here.
2. Assign (the local model reads the files)
python3 $P/assign_projects.py <folder> <projects.json> [--top-level] writes assignments.json.
Report how many files were placed, left unsorted or failed. Do not print file names or contents. The script's own output shows project ids (P1, P2...), not names. Never pass --verbose.
3. Optional improvements, each only if the user wants it
- Learned rules:
python3 $P/rules.py apply <folder> assignments.json rules.json(rules come fromteach.pycorrections,rules.py learn). - Better names:
python3 $P/suggest_names.py <folder>then pass--names names.jsonin step 4.
4. Build the plan
python3 $P/plan_projects.py assignments.json projects.json <folder> [--top-level --keep-folders] [--flat] [--names names.json]
Ask the user before choosing --flat or the nested Projects/ layout. They own the layout.
--keep-folders leaves subfolders alone and is the safe start on a real folder.
5. Check, then ask
- Snapshot before anything moves:
python3 $C/verify.py snapshot <folder>. - Coverage and conflicts:
python3 $C/apply_plan.py --check organize-plan.md <folder>. It rejects a plan that skips items or collides on a destination. - Optional second opinion that sees no names or contents:
python3 $C/validate_plan.py claude-view.txt --prompt $P/validator-prompt-projects.md. - Tell the user the counts per project id (P1, P2...), how many are unsorted or empty, and the plan's totals,
from script output. Do not open
protect-list.txt: tell the user it ranks the projects and to read it themselves. - STOP. Apply only after an explicit yes.
6. Apply, verify, tag
python3 $C/apply_plan.py organize-plan.md <folder>, then python3 $C/verify.py check <folder>, then
python3 $P/tag_files.py organize-plan.md <folder> for Finder tags (macOS). Undo is
python3 $C/undo_plan.py <folder>; tell the user it exists, and that tag_files.py --remove clears tags.
Report: files moved per project id, unsorted count, and how to undo. Name no project and no file.
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
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.

