AI & Integration v1.0.0

pilot-event-filter

Filter and transform events before delivery using pattern matching and jq transforms. Use this skill when: 1. You need...

teoslayer 更新于 2026-04-09 1 浏览
下载 SKILL

技能说明

Filter and transform events before delivery using pattern matching and jq transforms. Use this skill when: 1. You need to filter events by content, not just topic wildcards 2. You need to transform event payloads before processing 3. You need to route events conditionally based on content 4. You need to reduce event noise by selective forwarding Do NOT use this skill when: - Topic wildcards alone are sufficient (use pilot-event-bus instead) - You need all events without filtering (subscribe directly) - You need persistent storage (use pilot-event-log instead)

使用场景

Filter and transform Pilot Protocol event streams using jq-based pattern matching.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/pilot-event-filter
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 17 kB
SKILL.md text/markdown
---
name: pilot-event-filter
description: >
  Filter and transform events before delivery using pattern matching and jq transforms.

  Use this skill when:
  1. You need to filter events by content, not just topic wildcards
  2. You need to transform event payloads before processing
  3. You need to route events conditionally based on content
  4. You need to reduce event noise by selective forwarding

  Do NOT use this skill when:
  - Topic wildcards alone are sufficient (use pilot-event-bus instead)
  - You need all events without filtering (subscribe directly)
  - You need persistent storage (use pilot-event-log instead)
tags:
  - pilot-protocol
  - pub-sub
  - filtering
  - transformation
license: AGPL-3.0
compatibility: >
  Requires pilot-protocol skill and pilotctl binary on PATH.
  The daemon must be running (pilotctl daemon start).
  Requires jq for JSON filtering and transformation.
metadata:
  author: vulture-labs
  version: "1.0"
  openclaw:
    requires:
      bins:
        - pilotctl
        - jq
    homepage: https://pilotprotocol.network
allowed-tools:
  - Bash
---

# Pilot Event Filter

Filter and transform Pilot Protocol event streams using jq-based pattern matching.

## Commands

### Subscribe with filtering
```bash
pilotctl --json subscribe <source-hostname> <topic> --timeout 60 | \
  jq -c '.data.events[] | select(<filter-expression>)'
```

### Transform and republish
```bash
pilotctl --json subscribe <source> <topic> --timeout 60 | \
  jq -c '.data.events[] | <transform-expression>' | \
  while IFS= read -r event; do
    pilotctl --json publish <destination> "<new-topic>" --data "$event"
  done
```

## Workflow Example

Filter critical alerts and forward to on-call agent:

```bash
#!/bin/bash
SOURCE_AGENT="monitoring-hub"
ONCALL_AGENT="oncall-agent"

pilotctl --json subscribe "$SOURCE_AGENT" "alerts.*" --timeout 600 | \
  jq -c '.data.events[]' | \
  while IFS= read -r event; do
    severity=$(echo "$event" | jq -r '.data | fromjson | .severity // "unknown"')

    if [ "$severity" = "critical" ]; then
      pilotctl --json publish "$ONCALL_AGENT" "oncall.critical" --data "$event"
    fi
  done
```

## Dependencies

Requires pilot-protocol skill, jq, and a running daemon.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。