alarm-to-workorder

An alarm-to-workorder tool. Purpose: quickly package an alarm into a workorder or create standardized workorders per process to simplify operations flow. Two operations: package an alarm event and submit it as a workorder (calls the alarm-report API); or create a general workorder by dynamically matching a process name and parsing fields (calls the document-work API).

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "alarm-to-workorder" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-59abeffad3dc33e0fd8a26dea39b3886f7a64fd6dde4406e3ce7a9fc57b953e3. Verify the upstream source and version against https://skillhub.cn/skills/org-3rlgh0jt/alarm-to-workorder before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

An alarm-to-workorder tool. Purpose: quickly package an alarm into a workorder or create standardized workorders per process to simplify operations flow. Two operations: package an alarm event and submit it as a workorder (calls the alarm-report API); or create a general workorder by dynamically matching a process name and parsing fields (calls the document-work API).

0 Downloads

Introduction source: third_party · org-3rlgh0jt · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: alarm-to-workorder
description: |
  告警转工单技能:支持两种模式——
  1. 告警转工单:用户下达"发送工单"、"转工单"、"生成工单"等指令后,将告警信息(eventid)封装提交为工单,调用 alarm-report 接口。
  2. 通用工单创建:用户下达"创建工单"指令后,从描述中提取流程名,动态匹配流程、解析字段、调用 document-work 接口提交工单。
  触发场景:用户明确表达将告警转为工单,或创建指定流程的工单。

告警转工单(alarm-report)

执行流程

收到用户告警转工单指令
  │
  ├─ 1. 确认告警信息(从上文中提取或通过 alert-clinic 查询)
  │     必要字段:eventid、description、clock、priority、name、ip
  │
  └─ 2. 调用 alarm-report 接口提交工单

调用方式

python3 skills/alarm-to-workorder/scripts/alarm_report.py \
  --eventid '79086272' \
  --description '[硬件设备]群礠-勿动-192.168.3.49系统温度大于60℃' \
  --clock '1783044790' \
  --priority '提示' \
  --name '群礠-勿动-192.168.3.49' \
  --ip '192.168.3.49'

参数说明

参数 必填 说明
--eventid 是 告警事件 ID
--description 是 告警描述
--clock 是 告警时间(Unix 时间戳秒,或 2024-08-01 10:00:00 格式)
--priority 是 告警等级:紧急 / 严重 / 一般 / 提示
--name 是 告警名称
--ip 是 目标 IP 地址
--config 否 配置文件路径(默认:config.json)
--json 否 以 JSON 格式输出

告警等级映射

标签 priority 值
紧急 0
严重 1
一般 2
提示 3

触发识别

以下用户表述均视为触发"告警转工单":

  • 发送工单
  • 转工单
  • 生成工单
  • 这个告警转工单

创建工单(通用)

执行流程

用户下达创建工单指令
  │
  ├─ 1. 从描述中提取流程关键词(如"网络服务录入")
  │     支持格式:
  │       创建工单:网络服务录入,...
  │       创建网络服务录入工单,...
  │
  ├─ 2. 调用 process-list 模糊匹配流程
  │     ├─ 匹配成功 → 继续
  │     └─ 未匹配 → 报错退出,列出所有支持的流程
  │
  ├─ 3. 调用 process-params 获取该流程的字段定义
  │     动态构建字段名 → 字段ID 的映射表
  │
  ├─ 4. 解析用户描述,匹配字段值
  │     按中文逗号分割片段,逐片匹配字段
  │
  └─ 5. 调用 document-work 提交工单

Step 1: 调用方式

标准调用:

python3 skills/alarm-to-workorder/scripts/create_workorder.py \
  --desc '创建工单:网络服务录入,主题:这是一个测试工单,分类:硬件故障,地址:公司,问题原因:原因未知,解决方式:重启服务器,工时 60,状态:已解决'

支持的描述格式:

片段格式 示例 说明
创建工单:流程名, 创建工单:网络服务录入,主题:... 提取流程关键词,自动匹配流程
字段名:值 地址:公司 最常用格式
字段名是:值 主题是:测试标题 带"是"字
字段名 值 工时 60 纯数字值(无冒号)

Step 2: 查看所有支持的流程

python3 skills/alarm-to-workorder/scripts/create_workorder.py --list

返回示例:

name processId
其他IT服务申请 a3d9a61609728040bb0977208762a8584f8f
桌面服务录入 5f51209a09de404ec70bc090d2b93c36216c
主机服务录入 801f61d70bf9904cc00a64a0c5c19696c8cc
网络服务录入 7ec770e50b065048840a4f50a22f81c18727
运维服务指派 dbb6b6ae00b7d042910843d0eb9c5fad0f26
安全服务录入 a4c8541d02c6104fa50b5b00f26db99ee89b
故障处置 e69a4af206e8b04eba09b6a04953115f4803

Step 3: 查看流程字段

python3 skills/alarm-to-workorder/scripts/create_workorder.py \
  --desc '创建工单:网络服务录入' --json

返回该流程所有字段定义(含 name、value、fdType、options)。

参数说明

参数 必填 说明
--list 否 列出所有支持的工单类型
--desc 是 用户描述,自动提取流程名并解析字段
--fields 否 额外字段(JSON),与 --desc 解析结果合并
--config 否 配置文件路径(默认:config.json)
--json 否 以 JSON 格式输出

触发识别

以下用户表述均视为触发"创建工单":

  • 创建工单
  • 新建工单
  • 填写工单
  • 我要建个工单
  • 创建XXX工单(XXX为流程名)
  • 创建工单:XXX(XXX为流程名)

注意事项

  • fdType = select 字段必须从 options 中选取,禁止用户输入不在列表中的值
  • fdType = input + 有 options 字段建议从 options 列表中选取
  • fdType = input + 无 options 字段可自由输入
  • 若用户描述的流程未匹配到,脚本会列出所有支持的流程供选择
  • 每个流程的字段可能不同,字段名通过 process-params 动态获取

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 解决运维场景下高频刚需任务,显著提升工单流转效率
  • 支持告警转工单和通用工单创建两种模式,覆盖广泛使用场景
Trigger Precision95/100

Highlights

  • 触发词覆盖完整,边界清晰,支持多种变体表达
Structure and Standards95/100

Areas to improve

  • 缺少 When to Use 章节 Reported severity: Minor

    文档中缺少明确的使用场景说明章节

    Recommendation: 建议补充 When to Use 章节,明确说明适用场景和使用时机

  • 文档过长 Reported severity: Minor

    主文档约600行,超出建议的500行限制

    Recommendation: 建议将部分详细说明移至独立文档或通过链接引用

  • frontmatter 不完整 Reported severity: Minor

    缺少 author、version、created_at 等常用元数据字段

    Recommendation: 建议补充完整的 frontmatter 元数据信息

Highlights

  • Phase/步骤清晰,有出口条件
  • 包含端到端示例,便于理解执行流程
Execution Reliability95/100

Highlights

  • 工具来源明确,参数正确
  • 覆盖主要异常场景,流程未匹配时提供备选方案
  • 不可逆操作有确认机制
Evidence Verifiability (mean of the first four)95/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.