reorg
Skill150 starsChanged 10 days agoMITView on GitHub
Propose and, after approval, execute content-aware file reorganization or deduplication using a local Mac Mini model with a reversible undo record. Use when sorting a folder by file contents or finding exact and near duplicates. Always dry-runs first.
In this repository89 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beamer-deckSkill
- bib-coverageSkill
- bib-filterSkill
- bib-parseSkill
- brief-compliance-checkSkill
- camera-readySkill
- causal-designSkill
- checkpointSkill
- code-archaeologySkill
- compile-knowledgeSkill
- computational-experimentsSkill
- cross-language-checkSkill
- data-analysisSkill
- devils-advocateSkill
- docs-consistencySkill
- docxSkill
- experiment-designSkill
- grill-meSkill
- handoffSkill
- ideasSkill
- init-project-courseSkill
- init-project-lightSkill
- init-project-orchestrationSkill
- init-projectSkill
- insights-deckSkill
- interview-meSkill
- knowledge-lintSkill
- latex-diffSkill
- latex-health-checkSkill
- latex-polishSkill
- latex-postersSkill
- latex-scaffoldSkill
- latexSkill
- latex-templateSkill
- lean-checkSkill
- math-proofSkill
- mcp-builderSkill
- method-auditSkill
- multi-perspectiveSkill
- numerical-checkSkill
- pdfSkill
- pipeline-manifestSkill
- playwright-cliSkill
- postmortemSkill
- pre-commit-auditSkill
- pre-submission-reportSkill
- project-deckSkill
- project-safetySkill
- proof-readabilitySkill
- proofreadSkill
- python-envSkill
- quarto-deckSkill
- replication-auditSkill
- replication-packageSkill
- retarget-journalSkill
- review-clusterSkill
- review-responseSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Execute: only after a clear yes:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
reorg — local-model file reorganiser
Conversational front-end for the local-reorg CLI (scripts/local-reorg/). The CLI runs a
local Ollama model on the Mac Mini that reads each file's content and proposes where it
should go, or finds duplicates. Nothing is ever moved without your approval, and every run
is reversible.
When to use
- "Reorganise / tidy / sort this folder" where you want the model to read files, not just pattern-match filenames.
- "Find duplicates" / "dedup this folder" (exact + near-duplicate via embeddings).
- General clutter (Downloads, Desktop, a messy project subfolder).
For research-project structural changes use an installed project-renaming or
project-initialization workflow; if none is available, use a normal reviewed git mv
plan with explicit backlink and configuration checks. For meeting to-sort/ inboxes,
use the project's inbox-processing workflow. This skill is general-purpose file tidying.
How to invoke the CLI
First hostname:
- On the Mac Mini (hostname contains
Mac-mini): thereorgshim is on PATH — callreorg …directly. - Anywhere else (MacBook, etc.): run the installed Mini wrapper over SSH:
ssh mini '~/.local/bin/reorg <args>'
The model + files both live on the Mini, so resolve the target using the Mini's Task Management path registries before invoking the wrapper. Do not embed either machine's physical Dropbox root. If you cannot resolve the path unambiguously, ask.
Workflow
- Confirm the target folder and pick a mode with the user if unclear:
- reorg by scheme:
auto(default) ·by-type·by-topic·by-date - dedup:
--dedup(report) →--dedup --quarantine(move redundant copies aside)
- reorg by scheme:
- Dry-run — never skip this:
- reorg:
reorg <folder> [--scheme X] [--recursive] - dedup:
reorg <folder> --dedupThe CLI writes<folder>/.reorg/plan.md(reorg) or.reorg/duplicates.md(dedup).
- reorg:
- Read the plan file and summarise it for the user — group counts, notable moves, and
any
⚠low-confitems. Do not dump the whole file; give a scannable summary and the path. - Get approval. The user may edit
.reorg/plan.jsonfirst (trim/retarget moves). - Execute only after a clear yes:
- reorg:
reorg <folder> --apply(add--yesif ≥20 moves — tell the user it's the break-the-glass threshold) - dedup:
reorg <folder> --dedup --quarantine
- reorg:
- Offer undo:
reorg <folder> --undoreverses the most recent applied/quarantined run (LIFO). Mention it after any execution.
Options worth surfacing
--model gemma4:e2b— ~1.5× faster than the defaultgemma4:e4b, slightly less accurate. Suggest it for large folders.--max-files N— default 200; raise for big sweeps (warn about time: ~5–6 s/file on e4b).--dedup-threshold 0.95— stricter near-match (default 0.92; paraphrases ~0.96).
Safety (the CLI enforces; restate to the user)
- Refuses Overleaf (
Apps/Overleaf/), the vault (vault/), AI client homes, and anything underdata/raw/or.git/. Don't try to work around this. - Never deletes. Reorg moves into subfolders; dedup quarantines into
.reorg/duplicates/. - git mv for tracked files; undo manifest on every applied run.
- The dry-run → approve → apply loop is mandatory. Do not run
--apply/--quarantinebefore showing the plan and getting a yes.
Requirements
Ollama must be running on the Mini with gemma4:e4b (or the chosen model) + nomic-embed-text
for dedup, plus pdftotext. All present as of setup. If Ollama is unreachable the CLI exits
with a clear message — relay it rather than guessing.
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.

