Skip to content
Cloud & Infrastructure
Skill

/manage-data-classification

管理 Dataphin 数据分级、数据分类目录、数据分类和字段级安全识别结果。 当用户要把手机号、身份证号、姓名、薪资等字段标记为 C1/C2/C3/C4 或 L1/L2/L3/L4,创建或调整分类分级体系,查询字段当前分类分级标签,或批量启停/删除识别结果时进入。 触发词:数据分级分类、分类分级、数据分类、数据分级、安全等级、敏感数据标签、识别结果、identify result、security classify、security level、C1、C2、C3、C4、L1、L2、L3、L4。 关键限制:公共 OpenAPI

From plugin
alibabacloud-aiops-skills
213200 skills
Install
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill manage-data-classification --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/manage-data-classification

Context preview

The summary Claude sees to decide when to auto-load this skill.

管理 Dataphin 数据分级、数据分类目录、数据分类和字段级安全识别结果。 当用户要把手机号、身份证号、姓名、薪资等字段标记为 C1/C2/C3/C4 或 L1/L2/L3/L4,创建或调整分类分级体系,查询字段当前分类分级标签,或批量启停/删除识别结果时进入。 触发词:数据分级分类、分类分级、数据分类、数据分级、安全等级、敏感数据标签、识别结果、identify result、security classify、security level、C1、C2、C3、C4、L1、L2、L3、L4。 关键限制:公共 OpenAPI

SKILL.md

manage-data-classification.SKILL.md
name: manage-data-classification
description: |-
  管理 Dataphin 数据分级、数据分类目录、数据分类和字段级安全识别结果。
  当用户要把手机号、身份证号、姓名、薪资等字段标记为 C1/C2/C3/C4 或 L1/L2/L3/L4,创建或调整分类分级体系,查询字段当前分类分级标签,或批量启停/删除识别结果时进入。
  触发词:数据分级分类、分类分级、数据分类、数据分级、安全等级、敏感数据标签、识别结果、identify result、security classify、security level、C1、C2、C3、C4、L1、L2、L3、L4。
  关键限制:公共 OpenAPI 管理的是分级、分类、识别结果三层对象;字段打标用 create-security-identify-result;批量覆盖需确认 conflict-strategy;写操作需 HITL 确认。

数据分级分类 Skill

1. Scenario Description

在 Dataphin 数据安全中管理「数据分级分类(Data Classification)」体系,用于对敏感字段进行识别、标记和安全等级划分。例如将 `id_card` 标记为 C4-绝密,将 `phone` 标记为 C3-机密,将 `user_name` 标记为 C2-内部,为后续脱敏、权限审批、资产目录展示和安全审计提供依据。

本 Skill 基于 `dataphin-public` 已开放的数据安全 OpenAPI 实现三层对象管理:

  • **数据分级(Security Level)**:描述敏感程度,如 C1/C2/C3/C4 或 L1/L2/L3/L4。
  • **数据分类(Security Classify)**:描述业务类别,如身份证号、手机号、姓名,并绑定一个分级。
  • **安全识别结果(Security Identify Result)**:将某个表字段绑定到某个分类,形成实际字段标签。

页面内部 `/api/datasecurity/classify/addClassify`、`/api/datasecurity/level/queryLevel`、`/api/datasecurity/identify/record/queryPagedIdentifyLabels` 等 REST 可用于理解业务语义,但不是外部 Skill 的直接命令入口;外部执行必须优先使用公开 `dataphin-public` CLI。

**Architecture**:`Dataphin Tenant → Security Level → Security Classify Catalog → Security Classify → Field Identify Result → List / Get / Enable / Disable / Delete`

涉及 Dataphin OpenAPI

  • `CreateSecurityLevel` / `UpdateSecurityLevel` / `DeleteSecurityLevel` / `GetSecurityLevel` — 管理数据分级。
  • `CreateSecurityClassifyCatalog` / `UpdateSecurityClassifyCatalog` / `DeleteSecurityClassifyCatalog` — 管理分类目录。
  • `CreateSecurityClassify` / `UpdateSecurityClassify` / `DeleteSecurityClassify` / `GetSecurityClassify` — 管理数据分类。
  • `CreateSecurityIdentifyResult` / `GetSecurityIdentifyResult` / `ListSecurityIdentifyResults` / `ListSecurityIdentifyRecords` — 管理和查询字段识别标签。
  • `UpdateSecurityIdentifyResultStatus` / `DeleteSecurityIdentifyResults` — 批量启停或删除识别结果。

