Install
openclaw skills install ops-detection-incident-routingDetect agent runtime anomalies and route incidents through approval-safe guardrails. Use when you need deterministic checks for cron failures, context pressure, dangling sessions, token spikes, and a controlled incident workflow (detect -> route -> investigate -> remediate).
openclaw skills install ops-detection-incident-routingRun deterministic operations checks and route incidents with guardrails.
This skill ships a small toolkit for:
Use this skill when you need a production-safe ops loop for agent systems and do not want ad-hoc prompt-only monitoring.
scripts/ops-threshold-detector.sh
reads session/cron/snapshot state and appends detector JSONL eventsscripts/incident-guard-check.sh
checks in-flight/cooldown guard status for a check idscripts/incident-state-update.sh
updates guard state for start/complete/fail transitionsscripts/ops-incident-router.sh
converts detector alerts into structured actionsscripts/ops-detector-cycle.sh
detector + router cycle runnerscripts/setup.sh
dependency checks + local example scaffoldscripts/clean-generated.sh
removes generated .jsonl and lock artifacts before republishing from a used folderbash scripts/setup.sh
Run one full dry-run cycle:
bash scripts/ops-detector-cycle.sh \
--workspace "$(pwd)/examples/workspace" \
--state-file "$(pwd)/examples/incident-state.json" \
--detector-out "$(pwd)/examples/ops-detector.jsonl" \
--router-out "$(pwd)/examples/router-actions.jsonl"
Run live mode (router also acquires in-flight locks):
bash scripts/ops-detector-cycle.sh \
--workspace "$(pwd)/examples/workspace" \
--state-file "$(pwd)/examples/incident-state.json" \
--detector-out "$(pwd)/examples/ops-detector.jsonl" \
--router-out "$(pwd)/examples/router-actions.jsonl" \
--live
Detector writes one JSON line per run:
{
"ts": "2026-02-24T02:30:00Z",
"status": "ALERT",
"checks": 5,
"alerts": [{"sev":"Sev-2","trigger":"cron_failure","value":2,"threshold":0}],
"gaps": []
}
Router emits one JSON action per alert decision:
{"action":"spawn","check_id":"cron_failure","severity":"Sev-2","mode":"dry-run","task":"Investigate incident: cron_failure"}
ops-threshold-detector.sh (every 5-15 min)ops-incident-router.shFor details, read references/architecture.md.