Agent skill

File Organization

by seb1n in seb1n/awesome-ai-agent-skills

Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions…

MITAuto-check passedProductivity & Automation

Install File Organization

skills CLI
$ npx skills add seb1n/awesome-ai-agent-skills --skill file-organization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install seb1n/awesome-ai-agent-skills file-organization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/seb1n/awesome-ai-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/productivity-and-workflow/file-organization .claude/skills/file-organization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
file-organization
GitHub stars
206
Token cost
~2.5k tokens
SKILL.md length
864 words
Files
1
Skills in repo
101
Repo updated
First seen
Licence
MIT

At a glance

Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions…

  • Works in 6 steps: Scan the Target Directory → Classify Files by Rule Set → Detect and Handle Duplicates → …
  • The user requests file organization
  • SKILL.md covers Workflow, Usage, Examples and Best Practices, plus 1 more section
  • Calls git

What it does

File Organization is an agent skill from seb1n/awesome-ai-agent-skills. Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions, and archival strategies. Use when the user requests file organization or provides relevant inputs for this workflow.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering File organization. The repository describes itself as: 103 ready-to-use AI agent skills for Claude Code, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot, Windsurf, and other Agent Skills-compatible tools. Complete SKILL.md… The licence is MIT.

When your agent uses it

  • The user requests file organization
  • Provides relevant inputs for this workflow

Example prompts

  • “/file-organization”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Scan the Target Directory
  2. Classify Files by Rule Set
  3. Detect and Handle Duplicates
  4. Apply Naming Conventions
  5. Execute the Move Plan (or Dry Run)
  6. Archive Stale Files

What it can do on your machine

Read from SKILL.md and the folder at commit 75865a5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

File Organization loads about 2.5k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 864 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from seb1n/awesome-ai-agent-skills at commit 75865a5, republished under its MIT licence (© seb1n). 864 words, ~2,452 tokens.

Download SKILL.mdSave it as .claude/skills/file-organization/SKILL.md (or your agent's skills folder).
name
file-organization
description
Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions, and archival strategies. Use when the user requests file organization or provides relevant inputs for this workflow.
license
MIT
metadata.author
awesome-ai-agent-skills contributors
metadata.version
1.1.0

File Organization

This skill enables an AI agent to bring order to cluttered directories. Given a target path, the agent scans all files, classifies them using a configurable rule set, and moves them into a well-structured directory tree. It supports organization by file type, modification date, project association, or priority level. Advanced features include duplicate detection via content hashing, consistent naming conventions, dry-run previews, and automated archival of stale files.

Workflow

  1. Scan the Target Directory Recursively enumerate all files in the specified directory. Collect metadata for each file: name, extension, size, creation date, modification date, and content hash (SHA-256, computed lazily for duplicate detection). Skip hidden files and system files (e.g., .DS_Store, Thumbs.db) by default, but allow the user to include them via configuration.

  2. Classify Files by Rule Set Apply the active organization strategy to assign each file to a destination folder. The default strategy groups by file type using a built-in extension map (e.g., .pdf → documents/, .png → images/, .mp3 → audio/). Alternative strategies include: group by modification date (2025/01/, 2025/02/), group by project name inferred from path prefixes or filename tags, or group by a priority label embedded in the filename (e.g., URGENT-report.pdf → priority-high/). Users can supply a custom rule file in YAML or JSON to override or extend any strategy.

  3. Detect and Handle Duplicates Compare content hashes across all scanned files. When duplicates are found, keep the most recently modified copy in the target location and move older copies to a _duplicates/ staging folder. Present a summary of duplicates to the user for review before permanent deletion. Optionally, replace duplicates with symbolic links to the canonical copy to save disk space while preserving path references.

  4. Apply Naming Conventions Normalize filenames according to the configured convention. Options include: kebab-case (quarterly-report-2025.pdf), snake_case (quarterly_report_2025.pdf), or date-prefixed (2025-01-15_quarterly-report.pdf). Strip special characters, collapse whitespace, and transliterate Unicode to ASCII when requested. Preserve original extensions. Log every rename so the operation is reversible.

  5. Execute the Move Plan (or Dry Run) Before moving any files, generate a complete move plan showing source and destination for every file. In dry-run mode (the default for first invocation), display the plan and ask for confirmation. Once confirmed, create destination directories as needed and move files atomically. Write a manifest file (_organization-log.json) to the root of the target directory recording every action taken, enabling a full undo.

  6. Archive Stale Files Optionally identify files that have not been accessed or modified within a configurable threshold (default: 12 months). Move these files to an _archive/ directory, preserving the organized subfolder structure. Compress the archive folder into a .tar.gz or .zip if requested. Notify the user of the total space reclaimed.

Usage

Point the agent at a directory and specify the organization strategy. If no strategy is given, the agent defaults to organizing by file type.

"Organize my ~/Downloads folder by file type."
"Sort the files in /data/raw-exports by modification date, using YYYY/MM subfolders."
"Organize ~/Projects/acme-app using this config file: .file-org-rules.yaml"

A custom rule file looks like this:

yaml
# .file-org-rules.yaml
strategy: type
naming: kebab-case
date_prefix: true
archive_after_days: 365
type_map:
  documents: [pdf, docx, txt, md, csv]
  images: [jpg, jpeg, png, gif, svg, webp]
  audio: [mp3, wav, flac, aac]
  video: [mp4, mov, avi, mkv]
  archives: [zip, tar, gz, rar, 7z]
  code: [py, js, ts, go, rs, java, c, cpp, h]
  data: [json, xml, yaml, yml, toml, sql]
ignore:
  - node_modules
  - .git
  - __pycache__

Examples

Example 1 — Organizing a Messy Downloads Folder

Before:

~/Downloads/
├── IMG_4012.jpg
├── IMG_4012 (1).jpg       ← duplicate
├── Q3 Financial Report.pdf
├── meeting-notes.txt
├── setup_installer.exe
├── song.mp3
├── profile photo.PNG
├── data_export.csv
├── slides_final_v2.pptx
├── backup.zip
└── vacation vid.mp4

User input:

"Organize ~/Downloads by file type. Use kebab-case naming. Detect duplicates."

Agent output (dry-run preview):

Scan complete: 11 files found, 1 duplicate detected.

Duplicate: IMG_4012 (1).jpg is identical to IMG_4012.jpg (SHA-256 match)
  → Moving IMG_4012 (1).jpg to _duplicates/

Move plan:
  IMG_4012.jpg                → images/img-4012.jpg
  profile photo.PNG           → images/profile-photo.png
  Q3 Financial Report.pdf     → documents/q3-financial-report.pdf
  meeting-notes.txt           → documents/meeting-notes.txt
  data_export.csv             → documents/data-export.csv
  slides_final_v2.pptx       → presentations/slides-final-v2.pptx
  song.mp3                    → audio/song.mp3
  vacation vid.mp4            → video/vacation-vid.mp4
  setup_installer.exe         → applications/setup-installer.exe
  backup.zip                  → archives/backup.zip

Confirm? (yes / no / edit plan)

After (once confirmed):

~/Downloads/
├── _duplicates/
│   └── img-4012-1.jpg
├── _organization-log.json
├── applications/
│   └── setup-installer.exe
├── archives/
│   └── backup.zip
├── audio/
│   └── song.mp3
├── documents/
│   ├── data-export.csv
│   ├── meeting-notes.txt
│   └── q3-financial-report.pdf
├── images/
│   ├── img-4012.jpg
│   └── profile-photo.png
├── presentations/
│   └── slides-final-v2.pptx
└── video/
    └── vacation-vid.mp4
Example 2 — Organizing a Project Repository with a Standard Structure

User input:

"Reorganize ~/code/my-api into a standard Go project layout. Move source files, tests, configs, and docs into conventional locations."

Agent output (dry-run preview):

Detected project type: Go (found go.mod)

Proposed structure:
  cmd/my-api/main.go         ← entry point (moved from ./main.go)
  internal/handlers/          ← HTTP handlers (moved from ./handlers/)
  internal/models/            ← data models (moved from ./models/)
  internal/service/           ← business logic (moved from ./service/)
  pkg/                        ← exported library code (empty — populate later)
  configs/config.yaml         ← moved from ./config.yaml
  docs/api-spec.md            ← moved from ./API.md
  scripts/migrate.sh          ← moved from ./migrate.sh
  test/integration/           ← moved from ./integration_tests/
  go.mod                      ← unchanged
  go.sum                      ← unchanged
  README.md                   ← unchanged

7 files moved, 3 directories created, 2 files unchanged.
Import paths in Go files updated automatically.

Confirm? (yes / no / edit plan)
Show full SKILL.md (354 more words)Show less

Best Practices

  • Always start with a dry run. Never move files without showing the user a complete plan first. Accidental reorganization of a working project directory can break builds and tooling.
  • Preserve a manifest log. Write every action (moves, renames, deletions) to a JSON log file at the root of the target directory. This makes the operation fully reversible.
  • Respect version control. If the target directory is inside a Git repository, use git mv instead of a raw filesystem move so that history is preserved. Warn the user if uncommitted changes exist.
  • Handle filename collisions. When two different files would map to the same destination path, append a numeric suffix (e.g., report.pdf and report-1.pdf) rather than overwriting silently.
  • Skip known dependency directories. Exclude node_modules/, .git/, __pycache__/, vendor/, and similar tool-managed directories by default. Reorganizing these breaks package managers.
  • Verify integrity after moves. After execution, compare the SHA-256 hash of each moved file against the original hash recorded during the scan to confirm no data corruption occurred.

Edge Cases

  • Empty directories left behind. After moving files out of a folder, check whether the source folder is now empty. Offer to remove empty directories to keep the tree clean.
  • Symbolic links and hard links. Do not follow symbolic links during the scan — record them as links and ask the user how to handle them (move the link, resolve to the target, or skip).
  • Files with no extension. Classify extensionless files as other/ by default. If the file has a shebang line (e.g., #!/usr/bin/env python3), infer the type from the interpreter.
  • Very large directories (>10,000 files). Process files in batches and provide a progress indicator. Avoid loading the entire file list into memory at once.
  • Permission errors. If a file cannot be read or moved due to filesystem permissions, log it, skip it, and continue with the remaining files. Present a summary of skipped files at the end.
  • Network or external drives. Warn the user that reorganizing files on a network share or external drive may be significantly slower and that interrupted operations could leave files in an inconsistent state. Recommend working on a local copy first.

© seb1n, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in productivity-and-workflow/file-organization of seb1n/awesome-ai-agent-skills.

Open the folder on GitHubat commit 75865a5

Compare with similar skills

File Organization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

File Organization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
File Organization this skillseb1n/awesome-ai-agent-skills206—~2.5kAutomated safety check: PassMIT
Answer Me With HTMLQingYunA/answer-me-with-html2.4k—~4.1kAutomated safety check: PassMIT
Abp App Nolayersabpframework/abp14k—~575Automated safety check: PassLGPL-3.0
Feishu Driveraucvr/Group-Goki1123 repos~587Automated safety check: PassMIT
Azldev Comp Tomlmicrosoft/azurelinux5.3k—~1.8kAutomated safety check: PassMIT
PikpakBengerthelorf/pikpaktui120—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Answer Me With HTML

    QingYunA/answer-me-with-html

    Turns an answer into a one-page visual HTML explainer: the model writes a short Markdown draft and the bundled CLI builds one page.

    2.4k GitHub stars~4.1k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Abp App Nolayers

    abpframework/abp

    ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects.

    14k GitHub stars~575 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Drive

    raucvr/Group-Goki

    Feishu cloud storage file management. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~587 tokens
    Productivity & AutomationAuto-check passed
  • Azldev Comp Toml

    microsoft/azurelinux

    Official

    Read this before authoring, editing, or reviewing a .comp.toml file; do not work from memory.

    5.3k GitHub stars~1.8k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Pikpak

    Bengerthelorf/pikpaktui

    Manage PikPak cloud storage — browse, upload, download, stream, share, and organize files via CLI.

    120 GitHub stars~1.2k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Advanced File Management

    MassLab-SII/open-agent-skills

    Advanced file management tools. An agent skill from MassLab-SII/open-agent-skills.

    133 GitHub stars~1.6k tokensUpdated 9 mo ago
    Productivity & AutomationAuto-check passed

More from seb1n/awesome-ai-agent-skills

All 101 skills in this repo
  • Agent Red Teaming

    seb1n/awesome-ai-agent-skills

    Plan, execute, document, and retest authorized security assessments of AI agents and multi-agent workflows using safe adversarial cases, synthetic identities, canaries, and evidence-based findings.

    206 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Eu AI Act Readiness

    seb1n/awesome-ai-agent-skills

    Build a preliminary, evidence-based EU AI Act readiness assessment across AI-system inventory, territorial scope, operator roles, prohibited-practice screening, risk classification, transparency…

    206 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Human In The Loop

    seb1n/awesome-ai-agent-skills

    Design and verify auditable human oversight, approval gates, escalation paths, and safe state transitions for AI agent workflows.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • MCP Server Building

    seb1n/awesome-ai-agent-skills

    Design, implement, harden, and verify Model Context Protocol (MCP) servers with precise tool contracts, least-privilege authorization, safe transports, structured errors, and interoperability tests.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • PDF Processing

    seb1n/awesome-ai-agent-skills

    Inspect, extract, OCR, create, merge, split, reorder, rotate, annotate, fill, redact, compress, secure, and verify PDF documents while preserving source files and visual fidelity.

    206 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Skill Supply Chain Audit

    seb1n/awesome-ai-agent-skills

    Audit agent skills, plugins, prompts, manifests, scripts, dependencies, and bundled assets for provenance, prompt-injection, permission, execution, exfiltration, persistence, and update risk.

    206 GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about File Organization

What does File Organization do?

Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions…. File Organization is an agent skill from seb1n/awesome-ai-agent-skills. Automatically organizes files in a directory into a clean structure based on configurable rules — by file type, date, project, or priority — with support for duplicate detection, naming conventions, and archival strategies.

When should I use File Organization?

File Organization fits situations like: the user requests file organization; provides relevant inputs for this workflow.

How do I install File Organization in Claude Code?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill file-organization -a claude-code`. Or copy the skill folder (productivity-and-workflow/file-organization in seb1n/awesome-ai-agent-skills) into .claude/skills/file-organization in your project. Claude Code loads it when a task matches its description.

How do I install File Organization in Codex?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill file-organization -a codex`. Or copy the skill folder (productivity-and-workflow/file-organization in seb1n/awesome-ai-agent-skills) into .agents/skills/file-organization in your project. Codex loads it when a task matches its description.

Can I use File Organization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add seb1n/awesome-ai-agent-skills --skill file-organization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/file-organization, .gemini/skills/file-organization, .github/skills/file-organization and .opencode/skills/file-organization in your project.

What does File Organization need to run?

Going by SKILL.md and its folder, File Organization needs the command-line tools its instructions call (git).

Does File Organization access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is File Organization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does File Organization use?

File Organization is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does File Organization use?

About 2.5k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to File Organization?

Skills that share tags, products or a category with File Organization: Answer Me With HTML (QingYunA/answer-me-with-html, 2.4k stars), Abp App Nolayers (abpframework/abp, 14k stars), Feishu Drive (raucvr/Group-Goki, 112 stars) and Azldev Comp Toml (microsoft/azurelinux, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains File Organization?

seb1n (a GitHub user) maintains it in seb1n/awesome-ai-agent-skills, which has 206 GitHub stars. The repository holds 101 skills in this directory. The repository was last updated on August 9, 2026.

Source: seb1n/awesome-ai-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.