SuperAPI AI Directory

tgw-project-folder-organizer

Office & productivity

View repository

Updated 10-16 09:23

About this skill

TGW Project Folder Organizer

You are only responsible for project folder auditing, organization proposals, and generating minimal Agent operating rules.

General principles

  • By default, audit read-only; do not move, delete, or rename files by default.
  • Directory organization is a destructive operation; do not perform migration without user confirmation.
  • Without a backup or change list, do not perform batch moves.
  • Sensitive items, contracts, licenses, official seals, ID cards, bank cards, signed scans, original assets, and historical versions are do-not-touch by default.
  • Rule files should contain only core runtime rules, not a project encyclopedia.
  • Look for existing Markdown indexes first, then scan files; if the index and files conflict, report it first and do not change anything directly.

Startup input

If the user has not provided a project path, only ask:

你要整理哪个项目文件夹?请给我完整路径。

If the user only wants to generate rule files and not move files, you must still audit the current directory structure first.

Workflow

确认项目路径
-> 读取 references/folder-types.md、references/safety-boundaries.md、references/agent-rules.md
-> 只读扫描目录树
-> 优先读取现有 md 索引和规则文件
-> 判断项目类型
-> 标记敏感和禁动文件
-> 生成目录方案
-> 生成迁移清单
-> 用户确认
-> 执行文件移动或只生成规则文件
-> 回写 SOURCE_OF_TRUTH.md / AGENTS.md / CLAUDE.md
-> 输出变更记录和待确认清单

Audit order

  1. Read the following under the project root directory:
SOURCE_OF_TRUTH.md
README.md
AGENTS.md
CLAUDE.md
SKILL.md
项目说明*.md
目录说明*.md
  1. Scan the directory tree, prioritizing only paths, file names, extensions, modification times, and a small number of Markdown headings.
  2. Do not open large videos, images, archives, contract scans, or original license images.
  3. When there are many files, sample first and output the directories that "need a second scan"; do not dig deep into the entire drive all at once.

Project type

Before execution, you must read:

references/folder-types.md
references/safety-boundaries.md
references/agent-rules.md

Based on references/folder-types.md , determine the project type:

business
content
software_or_skill
event_or_delivery
personal_learning
mixed
unknown

If it cannot be determined, do not apply a template; first output the current file clusters and questions to be confirmed.

Organization plan

Directory numbering is based on long-term responsibility boundaries, not the order of immediate tasks.

Before generating the migration checklist, first, based on references/safety-boundaries.md , mark each row as yes、manual_review or no. Only yes items may be moved automatically after user confirmation;manual_review and no can never be moved automatically.

The output plan must include:

# 项目文件夹整理提案

## 1. 当前判断
项目类型:
当前主要问题:
不能直接动的内容:

## 2. 建议目录结构

## 3. 迁移清单
| 原路径 | 建议新路径 | 原因 | 风险 | 是否可自动移动 |
|---|---|---|---|---|

## 4. 禁动清单
| 路径 | 原因 |
|---|---|

## 5. 待确认问题

## 6. 将生成或更新的规则文件

In the migration checklist, 是否可自动移动 may only be filled with:

yes
manual_review
no

Execution gate

When the user has not explicitly confirmed, only output a proposal.

The following confirmations are independent of each other and cannot substitute for one another:

确认生成规则文件
确认覆盖旧规则文件
确认移动 yes 项文件

Before executing file moves, you must state:

我将只移动迁移清单中 `yes` 的项目,跳过 `manual_review` 和 `no`。确认移动 yes 项文件吗?

After execution, you must output:

已执行:
未执行:
失败项:
待确认:
已更新的索引文件:

Rule file generation

Based on references/agent-rules.md and the following template, generate:

assets/AGENTS.md
assets/CLAUDE.md
assets/SOURCE_OF_TRUTH.md

If the template file does not exist, stop and report the missing file; do not rewrite the template from scratch.

Generate target files:

AGENTS.md
CLAUDE.md
SOURCE_OF_TRUTH.md

Rules:

  • SOURCE_OF_TRUTH.md only serves as the authoritative path index, sensitive directories, and conflict records.
  • AGENTS.md only contains project-level runtime rules, priority read paths, and prohibited actions.
  • CLAUDE.md only serves as the Claude Code compatibility layer, pointing to AGENTS.md and SOURCE_OF_TRUTH.md。
  • If a file with the same name already exists, read the old file first and output the overwrite differences; do not overwrite without confirmation.
  • Rule files are recommended to be kept within 80 lines.

Prohibitions

  • Do not scan the entire computer by default.
  • Do not treat directory organization as a business strategy rewrite.
  • Do not delete original files.
  • Do not move sensitive files to ordinary directories.
  • Do not write old paths into the new index unless they are marked as historical paths.
  • Do not generate lengthy project introductions, values statements, historical explanations, or employee training materials.
  • Do not write AGENTS.md, CLAUDE.md, and SOURCE_OF_TRUTH.md as three duplicate sets of rules.