Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

manage-asset-attributes

БесплатноЗапускает вложенные скриптыНе проверен

查询资产类型下可用的自定义属性定义,并按 GUID 批量覆盖写资产属性值(数据开发工作流回写资产画像的典型场景)。 当用户场景涉及 资产自定义属性、属性回写、批量更新属性、资产打标、工作流回写画像 时进入。…

aliyunот aliyun★ 303 звезды на GitHub

Об этом скилле

资产自定义属性管理(查询定义 + 批量覆盖写)

1. Scenario Description

围绕 Dataphin 资产目录的「自定义属性」做两件事:

  1. 查可用属性定义(GetAssetTypeAttributeCodes):按资产类型(TABLE / COLUMN)拿到该类型下所有可填属性的编码、输入方式、枚举值、超链接目标、最大长度等元信息 —— 决定后续能写哪些属性、值怎么填。
  2. 批量覆盖写属性值(UpdateAssetAttributes):对一批资产 GUID 一次性写入 / 覆盖 / 清空自定义属性值,返回逐条成功/失败与整体统计。

典型用于数据开发或治理工作流回写资产画像:任务跑完后,把「负责人、数据密级、上架说明、外部链接」等结果写回对应表/字段的自定义属性。

Architecture:Dataphin Tenant → Asset(GUID: TABLE/COLUMN) → AssetAttribute(AttributeCode + Values[])。

属性值查询(回读校验)请配合只读子 skill query-asset-details(GetAssetAttributes)使用。

2. Installation

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

(详见 references/cli-installation-guide.md)

命令收录说明:本组 Action(GetAssetTypeAttributeCodes / UpdateAssetAttributes)为 V6.3 新增,若当前 aliyun dataphin-public --help 未列出对应 kebab-case 命令,说明本地插件版本偏低,请先 aliyun plugin update;仍未收录时用 §8 的 OpenAPI SDK 兜底路径调用(API 版本 2023-06-30)。

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 read, print, or expose AK/SK values in the conversation or logs
  • 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
aliyun configure list

Check the output for a valid profile (AK, STS, or OAuth identity).

If no valid profile exists, STOP here.

  1. Obtain credentials from Alibaba Cloud Console
  2. Configure credentials outside of this session (via aliyun configure in terminal or environment variables in shell profile)
  3. Return and re-run after aliyun configure list shows a valid profile

Pre-check: Aliyun CLI >= 3.3.3 required

Run aliyun version to verify >= 3.3.3. If not installed or version too low, install/update from https://aliyuncli.alicdn.com (see references/cli-installation-guide.md for the OS-specific script).

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

最小权限策略详见 references/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 references/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 (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.

参数 必填 描述 默认值
OpTenantId 是 操作租户 ID(19 位 snowflake,字符串传) —
AssetType 是(查定义) 资产类型枚举:TABLE / COLUMN —
Guid 是(写入) 资产 GUID,如 odps.<tenant>.<project>.<table> —
AttributeCode 是(写入) 属性编码,来自 GetAssetTypeAttributeCodes 返回 —
Values 是(写入) 属性值数组;[] 表示清空该属性 —

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-devops 在套件入口加载时生成(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}"

SDK 兜底路径(§8)请把同一字符串设置到 OpenAPI Client 的 user_agent 配置项,保持可观测性一致。

8. Core Workflow

OP_TENANT_ID="<19 位租户 ID 字符串>"
SESSION_ID="<inherited from alibabacloud-dataphin-devops>"
UA="AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/$SESSION_ID skill-version/$SKILL_VERSION"

Step 1 · 查可用属性定义(GetAssetTypeAttributeCodes,只读)

CLI(插件收录后):

aliyun dataphin-public get-asset-type-attribute-codes \
  --OpTenantId "$OP_TENANT_ID" \
  --AssetType TABLE \
  --user-agent "$UA"

返回 Data 为属性定义扁平数组,每个元素关键字段:


Полный SKILL.md на GitHub

Установить manage-asset-attributes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/acceptance-criteria.mdreferences/cli-installation-guide.mdreferences/ram-policies.mdreferences/related-commands.mdscripts/asset_attr_shelve.pyscripts/dataphin_asset_api.py

FAQ

Что делает скилл manage-asset-attributes?

查询资产类型下可用的自定义属性定义,并按 GUID 批量覆盖写资产属性值(数据开发工作流回写资产画像的典型场景)。 当用户场景涉及 资产自定义属性、属性回写、批量更新属性、资产打标、工作流回写画像 时进入。 触发场景:查某类资产(TABLE/COLUMN)有哪些可填属性;把加工/治理结果批量写回资产属性(覆盖写,支持清空);任务结束后回写负责人/密级/上架说明等。 触发词:资产属性、自定义属性、属性回写、批量更新属性、update-asset-attributes、get-asset-type-attribute-codes、AssetAttribute、资产打标。 关键限制:InputMode(CUSTOM_INPUT/DROPDOWN_SINGLE/DROPDOWN_MULTI/HYPERLINK)决定 Values 校验;写入为覆盖(Upsert)语义,Values=[] 表示清空;单次批量 ≤ 50 条;19 位 ID 必须字符串。

Как установить скилл manage-asset-attributes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл manage-asset-attributes запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить manage-asset-attributes с