manage-data-masking
БесплатноБез исполняемых скриптовНе проверен管理 Dataphin 数据脱敏规则配置的需求拆解、前置分类分级检查和公开 API 覆盖边界。 当用户要给手机号、身份证号、邮箱、姓名等敏感字段配置掩码、加密、哈希、保留首尾、白名单绕过或验证查询脱敏效果时进入。…
от aliyun★ 303 звезды на GitHubОб этом скилле
数据脱敏规则配置 Skill
1. Scenario Description
在 Dataphin 数据安全中,数据脱敏规则用于在即席查询、读写开发、资产访问等场景中保护敏感字段,例如手机号中间四位打星、身份证号保留首尾、邮箱 @ 前遮盖、哈希或保留格式加密。
本 Skill 处理三类工作:
- 需求拆解:把自然语言中的字段、脱敏算法、作用场景、白名单和验证口径整理成可执行参数清单。
- 公开前置检查:使用
dataphin-public已开放的数据分级分类命令确认目标字段是否已存在安全识别标签,因为脱敏规则通常依赖分类或分级。 - 能力边界提示:当前公开 CLI 未暴露脱敏规则 CRUD / 白名单 / 默认配置 API;不要把页面内部
/api/datasecurity/desensitization/...REST 当作外部命令执行。
Architecture:Tenant → Security Classify → Field Identify Result → Masking Requirement → Public API Gap / Internal REST Reference
当前公开 OpenAPI 覆盖
可通过公开 CLI 做的前置检查:
ListSecurityIdentifyResults/GetSecurityIdentifyResult— 查询目标字段是否已有分类分级标签。ListSecurityIdentifyRecords— 查询目标字段识别记录与分类状态。GetSecurityClassify— 回读分类与分级绑定信息。
未在当前公开 CLI / swagger 暴露的脱敏能力:
- 创建、更新、启停、删除动态脱敏规则。
- 创建、启停、删除脱敏白名单规则。
- 更新默认脱敏配置。
- 查询脱敏规则详情、按分类查询规则、验证脱敏效果。
2. Installation
aliyun plugin install --names aliyun-cli-dataphin-public
各操作系统一键安装脚本与版本要求详见 references/cli-installation-guide.md。
3. Environment Variables
凭证与环境变量由父 skill
alibabacloud-dataphin-skills统一声明并预检(父 §3 + §4 Authentication + §8 Step 0,先于路由到本 skill 执行);本 skill 不重复声明。
4. Authentication
Pre-check: Alibaba Cloud Credentials Required
Security Rules:
- NEVER 读取、回显或打印凭证环境变量
- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
aliyun configure setwith literal credential values- ONLY use
aliyun configure listto check credential statusaliyun configure listCheck the output for a valid profile.
If no valid profile exists, STOP here.
Pre-check: Aliyun CLI >= 3.4.8 required
Run
aliyun versionto verify >= 3.4.8. If not installed or version too low, install/update from https://aliyuncli.alicdn.com (see references/cli-installation-guide.md).
Pre-check: Aliyun CLI plugin update required
[MUST] run
aliyun configure set --auto-plugin-install trueto enable automatic plugin installation. [MUST] runaliyun plugin updateto ensure that any existing plugins are always up-to-date.
5. RAM Policy
最小权限策略详见 ../../ram-policies.md。
[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
../../ram-policies.mdto get the full list of permissions required by this SKILL- Use
ram-permission-diagnoseskill to guide the user through requesting the necessary permissions- Pause and wait until the user confirms that the required permissions have been granted
6. Parameter Confirmation
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| 参数 | 必填 | 描述 | 默认值 |
|---|---|---|---|
--tenant-id |
是 | 租户 ID(大整数,建议字符串传) | — |
--table-catalog |
是 | 表 Catalog;逻辑表通常为板块英文名,物理表为项目英文名,数据源表为 db/schema | — |
--table-name |
是 | 目标表名 | — |
--field-name |
是 | 需要脱敏的字段名,如 phone、id_card、email |
— |
--classify-id |
脱敏规则执行前必需 | 字段所属数据分类 ID;公开 CLI 只能回读/验证,不能创建脱敏规则 | — |
algorithmCode |
需求清单必需 | 脱敏算法,如 MASK、MD5、FPE_FF1_ENCRYPT、NO_MASK 等,以租户实际枚举为准 |
— |
ruleScopes |
需求清单必需 | 作用范围,如业务板块、项目、平台、场景、账号、表范围 | — |
whiteListAccount |
白名单场景必需 | 允许绕过脱敏的账号 | — |
effectiveDateRange |
白名单场景必需 | 白名单生效起止日期 | — |
7. Observability (MUST follow for every aliyun command)
版本 {version}(Shell 变量 SKILL_VERSION)来自套件 references/manifest.json 的 version 字段,与 session-id 一同继承父技能 §7。直接加载本子技能时先完成父层初始化;所有 CLI / SDK 调用使用父技能名称与同一版本,跨 Shell 调用须重新注入这些值。
session-id 由父 skill alibabacloud-dataphin-skills 在套件入口加载时生成(32-char 小写 hex),本子 skill 加载时直接继承同一 session-id,不再重新生成。
Rule: Every aliyun CLI command that calls a cloud API MUST include the --user-agent flag.
Local utility commands (e.g. configure, plugin, version) do not support this flag and should be excluded.
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/{session-id} skill-version/{version}"
Do not skip, alter the format, or omit --user-agent on any aliyun API command invocation.
8. Core Workflow
TENANT_ID="<大整数租户 ID,字符串>"
SESSION_ID="<inherited from alibabacloud-dataphin-skills>"
UA="AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/$SESSION_ID skill-version/$SKILL_VERSION"
# 1) 核对版本感知 OpenAPI 索引与本 Skill 使用的公开前置检查命令。
# 当前索引没有脱敏规则 CRUD;不要拉取裸 dataphin-public --help 全量输出。
aliyun dataphin-public list-security-identify-results --help
aliyun dataphin-public list-security-identify-records --help
aliyun dataphin-public get-security-classify --help
# 2) 查询目标字段是否已有分类分级标签。没有标签时,应提示先完成字段分类分级。
# 识别结果数组在 .PageResult.SecurityIdentifyResultList[],提取用:
# ... --cli-query 'P
Установить manage-data-masking в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл manage-data-masking?
管理 Dataphin 数据脱敏规则配置的需求拆解、前置分类分级检查和公开 API 覆盖边界。 当用户要给手机号、身份证号、邮箱、姓名等敏感字段配置掩码、加密、哈希、保留首尾、白名单绕过或验证查询脱敏效果时进入。 触发词:数据脱敏、脱敏规则、动态脱敏、字段脱敏、手机号打星、身份证脱敏、邮箱脱敏、白名单、desensitize、masking、mask、FPE、MD5、NO_MASK。 关键限制:当前 dataphin-public CLI 和版本感知 OpenAPI 索引未暴露脱敏规则 CRUD;本 Skill 不伪造内部 REST 为外部命令,只执行公开分类分级前置检查并输出可交付参数清单。
Как установить скилл manage-data-masking?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл manage-data-masking запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic