# Organize

> 帮助用户整理文件夹结构。扫描目录、分类归档、清理冗余，输出整理方案并执行。当用户说"整理文件"、"文件夹好乱"、"归档"、"清理目录"、"/organize"时触发。

- **Type:** Skill
- **Install:** `agentstack add skill-yunshu0909-yunshu-skillshub-organize`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [yunshu0909](https://agentstack.voostack.com/s/yunshu0909)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [yunshu0909](https://github.com/yunshu0909)
- **Source:** https://github.com/yunshu0909/yunshu_skillshub/tree/master/organize

## Install

```sh
agentstack add skill-yunshu0909-yunshu-skillshub-organize
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 文件夹整理助手

## 功能说明

帮助用户梳理混乱的文件夹，按归属分类、统一命名、清理冗余，让目录结构一目了然。

- `/organize` → 整理当前工作目录
- `/organize [路径]` → 整理指定目录

---

## 工作流程

### 第1步：扫描全貌

1. `ls -la` 查看根目录所有文件和文件夹（包括隐藏文件）
2. 对子目录做一层展开，了解内容
3. 记录文件总数、目录总数、散落文件数

**关注点**：
- 散落在根目录的文件（没有归入任何子目录的）
- 命名风格不统一的目录（如有的带前缀有的不带）
- 隐藏目录/文件（判断是工具产物还是用户文件）
- 疑似重复的文件（文件名相似的用 md5 比对）

### 第2步：分析归属

把所有文件和目录按**归属方**分类。常见的归属维度：

1. **按所有者**：客户的 / 内部的 / 个人的
2. **按类型**：文档 / 代码 / 设计 / 数据 / 媒体
3. **按状态**：活跃的 / 归档的 / 可删除的

**分类原则**：
- 优先按归属方分，同一归属方的东西放一起
- 已经成体系的目录结构不动（如有明确组织的子目录）
- 工具产生的临时文件/缓存/日志，归为"可清理"类

**判断"可清理"的标准**：
- 隐藏目录中只有 .DS_Store 或日志文件
- 工具运行产生的缓存/临时目录（如 .playwright-mcp、node_modules 等）
- 评测/调试的中间产物，已无后续使用价值
- 重复文件中较旧的那份（需 md5 确认后才算重复）

### 第3步：制定方案

输出整理方案，包含：

1. **目标结构**：用树形图展示整理后的目录结构
2. **操作清单**：
   - 新建哪些目录
   - 哪些文件/目录移动到哪里
   - 哪些目录/文件重命名
   - 哪些可以删除
3. **不动的部分**：明确哪些保持不变、为什么

**方案格式**：

```
整理后结构：
目标目录/
├── 分类A/
│   ├── ...
├── 分类B/
│   ├── ...
└── 保留不动的/

操作清单：
- [新建] 分类A/
- [移动] xxx → 分类A/xxx
- [重命名] yyy → zzz（统一命名风格）
- [删除] .cache/（工具缓存，无保留价值）
- [不动] 保留不动的/（已有结构，无需调整）
```

### 第4步：确认后执行

**必须等用户确认后再执行**。用户可能：
- 同意全部 → 直接执行
- 部分调整 → 按调整后的方案执行
- 只做清理不做分类 → 只执行删除部分

执行顺序：
1. 先建目录
2. 再移动文件（并行移动无依赖的文件）
3. 再重命名
4. 最后删除
5. 执行完 `ls -la` 验证结果

### 第5步：展示结果

输出整理后的目录树，标注变化。

---

## 核心原则

### 1. 按归属分，不按格式分

"客户A的方案.pptx" 应该放在 `客户A/` 下面，而不是放在 `PPT/` 下面。归属比格式重要。

### 2. 确认再动，不自作主张

整理方案必须给用户看过、确认后才执行。尤其是删除操作，宁可多问一句。

### 3. 统一命名风格

同级目录的命名风格要一致：
- 要么都带前缀，要么都不带
- 要么都用中文，要么都用英文
- 日期格式统一

### 4. 不动已有结构

如果某个子目录内部已经组织得很好，不要拆散重组。整理的目标是根目录清晰，不是追求完美对称。

### 5. 疑似重复先验证

文件名相似不代表内容相同。必须用 md5 比对确认后才能判定为重复。

### 6. 隐藏文件谨慎处理

以 `.` 开头的目录可能是工具配置（如 .claude、.git），不要随意移动或删除。只清理明确是缓存/日志的。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [yunshu0909](https://github.com/yunshu0909)
- **Source:** [yunshu0909/yunshu_skillshub](https://github.com/yunshu0909/yunshu_skillshub)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yunshu0909-yunshu-skillshub-organize
- Seller: https://agentstack.voostack.com/s/yunshu0909
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
