Intelligent file classification and organization tool 'file-classifier': Read-only inventory, domain-based categorization, and copying to a new directory

Introduction

Download directories, project archive disks, and handover folders for departing employees are often a mess of materials accumulated over years: documents of the same business type are scattered across different hierarchy levels, and folder naming is inconsistent. Manual organization requires repeatedly opening subdirectories, defining a custom classification tree, and worrying about accidentally deleting or overwriting original files.

The following is an introduction to the SkillHub community Skill “Smart File Classification and Organization Tool file-classifier” (Coordinates @user_8bc43348/file-classifier, version 1.0.1). Running within an Agent, it follows a fixed workflow to perform a full recursive inventory, plan directories adaptively based on professional domains, and copy files to a user-specified new directory after standardized renaming. It emphasizes read-only access to the original directory and does not modify source files.

What is this

One-sentence positioning: An Agent Skill designed for “whole-disk folder migration-style organization,” using SKILL.md to define a complete set of steps from inventory to copying, and finally to verification reports.

  • Origin & Maintenance: Sourced from the SkillHub community (community), published by user_8bc43348, categorized under office-efficiency.
  • Platform Info: The SkillHub page displays version v1.0.1; tag requires_api_key=false, no API Key required.
  • Statistics (based on script scraping): Rating 100000, Downloads 1631, Installs 24.

Official Access:

  • Skill Page: https://www.skillhub.cn/skills/user_8bc43348/file-classifier
  • API Coordinate Page: https://api.skillhub.cn/user_8bc43348/file-classifier

Core Features

The following capabilities are derived from the official description and the bundled SKILL.md. Once installed, the Agent executes according to the documentation.

  1. Full Recursive Inventory: Recursively traverses the user-specified original directory, counting files, directory depth, and the distribution of top-level subdirectories, while providing a “domain recognition” summary.
  2. Adaptive Classification Planning: Prioritizes matching classification logic based on the professional domain of the files (referencing domain and management fallback rules in the packaged references/classification-rules.md). It includes splitting rules for large volumes of files in a single domain (e.g., module splitting instructions when a single domain exceeds 3000 files).
  3. Holistic Unit Protection: Folders whose names or structures fit features like “Project / System / Collection” are migrated as indivisible units to preserve internal structure.
  4. Standardized Directory Naming: Planning results favor constraints such as “two-digit number + Chinese name” and a regular maximum of three directory levels (detailed in the Skill’s rules).
  5. Read-Only Source, Copy to Target: Strictly prohibits deleting, modifying, or moving files in the original directory throughout the process. It creates the structure in the new directory and completes migration via copying. In case of name conflicts, (1), (2) suffixes are added, and overwriting existing files in the new directory is forbidden.
  6. Batch Prefix & Deliverables: Each complete task generates a unique prefix YYYYMMDDNN (e.g., 2026040201), shared by all stage outputs of the same task. Upon completion, it generates inventory reports, directory plans, migration details (Markdown and Excel), and execution verification reports in the workspace.

Installation & Activation

SkillHub officially recommends preparing the skillhub CLI according to the SkillHub Installation Guide first, and then using --dir to point to the current Agent’s skills directory (installing to the wrong directory may result in the skill not being loaded).

Check CLI:

command -v skillhub && skillhub --version

If not installed, use the installation script provided in the documentation (full installation or --cli-only for CLI only; refer to the official page).

Install this Skill (Coordinates must include the @ prefix):

skillhub install @user_8bc43348/file-classifier --dir <Your Agent skills directory>

Common path examples (from SkillHub installation docs):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

In Cursor, you can execute:

skillhub install @user_8bc43348/file-classifier --dir ~/.cursor/skills/

You can also ask the Agent to install via conversation:

Please install `@user_8bc43348/file-classifier` based on https://skillhub.cn/install/skillhub.md.

After installation, enable the Agent / Skills capability in the corresponding client (if the environment requires restarting or reloading skills, follow the client’s instructions).

Typical Usage

The Skill requires the user to provide at least two paths: Original Directory (read-only source) and New Directory (where organized results are written). If the user only mentions the skill name, lacks paths, or asks “how to use it,” the Agent should first provide usage instructions before proceeding with the workflow.

Dialogue Example (Replace paths with your actual local directories):

Use file-classifier to organize files:
Original Directory: /home/user/ToBeOrganized
New Directory: /home/user/OrganizedResults

After confirming paths, the Agent will generate a task prefix and proceed roughly according to the following steps (consistent with SKILL.md):

  1. Obtain and confirm the original and new directories.
  2. Inventory the original directory and output the “Full Original File Inventory and Domain Recognition Report” (documentation examples use PowerShell traversal scripts).
  3. Output the “New Directory System and Holistic Unit Attribution Plan”.
  4. Output the “Full File Migration Detail Planning Table” (including Markdown and Excel).
  5. Create the structure in the new directory and copy files (example uses Copy-Item, including a sample function to preserve timestamps).
  6. Output the “Execution Results and Verification Report”, checking copy counts and exception lists.

The form of the official sample script for the inventory stage is as follows (Replace path with the user’s original directory):

$source = "User specified original directory path"
$items = Get-ChildItem -Path $source -Recurse -ErrorAction SilentlyContinue
$fileCount = ($items | Where-Object { -not $_.PSIsContainer }).Count
$dirCount = ($items | Where-Object { $_.PSIsContainer }).Count

After the same task is completed, files named with the prefix will appear in the workspace. For example, if the prefix is 2026040201:

  • 2026040201_01_Full Original File Inventory and Domain Recognition Report.md
  • 2026040201_02_New Directory System and Holistic Unit Attribution Plan.md
  • 2026040201_03_Full File Migration Detail Planning Table.md
  • 2026040201_03_Full File Migration Detail Planning Table.xlsx
  • 2026040201_05_Execution Results and Verification Report.md

Scenarios & Cautions

Who is it for

  • People who need to “archive to a new structure” a whole block of folders while keeping the original disk untouched (handover disks, project wrap-ups, personal data library organization).
  • Scenarios where classification logic needs to follow “business domains” rather than simply using extension types or years for top-level directories (the Skill explicitly forbids top-level classification based solely on format or year).

Limitations & Cautions

  • Execution examples are primarily based on PowerShell; in a pure Linux environment, the Agent needs to complete traversal and copying using equivalent methods, or verify first in a Windows / PowerShell-capable environment.
  • The new directory requires sufficient disk space, and the Agent must have operating system read/write permissions for both source and target paths.
  • The rules are quite detailed (number of top-level directories, hierarchy levels, indivisible units, etc.). Officially, it is recommended to run a trial on a small directory first to confirm the plan meets expectations before processing large volumes of data.
  • This Skill is for “Copy Migration + Reporting,” not a sync drive or incremental backup tool; repeated execution will generate new batch prefixes and new sets of output files.

Conclusion

file-classifier encodes “Inventory → Domain-based Directory Planning → Detail Table → Read-Only Copy → Verification Report” into a repeatable Agent workflow, binding all deliverables of a single task together using a category prefix. If you are looking for office efficiency organization capabilities on SkillHub, you can check the instructions and install it via the official skill page: https://www.skillhub.cn/skills/user_8bc43348/file-classifier.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye