CommunityResearch & Data Analysisgithub.com

Data Organizer

Organizes files in a target directory by theme, flattening hierarchy, simplifying filenames, and cleaning up temporary files for easy retrieval.

What is Data Organizer?

This skill, **Data Organizer**, helps developers and users automatically organize cluttered directories into a clean, human-readable structure. It recursively scans a target folder, groups files by project, client, topic, or batch (not just file extension), and suggests a flat hierarchy like `topic/file.ext` or adds a sub-topic layer only when necessary. The skill generates an initial organization plan via a Python script (`scripts/organize_files.py`), which can be reviewed before applying moves and deletions. Use cases include cleaning up project folders, download directories, or any workspace where files have become scattered. It supports platforms like Claude Code, Cursor, and Codex, and ensures files are grouped for easy retrieval while removing high-confidence cache, temporary, and backup files. The skill emphasizes short, meaningful filenames and avoids creating redundant type-based directories (e.g., 'images', 'docs'). An optional post-run audit confirms no empty directories, duplicate names, or missed files remain.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add 0xb3i/codex-skills

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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

  1. Recursively scan the target directory, excluding .git, node_modules, __pycache__, system caches, and any previously generated organized directories.
  2. First generate an organization plan without touching files directly. Use scripts/organize_files.py <folder> --out plan.json for the initial scan.
  3. Group by topic, not just by file extension. Prioritize using: project name, client/entity name, date batch, dataset name, report topic, common filename prefix.
  4. 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>.
  5. 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.
  6. 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.
  7. Clean up waste files: delete high-confidence temporary/cache/backup files; for uncertain old/deprecated/test files, 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.
  8. 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/tables unless 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.

Related Skills