What does Data Organizer do?
Core Principles
Put user lookup convenience first: first consider how files should be retrieved by a person, then decide the directory and filename. Keep a shallow structure by default: topic folder/file; if the target root directory is already a topic directory itself, use just file, without wrapping it in a synonymous parent or child directory. Only add a second level when strictly necessary.
Workflow
- Recursively scan the target directory, excluding
.git,node_modules,__pycache__, system caches, and any previously generated organized directories. - First generate an organization plan without touching files directly. Use
scripts/organize_files.py <folder> --out plan.jsonfor the initial scan. - Group by topic, not just by file extension. Prioritize using: project name, client/entity name, date batch, dataset name, report topic, common filename prefix.
- Flatten directories: prefer
<target root>/<topic>/<concise filename.ext>; if the<target root>already clearly expresses the topic, use<target root>/<concise filename.ext>. Avoid copying the old directory structure as-is, and do not create nested synonymous directories. However, if a single directory contains over a dozen files sharing a long prefix, do not force them all into one level for flatness; instead split into<target root>/<topic>/<subtopic>/<short filename.ext>. - Simplify filenames: remove meaningless words, duplicate directory names,
final_final, copy markers, overly long date strings; prefer that the directory name carries the common prefix (e.g.,planner_eval_1000,product_analysis,ai_search), and keep only the keywords, version, date, language, format needed to distinguish within the same directory. - Merge review artifacts: multiple review HTMLs, reports, screenshot indexes, or demo descriptions for the same object, if users typically compare them side by side, should be merged into a single overview file (e.g.,
name.tracks.review.html). Keep the original training/data files, and delete or replace scattered derivative review files. - Clean up waste files: delete high-confidence temporary/cache/backup files; for uncertain
old/deprecated/testfiles, first list them in the plan; delete only when content or context confirms they are useless. Codex-generated temporary/demo/review derivative files from the current run that have just been merged and replaced can be cleaned up directly. - After execution, run a re-scan to confirm no empty directories, duplicate target names, overly deep paths, or obvious omissions. If the top level of the target directory still has a series of same-topic sibling files, long-prefix-shared files, duplicate derivatives, or reports/index files that should be reviewed together, consider the organization incomplete; continue to move them into topic directories and shorten filenames until only a few topic directories or truly independent files remain at the top level.
Judging Grouping
- Original data, processing scripts, result tables, and documentation of the same project go in the same topic directory.
- Different format versions of the same object go together, e.g.,
csv/xlsx/pdf/png. - Different topics from the same time batch should not be force-merged; date is only an auxiliary identifier.
- Do not create pure type directories like
images/documents/tablesunless the user explicitly searches only by file type. - For cluttered directories, first group by filename and parent directory name; if necessary, sample file headers or metadata for confirmation.
Naming Rules
- Directory names: short topic names, 2–5 words preferred, e.g.,
seed-review,audience-profiles,2026-06-eval. - Filenames: keep only the information needed to distinguish within the same directory, e.g.,
summary.csv,raw.xlsx,review-notes.md,v2-results.json. - When name conflicts occur, append the smallest distinguishing word, not a long hash; if still conflicting, use
-2,-3. - Keep extensions as-is; do not convert formats for the sake of looking uniform.
Deletion Criteria
Can delete directly: .DS_Store, Thumbs.db, *.tmp, *.temp, *.bak, *.old, *.orig, *.swp, *.pyc, ~$*, empty directories, obvious cache directories.
Delete with caution: real data files whose names contain test, 测试 (Chinese for 'test'), draft, old, 废弃 (Chinese for 'deprecated'), deprecated. First confirm the file is not the only version, not a required sample for training/evaluation, and not a source file the user may need to trace back.
Tool Script
scripts/organize_files.py is used to generate and execute the initial organization plan:
python3 scripts/organize_files.py /path/to/folder --out plan.json
python3 scripts/organize_files.py /path/to/folder --apply --delete-cleanup
By default it only writes the plan; --apply actually moves files, and --delete-cleanup deletes high-confidence cleanup items. The script is a first-pass mechanical organization tool; before executing, always review the plan against this Skill's grouping principles.