mitools-desensitize

数据脱敏工具,支持手机号、身份证、银行卡、邮箱、IP地址、中文姓名等多种敏感信息脱敏

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "mitools-desensitize" with this command: npx skills add bianchengyy/mitools-desensitize

数据脱敏工具 (mitools-desensitize)

基于正则表达式的数据脱敏工具,支持多种敏感信息类型的自动识别和脱敏处理。

功能特性

  • 📱 手机号脱敏 - 保留前3位和后3位,中间用*号替代
  • 🆔 身份证号脱敏 - 保留前3位和后3位,中间用*号替代
  • 💳 银行卡脱敏 - 保留前2位,其余用*号替代
  • 📧 邮箱脱敏 - 保留前2位,后面用***替代
  • 👤 中文姓名脱敏 - 保留姓氏,后面用**替代
  • 🌐 IP地址脱敏 - 替换为伪IP地址(139.1.2.xxx)
  • 📁 路径用户名脱敏 - 替换路径中的用户名为demo01/demo02等
  • 🔢 长串数字脱敏 - 6位以上连续数字替换为等长伪数字
  • 📝 字段名脱敏 - 敏感字段名首字保留,后面用**替代
  • 🔄 通配符规则 - 支持自定义通配符替换规则
  • ↩️ 数据还原 - 支持根据映射表还原脱敏数据

使用方法

1. 对文本进行脱敏

脱敏 <文本内容>

示例:

脱敏 张三的手机号是13812345678,邮箱是zhangsan@example.com

2. 对文件进行脱敏

脱敏文件 <文件路径>

示例:

脱敏文件 ./user_data.log

3. 根据映射还原数据

脱敏还原 <脱敏后文本> <映射JSON>

示例:

脱敏还原 "张**的手机号是138*****678" '{"username": {"张三": "demo01"}}'

4. 查看支持的脱敏规则

脱敏规则列表

支持的脱敏规则

规则名称说明示例
phone手机号脱敏13812345678 → 138*****678
idcard身份证号脱敏110101199001011234 → 110******234
bankcard银行卡脱敏6222021234567890123 → 62** **** **** **** ***
email邮箱脱敏zhangsan@example.com → zh***@***.com
chinese_name中文姓名脱敏张三 → 张**
ipIP地址脱敏192.168.1.1 → 139.1.2.100
path_user路径用户名脱敏/home/zhangsan → /home/demo01
digit_sequence长串数字脱敏1234567890 → 0000000001
chinese_field字段名脱敏手机号 → 手**
wildcard通配符规则dev*23 → dev31

配置文件

工具会自动生成 desensitize_config.json 配置文件,包含:

  • levels: 脱敏级别配置,定义应用哪些规则
  • wildcard_rules: 通配符替换规则
  • custom_rules: 自定义正则规则

使用场景

  • 日志脱敏 - 清理生产环境日志中的敏感信息
  • 数据分享 - 脱敏后分享给第三方
  • 测试数据 - 生成脱敏的测试数据集
  • 文档处理 - 清理文档中的敏感信息

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated