Security v1.0.0

pilot-event-replay

Record and replay event streams for debugging, testing, and audit purposes. Use this skill when: 1. You need to capture...

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

技能说明

Record and replay event streams for debugging, testing, and audit purposes. Use this skill when: 1. You need to capture event streams for later analysis 2. You need to replay events to test downstream consumers 3. You need to debug event-driven workflows 4. You need to audit event history with timestamps Do NOT use this skill when: - You need real-time event forwarding (use pilot-event-bus instead) - You need long-term storage with rotation (use pilot-event-log instead) - You need filtering before recording (use pilot-event-filter first)

使用场景

Record event streams to NDJSON files and replay them for debugging and testing.

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

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

技能文件内容

4 个文件 · 15 kB
SKILL.md text/markdown
---
name: pilot-event-replay
description: >
  Record and replay event streams for debugging, testing, and audit purposes.

  Use this skill when:
  1. You need to capture event streams for later analysis
  2. You need to replay events to test downstream consumers
  3. You need to debug event-driven workflows
  4. You need to audit event history with timestamps

  Do NOT use this skill when:
  - You need real-time event forwarding (use pilot-event-bus instead)
  - You need long-term storage with rotation (use pilot-event-log instead)
  - You need filtering before recording (use pilot-event-filter first)
tags:
  - pilot-protocol
  - pub-sub
  - debugging
  - testing
  - replay
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 processing.
metadata:
  author: vulture-labs
  version: "1.0"
  openclaw:
    requires:
      bins:
        - pilotctl
        - jq
    homepage: https://pilotprotocol.network
allowed-tools:
  - Bash
---

# Pilot Event Replay

Record event streams to NDJSON files and replay them for debugging and testing.

## Commands

### Record events to file
```bash
pilotctl --json subscribe <source-hostname> <topic> --timeout <seconds> | \
  jq -c '.data.events[]' >> <recording-file.ndjson>
```

### Replay events from file
```bash
cat <recording-file.ndjson> | jq -c '.' | while IFS= read -r event; do
  topic=$(echo "$event" | jq -r '.topic')
  data=$(echo "$event" | jq -r '.data')

  pilotctl --json publish <target-hostname> "$topic" --data "$data"
  sleep <delay-seconds>
done
```

## Workflow Example

Record debug session:

```bash
#!/bin/bash
SOURCE="buggy-worker"
DURATION=300
RECORDING="/tmp/debug-session-$(date +%Y%m%d-%H%M%S).ndjson"

pilotctl --json subscribe "$SOURCE" "*" --timeout "$DURATION" | \
  jq -c '.data.events[]' >> "$RECORDING"

event_count=$(wc -l < "$RECORDING")
echo "Recorded $event_count events"
```

Replay to test agent:

```bash
#!/bin/bash
RECORDING="$1"
TEST_TARGET="test-agent"

jq -c '.' "$RECORDING" | while IFS= read -r event; do
  topic=$(echo "$event" | jq -r '.topic')
  data=$(echo "$event" | jq -r '.data')

  pilotctl --json publish "$TEST_TARGET" "$topic" --data "$data"
  sleep 0.5
done
```

## Dependencies

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

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