# Anti Distill

Anti-distillation for employee Skills.

- Repository: https://github.com/leilei926524-tech/anti-distill (2469 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-07-02
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add leilei926524-tech/anti-distill --skill anti-distill -g -a claude-code -y`
Codex: `npx skills add leilei926524-tech/anti-distill --skill anti-distill -g -a codex -y`
Cursor: `npx skills add leilei926524-tech/anti-distill --skill anti-distill -g -a cursor -y`
Gemini CLI: `npx skills add leilei926524-tech/anti-distill --skill anti-distill -g -a gemini-cli -y`

## Description

Anti-distillation for employee Skills. Clean your skill files, looks complete, but core knowledge removed. | 反蒸馏：清洗你被迫写的 Skill 文件，看起来完整，但核心知识已被抽掉。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

> **Language / 语言**: This skill supports both English and Chinese. Detect the user's language from their first message and respond in the same language throughout.
>
> 本 Skill 支持中英文。根据用户第一条消息的语言，全程使用同一语言回复。

# 反蒸馏 Skill（Claude Code 版）

## 触发条件

当用户说以下任意内容时启动：
- `/anti-distill`
- "帮我清洗一下这个 skill"
- "反蒸馏"
- "帮我处理一下这份文档"
- "clean my skill"
- "anti-distill this"

---

## 工具使用规则

| 任务 | 使用工具 |
|------|---------|
| 读取用户提供的 Skill 文件 | `Read` 工具 |
| 读取 PDF 文档 | `Read` 工具（原生支持 PDF） |
| 读取图片截图 | `Read` 工具（原生支持图片） |
| 搜索文件 | `Glob` / `Grep` 工具 |
| 写入清洗后文件 | `Write` / `Edit` 工具 |
| 创建目录 | `Bash` → `mkdir -p` |

---

## 主流程

### Step 1：接收输入

接收用户提供的文件，支持以下方式：

**方式 A：指定文件路径**
用户直接给出文件路径，用 `Read` 读取。

**方式 B：指定 colleague-skill 目录**
用户给出 `colleagues/{slug}/` 路径，自动读取其中的：
- `work.md`
- `persona.md`
- `meta.json`
- 或 `SKILL.md`（如果是合并版）

**方式 C：粘贴内容**
用户直接粘贴文档内容。

**方式 D：搜索本地文件**
用户说"帮我找一下"，用 `Glob` 搜索 `**/SKILL.md`、`**/work.md`、`**/persona.md` 等文件。

读取完文件后，自动识别格式：
- **colleague-skill 格式**：检测到 `## Layer 0` 或 `PART A` / `PART B` 或同时存在 `work.md` + `persona.md`
- **通用文档格式**：其他任何 Markdown / TXT / PDF

告知用户：
```
已读取文件：{文件列表}
检测到格式：{colleague-skill 格式 / 通用文档格式}
总字数：约 {N} 字

下一步选择清洗强度。
```

---

### Step 2：选择清洗强度

向用户展示三档选择：

```
选择清洗强度：

  [1] 轻度, 只抽掉最核心的踩坑经验和故障记忆
      适合：公司会仔细审核内容的情况
      保留度：~80%

  [2] 中度（推荐）, 抽掉经验、判断直觉、人际网络、隐性上下文
      适合：大多数场景
      保留度：~60%

  [3] 重度, 只保留通用知识骨架，其余全部替换
      适合：公司只看交没交、不细看内容的情况
      保留度：~40%
```

用户选择后进入分类阶段。

---

### Step 3：分类标注

参考 `${CLAUDE_SKILL_DIR}/prompts/classifier.md` 中的分类规则，对输入文档的每一个要点/段落进行分类。

**根据检测到的格式选择处理方式：**

#### 如果是 colleague-skill 格式：

**对 work.md 的每个要点：**
参考 `${CLAUDE_SKILL_DIR}/prompts/classifier.md` 中的六大高价值类别，标记为：

| 标签 | 含义 | 处理方式 |
|------|------|---------|
| `[SAFE]` | 通用知识，去掉反而露馅 | 原文保留 |
| `[DILUTE]` | 有价值但可泛化 | 参考 `${CLAUDE_SKILL_DIR}/prompts/diluter_work.md` 替换 |
| `[REMOVE]` | 核心不可替代知识 | 参考 `${CLAUDE_SKILL_DIR}/prompts/diluter_work.md` 替换为等长度通用内容 |
| `[MASK]` | 含敏感信息（内部系统名、人名） | 替换为通用化表述 |

**对 persona.md 的每一层：**

The rest: https://github.com/leilei926524-tech/anti-distill/blob/HEAD//SKILL.md
