Event-Watcher

v1.0.1

Event watcher skill for OpenClaw. Use when you need to subscribe to event sources (Redis Streams + webhook JSONL) and wake an agent only when matching events arrive. Covers filtering, dedupe, retry, and session routing via sessions_send/agent_gate.

1· 1.6k·2 current·2 all-time
byCraig.C.Li@solitaire2015
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
Name/description align with the code (Redis streams + webhook JSONL -> wake agent). However, the skill reads local OpenClaw session stores (~/.openclaw and ~/.openclaw/agents/*/sessions/sessions.json) and invokes the openclaw CLI; accessing other agent session files is broader than a simple watcher and should be explicitly declared/justified.
!
Instruction Scope
SKILL.md and scripts instruct the watcher to read arbitrary local session store files, normalize events, run agents via subprocess, and append logs/dead letters to paths under the host filesystem. Reading other agents' session stores and resolving the 'latest session' (without explicit session_id) is scope creep from a pure event listener and can expose chat/session context to the watcher.
Install Mechanism
No install spec is provided (lowest install risk). The metadata does declare Python dependencies (redis, pyyaml) which will be needed to run the provided scripts; the skill includes several Python files that will run as-is. No remote downloads or unusual install steps were found.
!
Credentials
Registry metadata lists no required env vars, but the code uses multiple env vars (EVENT_WATCHER_CONFIG, EVENT_WATCHER_STATE, EVENT_WATCHER_LOG, DEAD_LETTER, OPENCLAW_SESSION_KEY, OPENCLAW_SESSION_STORE, and the references/CONFIG.md documents REDIS_URL/REDIS_PASSWORD). Redis credentials and session-related env vars are effectively required for common operation but are not declared — this mismatch is a red flag for missing/undeclared sensitive requirements.
!
Persistence & Privilege
The skill does not set always:true, and it has no installer creating persistent system services, but it is explicitly intended to be run as a long‑running background process (nohup/tmux). It reads/writes files outside its own folder (logs, dead-letter, and local OpenClaw session stores), which grants it ongoing access to local session/context data if you run it — consider this elevated persistence in practice.
What to consider before installing
This skill appears to implement the advertised watcher functionality, but there are several important caveats you should consider before running it: - Undeclared env vars: The skill's metadata does not list environment variables it actually uses (e.g., REDIS_URL/REDIS_PASSWORD, OPENCLAW_SESSION_KEY, OPENCLAW_SESSION_STORE, and various EVENT_WATCHER_* paths). Treat this as a red flag — confirm what credentials you must provide and where. - Session store access: By default the watcher searches and reads ~/.openclaw and ~/.openclaw/agents/*/sessions/sessions.json to resolve sessions. That may expose session IDs and conversation context from other agents. If you don't want that, set wake.disable_session_store_lookup: true or supply an explicit wake.session_id / a controlled OPENCLAW_SESSION_STORE path. - Prompt injection & safety: The skill can prepend a safety header by default — keep that enabled unless you are sure all sources are trusted. Do not disable wake.add_source_preamble unless you fully control all webhook/stream payloads. - Run in an isolated environment: Because it will read local files and may be long-running, run the watcher under a dedicated user, container, or VM, and restrict filesystem access to only the paths you expect it to use. - Review and test: Inspect the scripts (already included) for any behavior you don't want, especially how it constructs subprocess calls to the openclaw CLI. Test with a non-production config and minimal privileges (no production Redis credentials) first. - If you proceed: explicitly set OPENCLAW_SESSION_STORE to a single, controlled session file (or use wake.session_id), provide only the Redis credentials needed for the specific stream, and keep logging/dead-letter paths in a directory you control. If you want, I can list the exact lines where the skill reads session files and environment variables and suggest a minimal configuration that limits its scope.

Like a lobster shell, security has layers — review code before you run it.

latestvk972zf5jmt8p8bd167b8qqj5pd80qcbn

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments