一键导入
observe-events
Observe events in real time from an EventSourcingDB instance. Use when the user wants to watch, monitor, or stream live events as they are written.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Observe events in real time from an EventSourcingDB instance. Use when the user wants to watch, monitor, or stream live events as they are written.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read details about a single event type from an EventSourcingDB instance. Use when the user wants to inspect a specific event type, check if it has a schema, or see its details.
Read all event types from an EventSourcingDB instance. Use when the user wants to list or discover all event types that exist in the event store.
Register a JSON Schema for an event type on an EventSourcingDB instance. Use when the user wants to add validation, define a schema, or enforce structure for an event type.
Run an EventQL query against an EventSourcingDB instance. Use when the user wants to query, filter, aggregate, or analyze events using the EventQL query language.
Write events to an EventSourcingDB instance. Use when the user wants to store, append, or publish events, optionally with preconditions such as optimistic locking or subject constraints.
Ping an EventSourcingDB instance to check if it is reachable. Use when the user wants to verify connectivity or check if EventSourcingDB is running.
| name | observe-events |
| description | Observe events in real time from an EventSourcingDB instance. Use when the user wants to watch, monitor, or stream live events as they are written. |
| allowed-tools | Bash, Read, AskUserQuestion |
Observe events in real time from an EventSourcingDB instance. This opens a long-lived streaming connection.
First read ${CLAUDE_PLUGIN_ROOT}/shared/common.md. It explains how to determine the base URL and API token, how to handle NDJSON responses, and which conventions apply. Follow it throughout this skill.
Also read ${CLAUDE_PLUGIN_ROOT}/shared/cloudevents.md. It explains how returned events are structured, including the EventSourcingDB-specific metadata fields.
This endpoint returns a long-lived NDJSON stream. Always use --max-time to ensure the connection terminates (default: 30 seconds):
curl -s --no-buffer --max-time 30 -X POST \
-H "authorization: Bearer ${ESDB_API_TOKEN}" \
-H "content-type: application/json" \
-d '<REQUEST_BODY>' \
"${ESDB_URL:-http://localhost:3000}/api/v1/observe-events" \
| grep -v '"type":"heartbeat"'
When the user wants a custom timeout, use AskUserQuestion to ask for the desired duration in seconds.
{
"subject": "/<subject-path>",
"options": {
"recursive": false,
"lowerBound": {
"id": "<event-id>",
"type": "exclusive"
},
"fromLatestEvent": {
"subject": "/<subject-path>",
"type": "<event-type>",
"ifEventIsMissing": "read-everything"
}
}
}
Options:
recursive (boolean): Include sub-subjects.lowerBound: Resume from event ID. type: "inclusive" or "exclusive".fromLatestEvent: Start from last event of given type. ifEventIsMissing: "read-everything" or "wait-for-event". Cannot be combined with lowerBound.curl -s --no-buffer --max-time 30 -X POST \
-H "authorization: Bearer ${ESDB_API_TOKEN}" \
-H "content-type: application/json" \
-d "{
\"subject\": \"/\",
\"options\": {
\"recursive\": true
}
}" \
"${ESDB_URL:-http://localhost:3000}/api/v1/observe-events" \
| grep -v '"type":"heartbeat"'
NDJSON stream with one line per event:
{"type":"event","payload":{...}}