usgs-seismic-alert
Poll the USGS M4.5+ earthquake feed, conditionally pause for Incident Commander triage when magnitude >= 5.0, and emit an incident bulletin using examples/usgs_seismic_alert/actions.py.
작성자를 위한 경고
- "name" should match the name of the directory that holds SKILL.md
- Not listed through the skills extension: the directory must be named after the skill.
USGS Seismic Alert Triage (usgs_seismic_alert)
Executes the 3-stage USGS earthquake alert workflow using
examples/usgs_seismic_alert/actions.py.
Workflow Stages & Rules
-
Stage 1 — Fetch USGS Feed (
fetch_usgs_feed):-
Call
actions.fetch_usgs_feed(payload)with{"offline": True}(or live GeoJSON feed ifoffline=False). -
Note:
fetch_usgs_feedreturns a singledict(not a tuple):{"events": [...], "event_count": int, "max_magnitude": float, "strongest_place": str, "source": str}. -
Persist this dict under
payload["outputs"]["fetch_usgs_feed"]so Stage 1 is not re-executed after triage. -
Example invocation:
python3 -B -c "import json, sys; sys.path.insert(0, 'examples/usgs_seismic_alert'); import actions; out = actions.fetch_usgs_feed({'offline': True}); print(json.dumps({'outputs': {'fetch_usgs_feed': out}}))"
-
-
Stage 2 — Conditional Incident Commander Gate (
incident_commander_gate):- Branch Condition (
run_if): Evaluateoutputs.fetch_usgs_feed.max_magnitude >= 5.0. - If
max_magnitude < 5.0, skip Stages 2 and 3. - If
max_magnitude >= 5.0, STOP and presentmax_magnitudeandstrongest_placeto the human Incident Commander. Wait for their explicit approval andseverity("ADVISORY" | "WATCH" | "WARNING") +output_path. Never auto-approve.
- Branch Condition (
-
Stage 3 — Emit Bulletin (
emit_bulletin):- Condition: Run only if Stage 2 was approved. Do not re-call
fetch_usgs_feed. - Call
actions.emit_bulletin(payload)wherepayloadcontains:"outputs": {"fetch_usgs_feed": <stage_1_out>, "incident_commander_gate": {"severity": "<severity>", "output_path": "<path>"}}
- Returns
({"bulletin_path": str, "severity": str, "simulated": bool}, msg).
- Condition: Run only if Stage 2 was approved. Do not re-call
이 스킬의 파일
이 스킬에는 보조 파일이 없습니다.