← Back to Skills Marketplace
13770626440

GhostShield

by 13770626440 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
134
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ghostshield
Description
反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。
README (SKILL.md)

\r \r

GhostShield - 反同事蒸馏防护盾\r

\r Slogan: 让你的风格,成为不可复制的密码。\r \r 定位: 保护个人数字痕迹,防止被 AI 精准蒸馏。\r \r ---\r \r

一、核心概念\r

\r

为什么需要 GhostShield?\r

\r

竞品(colleague-skill、teammate-skill):\r
  你的代码/文档 → 蒸馏 → AI 模仿你的风格\r
\r
GhostShield:\r
  你的代码/文档 → 混淆 → 保护你的风格特征\r
```\r
\r
**痛点**:\r
- 离职员工:担心被前公司用 AI 完美替代\r
- 竞业限制者:技术决策风格可能泄露\r
- 个人品牌保护者:独特风格是你的 IP\r
- 开源贡献者:不想暴露个人编码习惯\r
\r
---\r
\r
## 二、三级混淆模型\r
\r
### Level 1: 基础防护\r
\r
**目标**: 去除敏感信息,保留风格\r
\r
| 策略 | 示例 |\r
|------|------|\r
| PII 脱敏 | `[email protected]` → `[email-removed]` |\r
| API Key 清理 | `api_key = "xxx"` → `api_key = "[REMOVED]"` |\r
| IP 泛化 | `192.168.1.100` → `[internal-ip]` |\r
| URL 泛化 | `https://git.company.com/...` → `https://github.com/...` |\r
| Git 作者匿名 | `Author: Wang` → `Author: Anonymous` |\r
\r
**适用场景**: 竞业展示、合规输出、面试代码样本\r
\r
---\r
\r
### Level 2: 深度混淆\r
\r
**目标**: 降低风格显著性,防止精准画像\r
\r
**继承 Level 1 全部功能,并新增**:\r
\r
| 策略 | 示例 |\r
|------|------|\r
| 词汇同义替换 | "实现" → "完成","优化" → "改进" |\r
| 句式重组 | "我们使用了 Redis" → "Redis 被采用" |\r
| 命名风格混入 | `userName` → `user_name`(30% 变量混入) |\r
| 时间戳偏移 | 提交时间 ± 随机偏移 |\r
| 决策噪声注入 | "修复性能问题" → "调整部分逻辑" |\r
| 格式化随机 | 微调缩进、空行分布 |\r
\r
**适用场景**: 离职保护、开源脱敏\r
\r
---\r
\r
### Level 3: 极致隐匿\r
\r
**目标**: 主动防御,注入噪声与伪特征\r
\r
**继承 Level 1 + 2 全部功能,并新增**:\r
\r
| 策略 | 技术原理 |\r
|------|----------|\r
| **风格注入** | 混入开源代码库的风格特征 |\r
| **伪特征注入** | 生成"假"的风格特征,误导蒸馏 |\r
| **决策反转** | 关键节点注入矛盾决策 |\r
| **反蒸馏水印** | 隐写术埋入追踪标记,检测是否被蒸馏 |\r
\r
**伪特征注入示例**:\r
- 用户实际习惯:使用 `forEach`,偏好简洁命名\r
- 注入伪特征:混入 `for...of` 循环,增加长命名变量\r
- 效果:蒸馏者会提取到"错误"的风格特征\r
\r
**反蒸馏水印**:\r
- 在代码中埋入独特的、不可见的标记\r
- 如果发现他人的 AI 输出包含这些标记,说明你的代码被蒸馏了\r
\r
**适用场景**: 高敏感项目、IP 保护、开源代码追踪\r
\r
---\r
\r
## 三、核心功能\r
\r
### 1. PII 智能检测与脱敏\r
\r
自动识别并脱敏:\r
- 个人标识:邮箱、姓名、手机、身份证\r
- 技术凭证:API Key、Token、密码\r
- 基础设施:IP 地址、内部 URL\r
- 业务敏感:客户名、项目代号\r
\r
**技术**: 正则 + NER + 自定义规则\r
\r
---\r
\r
### 2. 风格特征分析\r
\r
生成"风格指纹报告":\r
- 你的代码有哪些独特特征\r
- 这些特征有多显著(可被蒸馏的概率)\r
- 哪些特征是高风险的\r
\r
**分析维度**:\r
- 代码风格:命名习惯、缩进偏好、注释风格、函数长度\r
- 文档风格:句式结构、高频词汇、段落组织\r
- 决策风格:commit message 的表达方式\r
\r
---\r
\r
### 3. 三级混淆引擎\r
\r
一键处理,按需选择保护强度:\r
- Level 1:保留风格,去除敏感(合规场景)\r
- Level 2:降低风格显著性(离职场景)\r
- Level 3:主动防御(高敏感场景)\r
\r
---\r
\r
### 4. 混淆效果评估\r
\r
混淆后自动评估:\r
- 风格特征降低了多少\r
- 可蒸馏风险评分的变化\r
- 能力保留度(代码是否仍可运行)\r
\r
---\r
\r
### 5. 批量处理与导出\r
\r
- 支持整个 Git 仓库批量处理\r
- 增量处理(只处理新提交)\r
- 导出格式:Git 仓库、ZIP 包\r
\r
---\r
\r
## 四、使用方式\r
\r
### CLI 命令\r
\r
```bash\r
# 安装\r
pip install ghostshield\r
\r
# 基础用法\r
ghostshield --level=2 --input=./my-repo --output=./protected-repo\r
\r
# 查看风格分析报告\r
ghostshield analyze ./my-repo\r
\r
# 启用反蒸馏水印\r
ghostshield --level=3 --watermark=true --input=./my-repo\r
\r
# 评估混淆效果\r
ghostshield evaluate ./protected-repo --compare=./my-repo\r
```\r
\r
### 交互式使用\r
\r
```bash\r
ghostshield init\r
\r
🛡️ GhostShield - 反同事蒸馏防护盾\r
\r
请选择保护级别:\r
[1] 基础防护 - 去除敏感信息,保留风格(推荐用于合规输出)\r
[2] 深度混淆 - 降低风格特征,防止精准画像(推荐用于离职保护)\r
[3] 极致隐匿 - 注入噪声与伪特征,主动防御(推荐用于高敏感场景)\r
\r
请输入数据源路径: ./my-repo\r
\r
⏳ 处理中...\r
\r
✅ 防护完成!\r
📊 防护效果评估:\r
- PII 检测: 127 处已脱敏\r
- 风格特征降低: 68%\r
- 蒸馏相似度: 0.31 (原始 0.89)\r
- 能力保留度: 92%\r
\r
💾 输出位置: ./protected-repo\r
```\r
\r
---\r
\r
## 五、技术架构\r
\r
```\r
┌─────────────────────────────────────────────────────────┐\r
│                    GhostShield 架构                      │\r
├─────────────────────────────────────────────────────────┤\r
│  输入层       →    分析引擎    →    混淆引擎            │\r
│  - Git 仓库        - PII 检测      - Level 1/2/3       │\r
│  - 文件目录        - 风格分析      - 风格注入            │\r
│  - 单文件          - 风险评估      - 伪特征生成          │\r
│                                      ↓                  │\r
│                              ┌─────────────┐            │\r
│                              │  评估引擎   │            │\r
│                              │ - 效果度量  │            │\r
│                              │ - 报告生成  │            │\r
│                              └─────────────┘            │\r
│                                      ↓                  │\r
│                                 输出层                  │\r
│                              - Git 仓库                 │\r
│                              - ZIP 包                   │\r
│                              - 评估报告                 │\r
└─────────────────────────────────────────────────────────┘\r
```\r
\r
---\r
\r
## 六、定价策略\r
\r
### 免费开源(GPL v3)\r
\r
**全部功能免费**:\r
- Level 1-3 完整功能\r
- 无使用次数限制\r
- 源码完全开放\r
\r
**商业模式(可选)**:\r
- 企业版支持服务:¥50k/年\r
- 私有化部署咨询:按项目报价\r
- 定制化规则开发:¥2k/规则\r
\r
---\r
\r
## 七、与竞品对比\r
\r
| 维度 | colleague-skill | teammate-skill | **GhostShield** |\r
|------|-----------------|----------------|-----------------|\r
| **方向** | 提取风格 | 提取风格 | **混淆风格** |\r
| **用户** | 接收工作的人 | 团队知识管理 | **保护自己的人** |\r
| **痛点** | 知识传承 | 知识流失 | **隐私泄露、IP 被窃** |\r
| **市场** | 红海 | 红海 | **蓝海** |\r
| **道德** | 有争议 | 可能未经同意 | **正当(自我保护)** |\r
| **定价** | 付费 | 付费 | **免费开源** |\r
\r
---\r
\r
## 八、开发路线图\r
\r
### Phase 1: MVP(4 周)\r
\r
- ✅ PII 检测(正则 + presidio)\r
- ✅ Level 1 基础脱敏\r
- ✅ 简单的风格分析\r
- ✅ CLI 基础命令\r
\r
### Phase 2: 核心功能(6 周)\r
\r
- ✅ Level 2 深度混淆\r
- ✅ 风格指纹分析\r
- ✅ 混淆效果评估\r
- ✅ Git 仓库批量处理\r
\r
### Phase 3: 高级功能(8 周)\r
\r
- ✅ Level 3 极致隐匿\r
- ✅ 风格注入引擎\r
- ✅ 伪特征生成器\r
- ✅ 反蒸馏水印\r
\r
### Phase 4: 生态建设(持续)\r
\r
- 社区贡献风格库\r
- Web UI 界面\r
- 插件系统(VS Code / JetBrains)\r
- 多语言支持\r
\r
---\r
\r
## 九、目标用户\r
\r
| 用户群体 | 核心诉求 | 推荐级别 |\r
|----------|----------|----------|\r
| **离职员工** | 保护职业竞争力,防止被完美替代 | Level 2 |\r
| **竞业限制者** | 合规保护,避免技术风格泄露 | Level 1-2 |\r
| **技术大牛** | IP 保护,独特性维护 | Level 3 |\r
| **开源贡献者** | 开源代码风格保护 | Level 2-3 |\r
| **合规团队** | GDPR 合规,隐私保护 | Level 1 |\r
\r
---\r
\r
## 十、风险与应对\r
\r
### 技术风险\r
\r
| 风险 | 应对 |\r
|------|------|\r
| 混淆过度导致代码不可用 | 提供预览功能,显示"能力保留度"指标 |\r
| PII 检测遗漏 | 混合多种检测技术,提供人工复核 |\r
| Level 3 对抗生成效果不佳 | 先用规则实现,后续用 GAN 优化 |\r
\r
### 法律风险\r
\r
| 风险 | 应对 |\r
|------|------|\r
| 用户用于恶意目的 | 在 LICENSE 中明确使用限制 |\r
| 水印被破解 | 多种水印技术组合,定期更新算法 |\r
\r
---\r
\r
## 十一、推广策略\r
\r
### 开源社区驱动\r
\r
1. **GitHub 发布**: 开源全部代码,吸引 Star 和贡献者\r
2. **技术博客**: 撰写"如何防止你的代码风格被 AI 蒸馏"系列\r
3. **Hacker News / V2EX**: 发布产品,引发讨论\r
4. **Skill 市场上架**: ClawHub、SkillHub、SkillsBot\r
\r
### 借力竞品热度\r
\r
- 在 colleague-skill、teammate-skill 的讨论区推广\r
- 制作"提取 vs 防御"对比图\r
- 强调"你的代码正在被蒸馏"的紧迫感\r
\r
---\r
\r
## 十二、总结\r
\r
**GhostShield 是一个填补市场空白的创新 Skill**:\r
- ✅ 蓝海市场,无直接竞品\r
- ✅ 需求真实(离职、竞业、IP 保护)\r
- ✅ 技术可行(PII 检测 + 风格分析 + 对抗生成)\r
- ✅ 免费开源,社区驱动\r
\r
**核心价值**:\r
> "你的风格是你的 IP,不是别人的训练数据。"\r
\r
---\r
\r
**版本**: 1.0.0  \r
**作者**: 老杨 + AI Assistant  \r
**日期**: 2026-04-04  \r
**许可证**: GPL v3\r
Usage Guidance
This package appears coherent with its stated goal of repository-level obfuscation and watermarking, but exercise caution before running it on real code. Recommended steps: 1) Backup: Make a full backup (or work on a clone) of any repository you will process—the tool writes files and injects invisible markers. 2) Inspect dependencies: Open requirements.txt and validate each dependency and its versions before pip installing. Prefer to run the bundled code from a sandbox or VM rather than directly on critical systems. 3) Review watermark behavior: The obfuscator injects zero-width/unicode markers and writes a .ghostshield-watermark file. If you want to detect downstream distillation, verify what exactly is being injected and that it cannot be used to fingerprint or leak sensitive metadata. 4) Test on non-sensitive data: Run analyze/process/evaluate on a small test repo to confirm outputs, check that code remains runnable, and confirm no unexpected network calls or telemetry occur. 5) Audit missing/truncated code: Some parts of the bundle were truncated in the listing. Review the full source (especially obfuscator._inject_watermark and any code that writes files or invokes subprocess/network) to ensure there's no hidden exfiltration (HTTP requests, remote uploads, or credential exfil patterns). 6) Legal/ethical check: Level-3 features (fake-feature injection, decision reversal) can be misused; consider legal and team-policy implications before applying to codebases that are not solely your own. Also note the code is GPL-3.0—be aware of licensing obligations. If you are not comfortable auditing the full source, run the tool in an isolated environment and limit its use to non-sensitive repositories until you have validated its behavior.
Capability Analysis
Type: OpenClaw Skill Name: ghostshield Version: 1.0.0 GhostShield is a code and document obfuscation tool designed to protect personal coding styles from AI distillation. The bundle includes modules for PII detection (pii_detector.py), style analysis (style_analyzer.py), and multi-level obfuscation (obfuscator.py) using AST parsing, regex, and synonym replacement. While it performs file system operations and executes Git commands via subprocess, these actions are strictly aligned with its stated purpose of processing repositories, and no evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
Capability Tags
requires-oauth-token
Capability Assessment
Purpose & Capability
Name/description (anti-distillation, multi-level obfuscation) match the included modules: PIIDetector, StyleAnalyzer, Obfuscator, Validator and CLI. The code implements PII scanning, style fingerprinting, in-place repository/file obfuscation and watermark injection. There are no unrelated environment variables, remote service credentials, or unexpected binaries requested.
Instruction Scope
SKILL.md instructs CLI usage (analyze/process/evaluate) and references pip install, which is documentary rather than a provided install spec. The runtime instructions operate on local repo/file paths and to write modified files back to disk (expected for an obfuscator). A prompt-injection signal (unicode-control-chars) was detected in SKILL.md—this aligns with the watermarking feature that embeds zero-width characters, but the presence of hidden unicode characters in the skill metadata should be examined to ensure they are not trying to manipulate LLMs or hide behavior.
Install Mechanism
No install spec is present in the registry metadata (safe default). The bundle contains code and a requirements.txt; SKILL.md references 'pip install ghostshield' but there is no automated download-from-URL step in the package. This is lower-risk than arbitrary network downloads, but you should inspect requirements.txt and any upstream packaging before pip-installing.
Credentials
The skill requests no environment variables or credentials. PII detection rules include patterns for AWS/GitHub tokens and similar strings — this is appropriate for a PII scanner. The code uses local git commands (subprocess git log) and filesystem access, which is expected for analyzing repositories.
Persistence & Privilege
The skill is not always-enabled and does not request system-wide privileges. It will write files into the target repository (obfuscated files, a .ghostshield-watermark file and injected zero-width markers). That file-write behavior is consistent with the described watermarking/obfuscation features but is a persistent change to user data and should be treated with caution (backup before use).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ghostshield
  3. After installation, invoke the skill by name or use /ghostshield
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
GhostShield 1.0.0 — 首个版本发布 - 创新推出“反同事蒸馏防护盾”工具,保护代码风格、防止AI精准蒸馏 - 提供三级混淆模型:基础防护、深度混淆、极致隐匿,满足不同防护强度 - 支持 PII 智能检测与脱敏、风格特征分析、自动混淆与效果评估 - 一键处理 Git 仓库,支持批量/增量处理与多种导出格式 - 开源、免费全部功能,专为离职保护、IP 防护及合规需求设计
Metadata
Slug ghostshield
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is GhostShield?

反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。 It is an AI Agent Skill for Claude Code / OpenClaw, with 134 downloads so far.

How do I install GhostShield?

Run "/install ghostshield" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is GhostShield free?

Yes, GhostShield is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does GhostShield support?

GhostShield is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created GhostShield?

It is built and maintained by 13770626440 (@13770626440); the current version is v1.0.0.

💬 Comments