← 返回 Skills 市场
sdk-team

Alibabacloud Alert Intent Router

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.1-beta.1 · MIT-0
cross-platform ⚠ suspicious
90
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install alibabacloud-alert-intent-router
功能描述
阿里云告警智能路由技能。解析告警消息,提取关键参数,查询CMDB获取资源关系, 根据意图分类路由到数据库诊断、网络可达性分析或ECS实例诊断,最终生成根因分析报告。 触发词: "告警", "alert", "异常", "故障", "error", "网络不通", "端口异常", "使用率", "连接失败", "服...
使用说明 (SKILL.md)

阿里云告警智能路由

本技能是一个纯路由技能,负责解析告警消息并将其路由到对应的后端诊断技能执行。

架构: 告警解析 → CMDB查询 → 意图路由 → 调用后端Skill → 生成根因报告

后端诊断技能:

  • alibabacloud-ecs-diagnose - ECS实例诊断
  • alibabacloud-network-reachability-analysis - 网络可达性分析
  • alibabacloud-das-agent - 数据库诊断
graph TB
    A[接收告警] --> B[解析告警内容]
    B --> C[提取关键参数]
    C --> D[查询CMDB]
    D --> E{意图分类}
    E -->|数据库问题| F[alibabacloud-das-agent]
    E -->|网络连通性| G[alibabacloud-network-reachability-analysis]
    E -->|ECS实例问题| H[alibabacloud-ecs-diagnose]
    F --> I[生成根因报告]
    G --> I
    H --> I

安装要求

前置检查: 本技能为路由技能,具体诊断操作由后端技能执行。各后端技能的安装要求请参见对应技能文档。

技能 用途 前置要求
alibabacloud-ecs-diagnose ECS实例诊断 Aliyun CLI >= 3.3.1
alibabacloud-network-reachability-analysis 网络可达性分析 Aliyun CLI >= 3.3.1, NIS开通
alibabacloud-das-agent 数据库诊断 DAS Agent ID, uv (Python)

第一阶段:告警解析与参数提取

1.1 解析告警消息

从告警中提取以下信息:

字段 说明 示例
alert_content 原始告警内容 "ECS i-xxx 端口 22 连接异常"
alert_source 告警来源 CMS, ARMS, SLS, 自定义
resource_id 资源ID i-bp1xxx, lb-xxx, rm-xxx

1.2 意图分类与路由

根据 references/intent-keywords.md 中的关键字匹配规则进行分类:

# 优先级1:数据库问题 → alibabacloud-das-agent
IF alert_content MATCHES database_keywords:
    intent = "database_diagnose"
    target_skill = "alibabacloud-das-agent"

# 优先级2:单个ECS实例问题 → alibabacloud-ecs-diagnose  
ELSE IF alert_content MATCHES ecs_keywords:
    intent = "ecs_diagnose"
    target_skill = "alibabacloud-ecs-diagnose"

# 优先级3:两个资源之间的连通性 → alibabacloud-network-reachability-analysis
ELSE IF alert_content MATCHES network_keywords:
    intent = "network_reachability"
    target_skill = "alibabacloud-network-reachability-analysis"

# 默认:ECS诊断
ELSE:
    intent = "ecs_diagnose"
    target_skill = "alibabacloud-ecs-diagnose"

意图路由映射表:

意图类别 关键字示例 路由到技能
数据库问题 数据库慢, SQL超时, RDS连接失败, 慢查询, 锁等待 alibabacloud-das-agent
ECS实例问题 SSH超时, 实例连不上, CPU告警, 磁盘满 alibabacloud-ecs-diagnose
网络连通性 端口不通, 网络超时, 从A访问B失败 alibabacloud-network-reachability-analysis

完成意图分类后,必须向用户展示分类结果:

## 意图识别结果

| 字段 | 值 |
|-----|-----|
| 告警类型 | \x3C告警类型描述> |
| 意图类别 | \x3Cdatabase_diagnose / ecs_diagnose / network_reachability> |
| 路由技能 | \x3C目标技能名称> |
| 匹配规则 | \x3C匹配到的关键字> |

1.3 参数提取

数据库诊断参数

参数 提取模式 示例
instance_id rm-[a-z0-9]+, pc-[a-z0-9]+ rm-bp1xxx
symptom 慢查询, 连接异常, CPU高 数据库响应慢

网络可达性分析参数

参数 提取模式 示例
source_resource_id i-[a-z0-9]+, 第一个匹配 i-bp1abc123
target_resource_id i-[a-z0-9]+, 第二个匹配 i-bp2def456
target_port 端口\s*(\d+) 22, 80, 3306

ECS诊断参数

参数 提取模式 示例
instance_id i-[a-z0-9]+ i-bp1abc123
symptom 连不上, 卡顿, 磁盘满 SSH超时

第二阶段:资源信息查询

本阶段获取告警相关资源的详细信息,支持两种数据源:CMDB云平台 CLI

2.1 数据源优先级

1. 检查 CMDB 是否已配置 (references/cmdb.md)
   IF 文件存在 且 包含有效数据:
       CMDB 已配置 → 查询 CMDB
   ELSE:
       提示: "💡 企业 CMDB 未配置,使用云平台 API 查询资源信息"

2. 查询 CMDB
   IF CMDB 中找到资源: 使用 CMDB 数据
   ELSE: 继续 CLI 查询

3. 使用 CLI 查询云平台
   IF CLI 返回有效数据: 使用 CLI 数据
   ELSE: 进入步骤4

4. 资源不存在 → **立即停止执行**
   OUTPUT: "❌ 资源未找到,请手动提供资源 ID 和地域 ID"
   **必须等待用户提供有效信息后才能继续。**

2.2 资源查询输出

## 资源信息查询结果

| 字段 | 值 |
|-----|-----|
| 数据来源 | \x3CCMDB / 云平台API> |
| 资源 ID | \x3Cresource_id> |
| 地域 | \x3Cregion_id> |
| 查询状态 | \x3C找到 / 未找到> |

2.3 CMDB 配置

CMDB(Configuration Management Database)为可选配置。配置位置: references/cmdb.md

CMDB 优势: 支持业务名称映射(如 db-prod-01rm-bp1xxx)、资源关联关系、网络拓扑信息。


第三阶段:调用后端诊断技能

根据意图分类结果,调用对应的后端诊断技能执行具体诊断。

重要: 本技能为路由技能,不直接执行诊断操作。诊断由后端技能完成。

后端技能依赖检查

[必须] 前置检查: 在调用后端技能之前,必须检查对应的技能是否已安装。 如果目标技能未安装,立即停止并提示用户安装所需技能。

❗禁止自主调用 CLI: 当后端技能未安装时,严禁自行使用 Aliyun CLI 执行诊断操作。

检查方法:

found_in = []
FOR path IN [".qoder/skills/", ".claude/skills/", ".agents/skills/", "skills/"]:
    IF "\x3Ctarget_skill_name>" 在目录列表中:
        found_in.append(path)

IF found_in 为空:
    技能未安装 → 停止并提示用户安装
ELSE:
    继续执行

检查结果输出:

## 后端技能依赖检查

| 技能名称 | 安装位置 | 状态 |
|---------|---------|------|
| \x3Cskill_name> | \x3Cpath> | ✅ 已安装 / ❌ 未找到 |

技能未安装时的处理:

IF target_skill NOT installed:
    STOP execution
    OUTPUT: "❌ 无法执行诊断:所需技能 `\x3Cskill_name>` 未安装。请联系管理员安装。"
    EXIT  # 必须立即终止

⚠️ [严禁] 禁止使用替代方法: 当后端技能未安装时,必须完全停止执行。禁止回退到 CLI 命令自行诊断。

后端技能调用规范

⚠️ [严禁] 禁止创建模拟脚本: 严禁创建 shell 脚本来"模拟"后端技能的执行。

必须使用 Skill 工具 调用后端技能:

Skill(skill: "\x3Cbackend_skill_name>", args: "\x3C传递给后端技能的参数>")

调用示例:

# 数据库诊断
Skill(skill: "alibabacloud-das-agent", args: "请诊断RDS实例 rm-bp1xxx 的CPU使用率过高问题")

# 网络可达性分析
Skill(skill: "alibabacloud-network-reachability-analysis", args: "分析 i-bp1xxx 到 i-bp2xxx 端口 3306 的连通性")

# ECS 诊断
Skill(skill: "alibabacloud-ecs-diagnose", args: "诊断 ECS 实例 i-bp1xxx 的 SSH 连接超时问题")

3A. 路由到 alibabacloud-das-agent

当意图为 database_diagnose 时,调用 alibabacloud-das-agent

传递参数: question: "\x3C基于告警内容构建的自然语言问题>", instance_id: "\x3Crm-xxx / pc-xxx>"

3B. 路由到 alibabacloud-network-reachability-analysis

当意图为 network_reachability 时,调用该技能。

传递参数: SourceId, TargetId, TargetPort, Protocol, RegionId

3C. 路由到 alibabacloud-ecs-diagnose

当意图为 ecs_diagnose 时,调用该技能。

传递参数: InstanceId, RegionId, symptom


第四阶段:生成根因报告

后端技能诊断完成后,汇总结果并生成根因分析报告。

使用 references/root-cause-report-template.md 模板生成报告。


使用限制

  1. 路由限制:本技能仅负责路由,具体诊断由后端技能执行
  2. 后端技能限制:各后端技能有各自的使用限制
  3. CMDB 可选:未配置时使用云平台 API 查询

最佳实践

  1. 准确识别告警意图,选择正确的后端技能
  2. 使用CMDB补充资源关系信息
  3. 传递完整的参数给后端技能
  4. 汇总后端技能的诊断结果生成统一报告

参考文件

