ghostshield

反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。

3,891 stars

Best use case

ghostshield is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。

Teams using ghostshield should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ghostshield/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/13770626440/ghostshield/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ghostshield/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ghostshield Compares

Feature / AgentghostshieldStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# GhostShield - 反同事蒸馏防护盾

**Slogan**: 让你的风格,成为不可复制的密码。

**定位**: 保护个人数字痕迹,防止被 AI 精准蒸馏。

---

## 一、核心概念

### 为什么需要 GhostShield?

```
竞品(colleague-skill、teammate-skill):
  你的代码/文档 → 蒸馏 → AI 模仿你的风格

GhostShield:
  你的代码/文档 → 混淆 → 保护你的风格特征
```

**痛点**:
- 离职员工:担心被前公司用 AI 完美替代
- 竞业限制者:技术决策风格可能泄露
- 个人品牌保护者:独特风格是你的 IP
- 开源贡献者:不想暴露个人编码习惯

---

## 二、三级混淆模型

### Level 1: 基础防护

**目标**: 去除敏感信息,保留风格

| 策略 | 示例 |
|------|------|
| PII 脱敏 | `wang@company.com` → `[email-removed]` |
| API Key 清理 | `api_key = "xxx"` → `api_key = "[REMOVED]"` |
| IP 泛化 | `192.168.1.100` → `[internal-ip]` |
| URL 泛化 | `https://git.company.com/...` → `https://github.com/...` |
| Git 作者匿名 | `Author: Wang` → `Author: Anonymous` |

**适用场景**: 竞业展示、合规输出、面试代码样本

---

### Level 2: 深度混淆

**目标**: 降低风格显著性,防止精准画像

**继承 Level 1 全部功能,并新增**:

| 策略 | 示例 |
|------|------|
| 词汇同义替换 | "实现" → "完成","优化" → "改进" |
| 句式重组 | "我们使用了 Redis" → "Redis 被采用" |
| 命名风格混入 | `userName` → `user_name`(30% 变量混入) |
| 时间戳偏移 | 提交时间 ± 随机偏移 |
| 决策噪声注入 | "修复性能问题" → "调整部分逻辑" |
| 格式化随机 | 微调缩进、空行分布 |

**适用场景**: 离职保护、开源脱敏

---

### Level 3: 极致隐匿

**目标**: 主动防御,注入噪声与伪特征

**继承 Level 1 + 2 全部功能,并新增**:

| 策略 | 技术原理 |
|------|----------|
| **风格注入** | 混入开源代码库的风格特征 |
| **伪特征注入** | 生成"假"的风格特征,误导蒸馏 |
| **决策反转** | 关键节点注入矛盾决策 |
| **反蒸馏水印** | 隐写术埋入追踪标记,检测是否被蒸馏 |

**伪特征注入示例**:
- 用户实际习惯:使用 `forEach`,偏好简洁命名
- 注入伪特征:混入 `for...of` 循环,增加长命名变量
- 效果:蒸馏者会提取到"错误"的风格特征

**反蒸馏水印**:
- 在代码中埋入独特的、不可见的标记
- 如果发现他人的 AI 输出包含这些标记,说明你的代码被蒸馏了

**适用场景**: 高敏感项目、IP 保护、开源代码追踪

---

## 三、核心功能

### 1. PII 智能检测与脱敏

自动识别并脱敏:
- 个人标识:邮箱、姓名、手机、身份证
- 技术凭证:API Key、Token、密码
- 基础设施:IP 地址、内部 URL
- 业务敏感:客户名、项目代号

**技术**: 正则 + NER + 自定义规则

---

### 2. 风格特征分析

生成"风格指纹报告":
- 你的代码有哪些独特特征
- 这些特征有多显著(可被蒸馏的概率)
- 哪些特征是高风险的

**分析维度**:
- 代码风格:命名习惯、缩进偏好、注释风格、函数长度
- 文档风格:句式结构、高频词汇、段落组织
- 决策风格:commit message 的表达方式

---

### 3. 三级混淆引擎

一键处理,按需选择保护强度:
- Level 1:保留风格,去除敏感(合规场景)
- Level 2:降低风格显著性(离职场景)
- Level 3:主动防御(高敏感场景)

---

### 4. 混淆效果评估

混淆后自动评估:
- 风格特征降低了多少
- 可蒸馏风险评分的变化
- 能力保留度(代码是否仍可运行)

---

### 5. 批量处理与导出

- 支持整个 Git 仓库批量处理
- 增量处理(只处理新提交)
- 导出格式:Git 仓库、ZIP 包

---

## 四、使用方式

### CLI 命令

```bash
# 安装
pip install ghostshield

# 基础用法
ghostshield --level=2 --input=./my-repo --output=./protected-repo

# 查看风格分析报告
ghostshield analyze ./my-repo

# 启用反蒸馏水印
ghostshield --level=3 --watermark=true --input=./my-repo

# 评估混淆效果
ghostshield evaluate ./protected-repo --compare=./my-repo
```

### 交互式使用

```bash
ghostshield init

🛡️ GhostShield - 反同事蒸馏防护盾

请选择保护级别:
[1] 基础防护 - 去除敏感信息,保留风格(推荐用于合规输出)
[2] 深度混淆 - 降低风格特征,防止精准画像(推荐用于离职保护)
[3] 极致隐匿 - 注入噪声与伪特征,主动防御(推荐用于高敏感场景)

请输入数据源路径: ./my-repo

⏳ 处理中...

✅ 防护完成!
📊 防护效果评估:
- PII 检测: 127 处已脱敏
- 风格特征降低: 68%
- 蒸馏相似度: 0.31 (原始 0.89)
- 能力保留度: 92%

💾 输出位置: ./protected-repo
```

---

## 五、技术架构

```
┌─────────────────────────────────────────────────────────┐
│                    GhostShield 架构                      │
├─────────────────────────────────────────────────────────┤
│  输入层       →    分析引擎    →    混淆引擎            │
│  - Git 仓库        - PII 检测      - Level 1/2/3       │
│  - 文件目录        - 风格分析      - 风格注入            │
│  - 单文件          - 风险评估      - 伪特征生成          │
│                                      ↓                  │
│                              ┌─────────────┐            │
│                              │  评估引擎   │            │
│                              │ - 效果度量  │            │
│                              │ - 报告生成  │            │
│                              └─────────────┘            │
│                                      ↓                  │
│                                 输出层                  │
│                              - Git 仓库                 │
│                              - ZIP 包                   │
│                              - 评估报告                 │
└─────────────────────────────────────────────────────────┘
```

---

## 六、定价策略

### 免费开源(GPL v3)

**全部功能免费**:
- Level 1-3 完整功能
- 无使用次数限制
- 源码完全开放

**商业模式(可选)**:
- 企业版支持服务:¥50k/年
- 私有化部署咨询:按项目报价
- 定制化规则开发:¥2k/规则

---

## 七、与竞品对比

| 维度 | colleague-skill | teammate-skill | **GhostShield** |
|------|-----------------|----------------|-----------------|
| **方向** | 提取风格 | 提取风格 | **混淆风格** |
| **用户** | 接收工作的人 | 团队知识管理 | **保护自己的人** |
| **痛点** | 知识传承 | 知识流失 | **隐私泄露、IP 被窃** |
| **市场** | 红海 | 红海 | **蓝海** |
| **道德** | 有争议 | 可能未经同意 | **正当(自我保护)** |
| **定价** | 付费 | 付费 | **免费开源** |

---

## 八、开发路线图

### Phase 1: MVP(4 周)

- ✅ PII 检测(正则 + presidio)
- ✅ Level 1 基础脱敏
- ✅ 简单的风格分析
- ✅ CLI 基础命令

### Phase 2: 核心功能(6 周)

- ✅ Level 2 深度混淆
- ✅ 风格指纹分析
- ✅ 混淆效果评估
- ✅ Git 仓库批量处理

### Phase 3: 高级功能(8 周)

- ✅ Level 3 极致隐匿
- ✅ 风格注入引擎
- ✅ 伪特征生成器
- ✅ 反蒸馏水印

### Phase 4: 生态建设(持续)

- 社区贡献风格库
- Web UI 界面
- 插件系统(VS Code / JetBrains)
- 多语言支持

---

## 九、目标用户

| 用户群体 | 核心诉求 | 推荐级别 |
|----------|----------|----------|
| **离职员工** | 保护职业竞争力,防止被完美替代 | Level 2 |
| **竞业限制者** | 合规保护,避免技术风格泄露 | Level 1-2 |
| **技术大牛** | IP 保护,独特性维护 | Level 3 |
| **开源贡献者** | 开源代码风格保护 | Level 2-3 |
| **合规团队** | GDPR 合规,隐私保护 | Level 1 |

---

## 十、风险与应对

### 技术风险

| 风险 | 应对 |
|------|------|
| 混淆过度导致代码不可用 | 提供预览功能,显示"能力保留度"指标 |
| PII 检测遗漏 | 混合多种检测技术,提供人工复核 |
| Level 3 对抗生成效果不佳 | 先用规则实现,后续用 GAN 优化 |

### 法律风险

| 风险 | 应对 |
|------|------|
| 用户用于恶意目的 | 在 LICENSE 中明确使用限制 |
| 水印被破解 | 多种水印技术组合,定期更新算法 |

---

## 十一、推广策略

### 开源社区驱动

1. **GitHub 发布**: 开源全部代码,吸引 Star 和贡献者
2. **技术博客**: 撰写"如何防止你的代码风格被 AI 蒸馏"系列
3. **Hacker News / V2EX**: 发布产品,引发讨论
4. **Skill 市场上架**: ClawHub、SkillHub、SkillsBot

### 借力竞品热度

- 在 colleague-skill、teammate-skill 的讨论区推广
- 制作"提取 vs 防御"对比图
- 强调"你的代码正在被蒸馏"的紧迫感

---

## 十二、总结

**GhostShield 是一个填补市场空白的创新 Skill**:
- ✅ 蓝海市场,无直接竞品
- ✅ 需求真实(离职、竞业、IP 保护)
- ✅ 技术可行(PII 检测 + 风格分析 + 对抗生成)
- ✅ 免费开源,社区驱动

**核心价值**:
> "你的风格是你的 IP,不是别人的训练数据。"

---

**版本**: 1.0.0  
**作者**: 老杨 + AI Assistant  
**日期**: 2026-04-04  
**许可证**: GPL v3

Related Skills

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure

linkedin-cli

3891
from openclaw/skills

A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.

Content & Documentation

notebooklm

3891
from openclaw/skills

Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。

Data & Research

小红书长图文发布 Skill

3891
from openclaw/skills

## 概述

Content & Documentation