> `GetSecuritySecretKey` 属于密钥管理,不属于本 Skill 的数据分级分类主链路,避免混入。

2. Installation

aliyun plugin install --names aliyun-cli-dataphin-public

各操作系统一键安装脚本与版本要求详见 [references/cli-installation-guide.md](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** 读取、回显或打印凭证环境变量(禁止对 AccessKey ID / Secret 做任何输出或日志) > - **NEVER** ask the user to input AK/SK directly in the conversation or command line > - **NEVER** use `aliyun configure set` with literal credential values > - **ONLY** use `aliyun configure list` to check credential status > > ```bash > aliyun configure list > ``` > Check the output for a valid profile (AK, STS, or OAuth identity). > > **If no valid profile exists, STOP here.**

**Pre-check: Aliyun CLI >= 3.4.8 required** > Run `aliyun version` to verify >= 3.4.8.

**Pre-check: Aliyun CLI plugin update required** > [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date.

5. RAM Policy

最小权限策略详见 [套件级 RAM 策略](../../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: > 1. Read `../../ram-policies.md` to get the full list of permissions required by this SKILL > 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions > 3. 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.

执行任何写操作(create / update / delete / enable / disable)前必须向用户确认以下参数,禁止静默提交:

| 参数 | 必填 | 描述 | 默认值 | |---|---|---|---| | `--tenant-id` | 是 | 租户 ID(大整数,建议字符串传) | — | | `--security-level-name` | 创建/更新/删除分级时必填 | 分级名称,如 C4-绝密、L3 | — | | `--index` | 获取分级必填,创建/更新/删除分级可选 | 分级顺序或敏感等级;数值越高通常表示敏感程度越高,需以租户实际配置为准 | — | | `--security-classify-name` | 创建/更新/删除分类时必填 | 分类名称,如 身份证号、手机号 | — | | `--level-name` | 创建/更新分类必填 | 分类绑定的数据分级名称 | — | | `--parent-path` | 分类/目录可选 | 分类目录父路径,根目录为 `/` | `/` | | `--priority` | 分类可选 | 分类优先级,默认 5;多规则命中时可能影响最终标签 | `5` | | `--advanced-condition-list` | 分类可选 | 高级识别条件,CLI list,每个元素建议传 JSON 对象 | — | | `--feature-name-list` | 分类可选 | 引用的识别特征名称列表 | — | | `--table-catalog` | 识别结果必填 | 表 Catalog;数据源表为 db/schema,Dataphin 物理表为项目英文名,逻辑表为板块英文名 | — | | `--table-name` / `--field-name` | 识别结果必填 | 目标表名与字段名 | — | | `--classify-id` | 识别结果必填 | 分类 ID;创建识别结果前需先确认分类详情 | — | | `--conflict-strategy` | 创建识别结果必填 | `COVER_UNLOCKED` 仅覆盖未锁定标签;`COVER_ALL` 覆盖线上全部打标,风险更高 | 推荐 `COVER_UNLOCKED` | | `--enable` | 创建或更新识别结果状态可选/必填 | 是否生效,true/false | true | | `--identify-result-id-list` | 批量启停/删除必填 | 识别结果 ID 列表 | — | | `--is-datasource-table` | 数据源表场景可选 | true 表示数据源表;false 表示 Dataphin 表 | false | | `--datasource-name` / `--datasource-env` | 数据源表场景必填 | 数据源名称与环境标识 | — |

7. Observability (MUST follow for every aliyun command)

**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/manage-data-classification/{session-id}

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/manage-data-classification/$SESSION_ID"

# 1) 查询已有识别结果,先确认是否已经打标。
aliyun dataphin-public list-security-identify-re
Read more
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Get the whole plugin

Other skills on alibabacloud-aiops-skills.