Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: test (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.12"]
exclude:
# macos-latest is arm64, and setup-python only resolves 3.9 from
# 3.9.13 onward there, sometimes failing to find a build at all.
# The ubuntu 3.9 leg already guards the syntax floor.
- os: macos-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Everything is stdlib on purpose, so there is nothing to install and the
# 3.9 leg is a real floor rather than a formality.
- name: Compile check
run: python -m compileall -q skills tests
- name: Run tests
run: python -m unittest discover -s tests -v

hygiene:
name: hygiene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: no private paths, borrowed vocabulary or private product names
run: bash skills/ops/carl-file-organizer/scripts/hygiene.sh
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
| ✍️ [**x-article-publisher**](#x-article-publisher) | [![](https://img.shields.io/github/stars/LearnPrompt/x-article-publisher-skill?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/x-article-publisher-skill) | 把飞书或本地Markdown文章发布到X Articles草稿 | [canonical](https://github.com/LearnPrompt/x-article-publisher-skill) |
| 🔁 [**skill-sync**](#skill-sync) | [![](https://img.shields.io/github/stars/LearnPrompt/skill-sync?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/skill-sync) | 把多端Agent skills整理成一个可信来源 | [canonical](https://github.com/LearnPrompt/skill-sync) |
| 🧭 [**Skill 瘦身**](#skill-slimming) | [![](https://img.shields.io/github/stars/LearnPrompt/carl-skills?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/carl-skills) | 把Agent能力整理成全局、项目和按需触发 | [collection-native](./skills/ops/skill-slimming/SKILL.md) |
| 🗂️ [**文件整理 carl-file-organizer**](#carl-file-organizer) | [![](https://img.shields.io/github/stars/LearnPrompt/carl-file-organizer?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/carl-file-organizer) | 先看后动的下载目录整理器,只读扫出方案,网页勾选批准才移动,删除默认进废纸篓 | [canonical](https://github.com/LearnPrompt/carl-file-organizer) |
| 🗂️ [**文件整理 carl-file-organizer**](#carl-file-organizer) | [![](https://img.shields.io/github/stars/LearnPrompt/carl-skills?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/carl-skills) | 先看后动的文件整理与磁盘盘点,只读扫出方案,三色分级,网页上点头才动 | [collection-native](./skills/ops/carl-file-organizer/SKILL.md) |
| 🏮 [**阿福 afu**](#afu-llm-todo) | [![](https://img.shields.io/github/stars/LearnPrompt/afu-llm-todo?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/afu-llm-todo) | Obsidian收件箱管家,Inbox到Wiki到待办到周历一条线 | [canonical](https://github.com/LearnPrompt/afu-llm-todo) |
| 📜 [**蔡伦 cailun**](#cailun) | [![](https://img.shields.io/github/stars/LearnPrompt/cailun-skill?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/cailun-skill) | 把对话里聊出来的结论,3秒造成一页能传阅的单文件纸 | [canonical](https://github.com/LearnPrompt/cailun-skill) |
| ⛰️ [**愚公 yugong**](#loop-engineering) | [![](https://img.shields.io/github/stars/LearnPrompt/loop-engineering?style=flat&label=%E2%98%85&color=555)](https://github.com/LearnPrompt/loop-engineering) | Loop工程方法论,把模糊目标改造成带验证门的自动循环 | [canonical](https://github.com/LearnPrompt/loop-engineering) |
Expand All @@ -65,7 +65,7 @@ npx skills add LearnPrompt/carl-skills --skill skill-slimming -g

这条命令会读取仓库目录来发现Skill,但只把`skill-slimming`这一个完整目录安装到Agent,不会把Carl Skills里的其他Skill一起启用。

Skill 瘦身包含本地复审网页、状态服务和参考合同,不能只下载raw `SKILL.md`。因此它暂不支持Hermes的单文件raw安装;否则能看到提示词,却缺少实际运行层。
Skill 瘦身包含本地复审网页、状态服务和参考合同,不能只下载raw `SKILL.md`。因此它暂不支持Hermes的单文件raw安装;否则能看到提示词,却缺少实际运行层。文件整理carl-file-organizer也是同一套装法,把`--skill`换成`carl-file-organizer`即可。

### 装这个目录里的全部可安装skill

Expand Down Expand Up @@ -495,28 +495,40 @@ npx skills add LearnPrompt/carl-skills --skill skill-slimming -g

### 🗂️ 文件整理 carl-file-organizer

> *"先站好队,再决定谁走,删谁都要你点头。"*
> *整理文件夹和清磁盘这两件事,过去靠忍,或者靠一个看不懂你文件的软件,现在跟Agent说一句就够了。*

它是一个零依赖的Python命令行工具,专门整理下载目录一类越堆越乱的文件夹。plan阶段只读扫描,给出一份整理方案;方案要在网页上逐条勾选批准,apply阶段才真正移动文件。目录按编号分区,00_收件箱、10_工作区、20_知识库、60_敏感信息、90_归档,中英文目录名都能用。
随口跟Agent说一句「收拾一下Downloads」或者「磁盘满了」,它先只读扫一遍,再打开一份网页报告。整理页上看目录多乱、每个文件往哪走、压缩包和重复副本怎么配对;盘点页上看磁盘去哪了、最大的几项、清理优先级。每一项都写着这是什么、为什么这么判、动了会怎样,你在页面上勾、选、点,动作前都有二次确认,做完能一键撤回。

判断一份文件该去哪,看的是静置期、敏感命名(只看名字不读内容)、成对压缩包、重复副本、可再生产物这些线索。删除动作默认进废纸篓,要永久删除得显式开关打开。真正动手前会先查一遍进程占用和配置引用,动完的每一步都能undo,Finder标签会打上「文件移动」方便复核。
传统整理器按扩展名把文件搬走,回头想找一份合同却不知道去了哪;清理软件扫到几个G的目录只写一句用户缓存可删,你不知道里面装的是什么,也不知道删完哪些网站要重新登录。这个skill分两层,脚本先把大小、静置期、压缩包配对、重复副本、进程占用这些能用规则说清的判断做完,Agent再看一眼目录,把每一项翻译成人话。方案先给你看,你点头才动,删除默认进废纸篓,移动过的能原路放回。

**三色分级是核心**

| 颜色 | 能按什么 |
|---|---|
| 🟢 放心归位 / 可清 | 勾上就走,永久删除要你自己额外开开关 |
| 🟡 你看一眼 | 只有打开所在位置和移到废纸篓,都可逆 |
| 🔴 别动 | 只解释为什么不能动,最多打开所在位置 |

**适合**

- 下载目录已经乱成泥石流
- 下载目录已经乱成泥石流,或者磁盘经常报警
- 想让Agent帮忙整理,但不放心它直接删东西
- 想给每一次整理留一份可审计的记录
- 想给每一次整理和盘点留一份可审计的记录

**不适合**

- 想要全自动、无人值守地清理
- 想清系统缓存和大盘空间,那不是它管的事
- Windows用户(目前macOS功能齐全,Linux只有基本功能)
- 只想清系统缓存和大盘空间,那不是它管的事
- Windows第一次用留个心眼,代码测试过但没在真机上磨过,建议先只读看报告

[![Repo](https://img.shields.io/badge/GitHub-carl--file--organizer-111827?style=flat-square&logo=github)](https://github.com/LearnPrompt/carl-file-organizer)
[![Install](https://img.shields.io/badge/Install-raw_SKILL.md-10B981?style=flat-square)](https://raw.githubusercontent.com/LearnPrompt/carl-file-organizer/main/skills/carl-file-organizer/SKILL.md)
```bash
npx skills add LearnPrompt/carl-skills --skill carl-file-organizer -g
```

[![Repo](https://img.shields.io/badge/GitHub-carl--skills-111827?style=flat-square&logo=github)](https://github.com/LearnPrompt/carl-skills)
[![Install](https://img.shields.io/badge/Install-skill_folder-10B981?style=flat-square)](./skills/ops/carl-file-organizer/SKILL.md)

→ [canonical repo](https://github.com/LearnPrompt/carl-file-organizer) · [raw SKILL.md](https://raw.githubusercontent.com/LearnPrompt/carl-file-organizer/main/skills/carl-file-organizer/SKILL.md)
→ [SKILL.md](./skills/ops/carl-file-organizer/SKILL.md) · [skill 目录](./skills/ops/carl-file-organizer/)

</td></tr>
</table>
Expand Down
15 changes: 9 additions & 6 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Real-world AI workflows for creators.",
"homepage": "https://github.com/LearnPrompt/carl-skills",
"license": "MIT",
"version": "0.7.0",
"version": "0.8.0",
"updated": "2026-09-02",
"model": "catalog-first",
"install_logic": "Carl Skills is the catalog. Each entry declares either a raw_skill_url or a folder-aware install_mode/install_command; collection-native skills are maintained directly under this repository's skills directory.",
Expand Down Expand Up @@ -309,13 +309,16 @@
"status": "active",
"category": "ops",
"catalog_anchor": "carl-file-organizer",
"summary": "先看后动的下载目录整理器:plan只读扫描出方案,网页勾选批准后才apply移动,删除默认进废纸篓。",
"canonical_repo": "https://github.com/LearnPrompt/carl-file-organizer",
"summary": "先看后动的文件整理与磁盘盘点,只读扫出方案,逐项讲人话,三色分级,网页上点头才动,删了默认进废纸篓,动过的能撤。",
"canonical_repo": "https://github.com/LearnPrompt/carl-skills",
"canonical_branch": "main",
"canonical_path": "skills/carl-file-organizer/SKILL.md",
"canonical_path": "skills/ops/carl-file-organizer/SKILL.md",
"distribution": "collection-native",
"installable": true,
"raw_skill_url": "https://raw.githubusercontent.com/LearnPrompt/carl-file-organizer/main/skills/carl-file-organizer/SKILL.md",
"source_commit": "fdfeb990343c2d81f5f7366bd26c55a37601a91f"
"install_mode": "skill-folder",
"install_command": "npx skills add LearnPrompt/carl-skills --skill carl-file-organizer -g",
"hermes_installable": false,
"hermes_skip_reason": "完整运行时含 scripts/assets/references,raw SKILL.md 装不全"
},
{
"id": "afu-llm-todo",
Expand Down
79 changes: 79 additions & 0 deletions skills/ops/carl-file-organizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 🗂️ 文件整理 carl-file-organizer

> 整理文件夹和清磁盘这两件事,过去靠忍,或者靠一个看不懂你文件的软件,现在跟 Agent 说一句就够了。

随口跟 Agent 说一句「收拾一下 Downloads」或者「磁盘满了」,它先只读扫一遍,然后在浏览器里打开一份报告。就一份:磁盘总览和目录杂乱度并排放在最上面,接着是最大的五项,然后按绿黄红三个区往下排,每个区里先是能清掉的缓存和构建产物,再是要搬去哪儿的文件。每一项都写着这是什么、为什么这么判、动了会怎样。三色区下面是整理后预览,一张图告诉你点完确认之后这个目录长什么样,你勾掉哪项图上那项就变回原地不动。底下只有一个按钮,勾好一次点掉,每次都有二次确认,动过的能一键撤回。

## 它跟传统整理器和清理软件的区别

传统整理器按扩展名把东西搬走,回头你找不到那份合同去了哪。清理软件扫到一个 3.8G 的目录只会写一句「用户缓存,可删」,你不知道里面到底是什么,也不知道删了哪些网站要重新登录。

这个 skill 分两层。脚本负责量大小、算静置期、认压缩包配对和重复副本、查谁还在用这个文件,把八成能用规则说清楚的判断先做完。Agent 负责剩下两成,看过目录之后给每一项写三句人话,这是什么,为什么这么判,删了会怎样。方案先给你看,你点头它才动,删了默认进废纸篓,移动过的能原路放回。

## 三色分级是核心

三色分两层。目录那层告诉你这个文件夹现在有多乱,值不值得花时间。条目那层告诉你这一条你能按什么按钮。

| 目录杂乱度 | 意思 |
|---|---|
| 🟢 整洁 | 没几件散件,没有等你判断的东西 |
| 🟡 有点乱 | 要么量还不大,要么要判断的不多 |
| 🔴 泥石流 | 两条都不满足,该花点时间了 |

| 条目 | 搬动那半 | 清理那半 | 能按什么 |
|---|---|---|---|
| 🟢 放心归位 / 可清 | 规则明确的移动、敏感命名隔离、可再生构建产物 | 纯缓存和临时文件,删了自动再生 | 勾上就走,永久删除要你自己额外开开关 |
| 🟡 你看一眼 | 待判断、成对压缩包、重复副本、冷存候选 | 含用户数据的目录、安装包、备份、agent 会话日志 | 只有打开所在位置和移到废纸篓,都可逆 |
| 🔴 别动 | 禁刀区、被进程占用、被别处引用、静置期没满 | 系统核心、虚拟机镜像、浏览器登录态、照片图库 | 只解释为什么不能动,最多打开所在位置 |

颜色由规则算出来。Agent 看过目录之后只能改目录那层的颜色,条目的颜色一个字都改不了,因为按钮权限跟着它走。

## 铁律

全程只读,直到你在页面上点按钮并在浏览器弹窗里二次确认。Agent 永远不自己 rm、mv、trash,永远不加 `--allow-permanent-delete`,这个开关只能你自己在终端里加。本地服务只绑 127.0.0.1,随机端口加一次性 token,关掉终端就失效。不读文件内容,敏感命名只看名字。拿不准就黄。每次执行都写清单和审计,`undo` 按记录逆序放回。

## 怎么触发

```
整理下载目录
收拾一下 Downloads
下载文件夹太乱了
帮我归档文件
磁盘满了
看看存储
C 盘满了
清理一下磁盘
看下电脑空间
organize my downloads
tidy this folder
disk is full
storage analysis
```

## 安装

```bash
npx skills add LearnPrompt/carl-skills --skill carl-file-organizer -g
```

零第三方依赖,Python 3.9 以上。装完 Agent 会读到 SKILL.md,脚本在 `scripts/` 下,`python3 scripts/organize.py --help` 能看到全部子命令。

## Windows

回收站走系统的 `SHFileOperationW` 接口,带撤销标志,进回收站的东西能从回收站找回。Finder 标签在 Windows 上没有对应功能,直接跳过不报错。打开所在位置用资源管理器。没有 lsof 时占用检查老实标成未知。C 盘之外的盘符一起盘点,WinSxS、hiberfil、pagefile 这些系统大户只提示正规释放方式,不给删除按钮。macOS 上跑过真实目录和真实磁盘,Windows 的代码走过测试但没在真机上磨过,第一次用建议先只读看报告,留个心眼。

## 老师们

| 老师 | 教的是 | 在这里变成了什么 |
|---|---|---|
| [John Locke](https://en.wikipedia.org/wiki/Commonplace_book) | commonplace book,能检索比完美分类更重要 | 收件箱先接住一切,待判断不强行归类 |
| [Melvil Dewey](https://en.wikipedia.org/wiki/Dewey_Decimal_Classification) | 用编号分区 | 00/10/20/60/90 这套编号,只到三层就封顶 |
| [S. R. Ranganathan](https://en.wikipedia.org/wiki/S._R._Ranganathan) | 分面分类,一件东西可以有多个机器可读的属性 | `destination_key`、`tier`、`color` 各管一面 |
| Aby Warburg | 好邻居法则,相关的放在一起,哪怕分类学上它们属于不同类 | 压缩包和解压目录成对处理的直觉来源 |
| [Niklas Luhmann](https://en.wikipedia.org/wiki/Niklas_Luhmann) | 卡片盒的价值在关系和理由 | 每条动作都带一句理由,Agent 再补三句人话 |
| [Paul Otlet](https://en.wikipedia.org/wiki/Paul_Otlet) | 给人读的卡片配一份给机器读的索引 | `report.html` 给人,`plan.json` 给程序和 Agent |
| [David Allen](https://en.wikipedia.org/wiki/Getting_Things_Done) | GTD 的 capture、clarify、review、act 四步 | 就是 plan、待判断、review、apply |
| [Andrej Karpathy](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) | LLM Wiki,面向 Agent 可读的知识库分区思路 | `names` 和 `destination_key` 这套机器优先的分区键 |
| [KKKKhazix / storage-analyzer](https://github.com/KKKKhazix/khazix-skills/tree/main/storage-analyzer) | 网页一键处置与三色报告 | 盘点入口的三色分级和页面上直接点按钮的体验 |

署名 LearnPrompt / 卡尔的AI沃茨。
Loading
Loading