alibabacloud-bailian-m…
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
重跑 Dataphin 调度任务实例,支持两种模式:①单实例/批量重跑(operate-instance RERUN);②重跑下游链路(fix-data,联动重跑根实例及所有下游)。触发场景:周期实例失败需要重跑 / rerun / 重跑实例 / operate-instance / fix-data / 重跑下游 / 修复链路数据 / 实例恢复 / 任务运维。模式①流程:list-projects → list-instances → operate-instance(RERUN) → get-physical-instance-log
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill rerun-task-instance --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rerun-task-instanceContext preview
The summary Claude sees to decide when to auto-load this skill.
重跑 Dataphin 调度任务实例,支持两种模式:①单实例/批量重跑(operate-instance RERUN);②重跑下游链路(fix-data,联动重跑根实例及所有下游)。触发场景:周期实例失败需要重跑 / rerun / 重跑实例 / operate-instance / fix-data / 重跑下游 / 修复链路数据 / 实例恢复 / 任务运维。模式①流程:list-projects → list-instances → operate-instance(RERUN) → get-physical-instance-log
name: rerun-task-instance
description: |
重跑 Dataphin 调度任务实例,支持两种模式:①单实例/批量重跑(operate-instance RERUN);②重跑下游链路(fix-data,联动重跑根实例及所有下游)。触发场景:周期实例失败需要重跑 / rerun / 重跑实例 / operate-instance / fix-data / 重跑下游 / 修复链路数据 / 实例恢复 / 任务运维。模式①流程:list-projects → list-instances → operate-instance(RERUN) → get-physical-instance-log 验证。模式②流程:list-instances → fix-data(--root-instance-id) → get-physical-instance-log 验证 taskrun。关键点:实例必须属于指定的 project-id;bizdate 默认 T-1;fix-data 的 --root-instance-id 必须传 JSON 对象 {"Id":"t_xxx"};fix-data 不创建新实例而是创建新 taskrun,验证需查 taskrun 日志。触发词:重跑实例、rerun、任务重跑、operate-instance、fix-data、重跑下游、修复链路数据、实例恢复、补跑实例。场景:已发布/运行的周期任务在某个业务日期的实例状态异常(FAILED、WAIT_SCHEDULE 超时、被 PAUSE 等),需要手动触发重新执行。
本 Skill 支持两种重跑模式:
模式①(单实例重跑): 用户请求 → 确认参数 → 遍历项目定位实例 → operate-instance RERUN → 查询实例状态 → 若失败则拉日志诊断 → 输出结论 模式②(重跑下游链路): 用户请求 → 确认参数 → 定位根实例 → fix-data(--root-instance-id, --downstream-range) → 查询各实例 taskrun 日志 → 验证重跑结果 → 输出结论
涉及 Dataphin OpenAPI:
# 安装 aliyun CLI(>= 3.4.8) # 各操作系统一键安装脚本见 ./references/cli-installation-guide.md # 安装 dataphin-public 插件 aliyun plugin install --names aliyun-cli-dataphin-public # 验证 aliyun dataphin-public --help
详见 [CLI 安装指南](./references/cli-installation-guide.md)。
> 凭证与环境变量由父 skill `alibabacloud-dataphin-skills` 统一声明并预检(父 §3 + §4 Authentication + §8 Step 0,先于路由到本 skill 执行);本 skill 不重复声明。
> **Security Rules:** > - **NEVER** 读取、回显或打印凭证环境变量(禁止对 AccessKey ID / Secret 做任何输出或日志) > - **NEVER** 要求用户在本会话或命令行直接输入 AK/SK > - **NEVER** 使用 `aliyun configure set` 写入字面量凭证 > - **ONLY** 使用 `aliyun configure list` 检查凭证状态 > > ```bash > aliyun configure list > ``` > 检查输出中是否存在有效 profile(AK、STS 或 OAuth 身份)。 > > **如果没有有效 profile,请在此停止。** > 1. 从 [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak) 获取凭证 > 2. 在会话外配置(终端执行 `aliyun configure`,或在 shell profile 中设置环境变量) > 3. 重新运行 `aliyun configure list` 确认有效后再继续
> 运行 `aliyun version` 确认版本 >= 3.4.8。若未安装或版本过低,从 https://aliyuncli.alicdn.com 安装/升级(见 `references/cli-installation-guide.md`)。
> [MUST] 运行 `aliyun configure set --auto-plugin-install true` 开启自动插件安装。 > [MUST] 运行 `aliyun plugin update` 确保插件为最新版本。
> **[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
本 Skill 涉及的最小权限:
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dataphin:ListProjects",
"dataphin:ListInstances",
"dataphin:OperateInstance",
"dataphin:FixData",
"dataphin:GetPhysicalInstance",
"dataphin:GetPhysicalInstanceLog",
"dataphin:GetInstanceDownStream"
],
"Resource": "*"
}
]
}详见 [RAM 策略参考](../../ram-policies.md)。
> **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.
执行前必须向用户确认以下参数:
| 参数 | 必填 | 说明 | 示例 | |------|------|------|------| | `--op-tenant-id` / `--tenant-id` | 条件 | 租户 ID;profile 已配置时可省略 | `300115489` | | `--dataphin-profile` / `--profile` | 条件 | 本地 profile 名;省略则使用 `dataphin-public` current profile | `env23` | | `--env` | 推荐 | `DEV` / `PROD`(默认 `PROD`) | `PROD` | | `TASK_NAME` | 必 | 要重跑的任务名称 | `oracle` | | `BIZ_DATE` | 推荐 | 业务日期 `yyyymmdd`;省略则取 T-1 | `20260629` | | `PROJECT_ID` | 可选 | 若已知项目 ID,可直接指定,跳过跨项目遍历 | `7283355458594816` |
| 参数 | 必填 | 说明 | 示例 | |------|------|------|------| | `--root-instance-id` | 必 | 根实例 ID,**必须传 JSON 对象** `{"Id":"t_xxx"}`,不能传裸字符串 | `{"Id":"t_8127255632277340160_20260629_8127264978126241798"}` | | `--downstream-range` | 推荐 | 下游范围:`ALL_INSTANCE`(所有实例)/ `ALL_FAILED_INSTANCE`(所有失败实例)/ `ALL_FINAL_INSTANCE`(所有终态实例);不传则需手动传 `--down-stream-instance-id-list` | `ALL_INSTANCE` | | `--contain-root-instance` | 可选 | 根实例是否重跑,默认 `true` | `true` | | `--force-rerun` | 可选 | 是否强制重跑 | `true` |
版本 `{version}`(Shell 变量 `SKILL_VERSION`)来自套件 `references/manifest.json` 的 `version` 字段,与 session-id 一同继承[父技能 §7](../../../SKILL.md#7-observability)。直接加载本子技能时先完成父层初始化;所有 CLI / SDK 调用使用父技能名称与同一版本,跨 Shell 调用须重新注入这些值。
本 Skill 属于 `alibabacloud-dataphin-skills` 套件,**继承父 Skill `alibabacloud-dataphin-skills` 的 session-id**,子 Skill 不再重新生成。
所有调用 Alibaba Cloud API 的 `aliyun` 命令必须携带:
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dataphin-skills/{session-id} skill-version/{version}"其中 `{session-id}` 替换为父 Skill 生成的 32 位小写十六进制字符串。
# 优先使用真实系统日期,不要依赖会话上下文时间 TODAY=$(date "+%Y%m%d") # macOS BIZDATE=$(date -v-1d "+%Y%m%d") # Linux 用:BIZDATE=$(date -d "-1 day" "+%Y%m%d") echo "today=$TODAY bizdate=$BIZDATE"
ENV=PROD PROJECT_ID="<project-id>" TASK_NAME="<task-name>" BIZDATE="<biz-date>" aliyun dataphin-public list-instances \ --e
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Explain, evaluate, demonstrate, provision, and integrate Alibaba Cloud Bailian Managed Agent…
Alibaba Cloud Parse-X intelligent document parsing and extraction tool. Supports two…
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users…
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API…
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews,…
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through…