文件 内容
references/cmdb.md 企业CMDB资源关系表
references/intent-keywords.md 意图分类关键字映射
references/ram-policies.md RAM权限策略
references/related-apis.md API参考
references/root-cause-report-template.md 根因报告模板
安全使用建议
This skill appears to do what it says (route alerts to backend diagnostic skills), but review these points before installing: - Source provenance: The package has no homepage and an unknown source. Prefer skills with a clear publisher and documentation. - Backend dependencies: The router will stop if required backend skills are missing. Install and audit the backend skills (alibabacloud-ecs-diagnose, alibabacloud-network-reachability-analysis, alibabacloud-das-agent) because they are the ones that will actually perform privileged operations and may require cloud credentials. - CMDB file access: The skill expects an enterprise-maintained CMDB file and will read it. Ensure the CMDB file stored for the agent does not contain unnecessary secrets and that its path/format are what you expect. - CLI / API ambiguity: SKILL.md both permits using the Aliyun CLI/API when CMDB is absent and prohibits using CLI for diagnostics if backends are missing. Clarify with the skill author (or test in a sandbox) exactly when the agent will execute CLI commands vs. when it will insist on a backend skill. If the agent might run CLI commands, ensure the credentials available to the agent are limited and follow least-privilege RAM policies described in references/ram-policies.md. - Local directory checks: The skill lists specific local paths to discover installed skills. This is reasonable but you should confirm those are the only paths it will access and that scanning those paths does not leak sensitive metadata in your environment. - Test in a safe environment: Before deploying to production, test the skill in a sandbox with minimal credentials and sample CMDB data to observe whether it attempts any unexpected actions (CLI runs, network calls, or file writes). If you want to proceed, ask the publisher for: (1) an authoritative source/homepage or code repository, (2) explicit clarification of the CLI usage policy, and (3) details on where the CMDB file is read from and what exact local paths the skill will enumerate.
功能分析
Type: OpenClaw Skill Name: alibabacloud-alert-intent-router Version: 0.0.1-beta.1 The skill bundle is an Alibaba Cloud alert router designed to parse incoming alert messages and delegate diagnostic tasks to specialized backend skills (ECS, Network, or Database). It includes structured logic for intent classification, parameter extraction, and safety constraints that explicitly forbid the agent from executing unauthorized CLI commands or creating mock scripts if dependencies are missing. The documentation (SKILL.md, references/) is consistent with its stated purpose, providing clear guidance on RAM policies, API usage, and CMDB integration without any evidence of malicious intent, data exfiltration, or harmful prompt injection.
能力评估
Purpose & Capability
Name/description match the instructions: the skill is a router that parses alert text, extracts IDs, consults a local CMDB (optional) or cloud APIs, then routes to backend diagnostic skills. It does not request credentials or install binaries itself, which is proportionate for a routing-only skill.
Instruction Scope
SKILL.md instructs the agent to: parse alert text, read/consult a CMDB file if present, list specific local skill directories to check whether backends are installed, and (in some flows) query the cloud platform via the Aliyun CLI or APIs. The document also contains an explicit prohibition against invoking CLI for diagnostics when a backend skill is missing, but earlier sections permit using the CLI if CMDB is absent — this is ambiguous. Reading local CMDB files and listing skill directories are expected for a router but do expand the agent's access to local filesystem state (which could contain sensitive mapping or environment info).
Install Mechanism
Instruction-only skill with no install spec and no code files. That is low-risk from an install standpoint — nothing will be written to disk by the skill package itself.
Credentials
The skill declares no required environment variables or credentials (proportionate). However, many referenced operations (CLI/API calls described in references) will require Alibaba Cloud credentials when executed — likely by the backend skills or by the agent if the agent is allowed. The SKILL.md does not request credentials itself, but it assumes the environment or backends supply them; confirm credential handling and least-privilege RAM policies before enabling.
Persistence & Privilege
always:false and user-invocable: true. The skill only inspects local directories and files (no installation steps, no persistence). It does not request permanent presence or self-enablement. No evidence it modifies other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-alert-intent-router
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-alert-intent-router 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1-beta.1
alibabacloud-alert-intent-router v0.0.1-beta.1 - Initial release of the Alibaba Cloud alert intent routing skill. - Parses alert messages and extracts key parameters. - Queries CMDB for resource relationships. - Classifies intent and routes to database, network reachability, or ECS diagnostics skills. - Enforces pre-checks for backend skill installation and resource existence. - Generates structured root cause analysis reports after backend diagnostics.
元数据
Slug alibabacloud-alert-intent-router
版本 0.0.1-beta.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Alibabacloud Alert Intent Router 是什么?

阿里云告警智能路由技能。解析告警消息,提取关键参数,查询CMDB获取资源关系, 根据意图分类路由到数据库诊断、网络可达性分析或ECS实例诊断,最终生成根因分析报告。 触发词: "告警", "alert", "异常", "故障", "error", "网络不通", "端口异常", "使用率", "连接失败", "服... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 90 次。

如何安装 Alibabacloud Alert Intent Router?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-alert-intent-router」即可一键安装,无需额外配置。

Alibabacloud Alert Intent Router 是免费的吗?

是的,Alibabacloud Alert Intent Router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Alert Intent Router 支持哪些平台?

Alibabacloud Alert Intent Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Alert Intent Router?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.1-beta.1。

💬 留言讨论