monitorslisted
Install: claude install-skill phnx-labs/.agents
# Monitors Skill
Durable, event-triggered watchers. **Routines fire on a *clock*; monitors fire on a *change*.** A monitor watches a source, decides whether it changed, and fires an action — spawn an agent, kick a routine, or notify. It runs in the same background daemon as routines, so it survives restarts and is fleet-schedulable.
Think of it as the **cross-agent layer**: agents watching sources — including the fleet and other agents — and firing agents in response.
## The model: source → condition → action
A monitor is three parts:
- **Source** — what to watch (a command's output, an HTTP endpoint, a file, a fleet device, a webhook).
- **Condition** — what counts as a fire (any change, a regex match, every tick), deduped by a native state store so it stays silent until something *actually* changes.
- **Action** — what to do (run an agent with the event in its prompt, kick a routine, notify, POST a webhook).
## When to reach for this (vs. siblings)
| You want… | Use |
|---|---|
| Run on a schedule (9am weekdays, hourly) | `agents routines` (clock) |
| Run when a *condition changes* (CI goes red, cert issues, box goes down) | **`agents monitors`** (change) |
| Nudge a *stalled agent session* to continue | `agents watchdog` |
## Quickstart
```bash
# CI goes red -> a Claude agent triages it (poll a command, diff, match a pattern)
agents monitors add ci-red \
--poll 'gh pr checks 1249 --json name,bucket' 30s --match fail \
--run claude --prompt 'CI failed: {event}.