by xiaYuTian11
数据面具 Data Maskit — 专为大模型打造的本地隐私脱敏网关(请求自动打码,回复流式还原;支持 Cursor / Claude Code / Codex / Pi 等任意可配 Base URL 工具)
# Add to your Claude Code skills
git clone https://github.com/xiaYuTian11/maskitmaskit is an open-source data processing skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by xiaYuTian11. 数据面具 Data Maskit — 专为大模型打造的本地隐私脱敏网关(请求自动打码,回复流式还原;支持 Cursor / Claude Code / Codex / Pi 等任意可配 Base URL 工具). It has 126 GitHub stars.
maskit's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/xiaYuTian11/maskit" and add it to your Claude Code skills directory (see the Installation section above).
maskit is primarily written in Python. It is open-source under xiaYuTian11 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other Data Processing skills you can browse and compare side by side. Open the Data Processing category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh maskit against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
当你在使用 Cursor、Claude Code、Codex、Pi、OpenCode、ChatGPT 或任意 AI 编程助手 时,代码中的高危敏感信息往往在不知不觉中被发送到外部模型服务商:
sk-proj-...、ghp_...、云厂商 AccessKey、JWT Token、PEM 私钥证书;mysql://root:Pass123@192.168.1.50:3306/db)、私有 IP 地址(10.x / 172.16.x / 192.168.x);Maskit 的使命:在你的开发终端与外部 AI 服务之间架设一道透明的“本地隐私防护网关”——请求出网前在本地自动打码成结构化占位符,模型回答时毫秒级流式无感还原成原文!
| 阶段 | 内容样例 | 实际效果说明 |
|---|---|---|
| 你的实际输入 | 排查数据库:mysql://root:Pass123@192.168.1.50:3306/db,联系人李四 13800138000 |
包含高危数据库密码与真实联系电话 |
| 大模型收到的内容 | 排查数据库:{{CONNSTR_zkpmqx}},联系人{{TERM_fnqtsw}} {{PHONE_bcdfgh}} |
敏感信息全被替换,外部大模型完全看不到真实数据 |
| 模型生成的回答 | 建议检查 {{CONNSTR_zkpmqx}} 的网络连通性,并让 {{TERM_fnqtsw}} 核对账号权限 |
模型围绕占位符正常理解、推理与作答 |
| 你最终看到的输出 | 建议检查 mysql://root:Pass123@192.168.1.50:3306/db 的网络连通性,并让 李四 核对账号权限 |
本地毫秒级无感还原,开发体验完全不受影响! |
text/event-stream 流式响应,逐事件还原下发;18701 对应 OpenAI、18703 对应 Anthropic),只需在工具中将 base_url 改为本地端口,无需向操作系统安装自签名 CA 根证书;| 控制台概览 (Dashboard) | 客户端多端口管理 (Clients) |
|---|---|
![]() |
![]() |
| 实时拦截日志 (Logs) | 敏感词库与正则 (Words) |
![]() |
![]() |
| 数据统计与成本看板 (Stats) | 安全审计中心 (Audit) |
![]() |
![]() |
接入极简:在你的任意工具中,只需把 API Base URL 改为 Maskit 对应的本地端口即可!
默认端口映射:OpenAI 协议
http://127.0.0.1:18701/v1| DeepSeek 协议http://127.0.0.1:18702/v1| Anthropic 协议http://127.0.0.1:18703(可自由添加修改)
打开 Cursor → Settings → Models:
http://127.0.0.1:18701/v1http://127.0.0.1:18703export ANTHROPIC_BASE_URL="http://127.0.0.1:18703"
claude
通过环境变量指定本地代理端口即可无感打码:
# Linux / macOS
export OPENAI_BASE_URL="http://127.0.0.1:18701/v1"
export OPENAI_API_KEY="your-api-key"
# Windows PowerShell
$env:OPENAI_BASE_URL = "http://127.0.0.1:18701/v1"
$env:OPENAI_API_KEY = "your-api-key"
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:18701/v1",
api_key="your-api-key"
)
# 正常调用,全链路自动本地打码与流式还原
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "排查数据库连接:mysql://root:Pass123@192.168.1.100:3306"}]
)
print(response.choices[0].message.content)
https://api.your-relay.com);18709);/v1/chat/completions 等),直接按需勾选即可;http://127.0.0.1:18709/v1 即可正常使用!Maskit_<版本>_x64-setup.exe 安装包;无需下载源码,直接拉取 GitHub 官方预构建的多架构镜像(原生支持 linux/amd64 与 linux/arm64),内嵌完整 Web 控制台:
docker run -d \
--name maskit \
--restart unless-stopped \
-p 127.0.0.1:5801:5801 \
-p 127.0.0.1:18701:18701 \
-v maskit_data:/data \
-e MASKIT_PANEL_TOKEN="YourSecretToken123456" \
ghcr.io/xiayutian11/maskit:latest
💡 端口映射与网络访问说明:
5801:Web 控制台端口(必开),用于查看仪表盘、管理规则与客户端配置;18701起:大模型反代端口(按需开启)。例如默认 18701 对应 OpenAI、18702 对应 DeepSeek。用几个客户端就开几个端口(如仅用一个就只映射 18701,用三个就-p 127.0.0.1:18701-18703:18701-18703),不要盲目映射一大排无用端口;- 访问地址绑定:若服务器前置有 Nginx 或仅供本机访问,推荐绑定
-p 127.0.0.1:5801:5801;若内网/局域网直接通过 IP 访问容器,去掉127.0.0.1:前缀改为-p 5801:5801 -p 18701:18701;- 控制台令牌(密码):
-e MASKIT_PANEL_TOKEN="YourSecretToken123456"必须为 ≥16 位纯 ASCII 字符(请勿包含中文字符,否则引擎将安全回退为启动日志随机 token)。
浏览器打开 http://<服务器IP>:5801 即可直接访问,并在弹出的登录窗口中输入你设置的密码即可管理(亦可使用 http://<服务器IP>:5801/#token=<你的密码> 快捷免密进入,fragment 不随请求发送、不会进代理访问日志,进入后 Token 会自动从地址栏抹除)。
安全建议与反向代理(Nginx 配置参考): 默认绑定
127.0.0.1本机回环,保护代理端口不直接暴露到公网。若在外部通过 Nginx 挂域名并配置 TLS 反代,Docker 启动时请务必添加环境变量-e MASKIT_TRUST_PROXY=1(使面板信任前置 Nginx 传递的X-Forwarded-Proto: https头部,防止 API 请求被 Origin 校验拦截),参考配置如下:server { listen 443 ssl; server_name maskit.example.com; # ssl 证书配置省略... # 1. 控制面板(直接访问域名,在弹出的窗口输入 Token 登录) location / { proxy_pass http://127.0.0.1:5801; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # 关键:告知后端外部协议为 https proxy_set_header X-Forwarded-Host $host; } # 2. 模型反代端口(如 OpenAI,关闭缓存保证打字机流式顺畅;建议配合内网白名单) location /openai/ { proxy_pass http://127.0.0.1:18701/; proxy_set_header Host $host; proxy_buffering off; proxy_read_timeout 600s; } }
git clone https://github.com/xiaYuTian11/maskit.git
cd maskit
# 1. 安装核心依赖
pip install -r requirements.txt
# 2. 构建前端并启动引擎(若仅需控制台 API,可跳过前端构建)
cd frontend && npm install && npm run build && cd ..
python engine/panel.py
# 3. 前端界面二次开发(Vite 热重载,推荐)
cd frontend && npm run dev
489926214(欢迎加入交流讨论,获取最新规则与版本动态);Data Maskit 基于 GNU AGPL-3.0 许可证发布。个人开发者、研究人员及开源项目均可完全免费使用。如需在闭源商业产品中分发或集成,请遵循 AGPL-3.0 相关条款。