YAML frontmatter sets the schedule, model, and budget. The markdown body is the prompt. watchd runs claude -p, parses the JSON output, and records every run with its cost and a hash of the exact instructions that produced it.
--- name: uptime schedule: 5m model: haiku max_turns: 5 budget: 0.10 --- # Uptime Monitor Check if https://api.myapp.com/health returns 200. If not, tell me what's wrong.
$ watchd run uptime running uptime... ✓ uptime in 4.2s ($0.0089) The endpoint returned HTTP 200 with response time of 142ms. All healthy. $ watchd AGENT SCHEDULE STATUS COST LAST RUN uptime 5m success $0.0089 2m ago digest 1d success $0.1204 6h ago
$ watchd costs AGENT COST RUNS uptime $ 0.2314 26 digest $ 0.4816 4 security $ 0.8201 7 TOTAL $ 1.5331 37 $ watchd logs uptime ✓ uptime success 4.2s $0.0089 2m ago All healthy. 200 OK in 142ms. ✓ uptime success 3.8s $0.0076 7m ago All healthy. 200 OK in 138ms.
One line of frontmatter gives an agent a memory file it owns: injected at the start of every run, updated before it finishes. A scan that re-reports the same findings is noise. One that remembers builds intelligence.
With gate: true the first pass runs with read-only tools, ends with a concrete plan, and lands in watchd pending. Nothing executes until you approve. notify pings you wherever you are — the plan reaches you instead of waiting to be noticed.
---name: dbcleanupschedule: 1dmodel: sonnetgate: truenotify: "ntfy pub alerts 'watchd: $WATCHD_AGENT \$WATCHD_STATUS'"---# DB CleanupFind bloated tables, unused indexes, androws older than the retention policy.Propose a cleanup plan.
watchd wraps claude -p with scheduling, budgets, run history, memory, and an approval gate. Your agents are markdown files, not bash scripts.
Each agent is a markdown file. Drop it in agents/, run watchd up.
Check your endpoints every 5 minutes. The model interprets the response, not just the status code.
---name: uptimeschedule: 5mmodel: haikubudget: 0.10---Check if https://api.myapp.com/healthreturns 200. If the response time isabove 500ms or the body looks wrong,explain what might be happening.
Audit recent commits and get pinged the moment something looks wrong.
---name: securityschedule: 6hmodel: sonnetmax_turns: 15budget: 1.00notify: "ntfy pub alerts ..."---Check the latest commits in my repofor security issues: SQL injection,hardcoded secrets, unsafe file ops.Flag anything that needs attention.
Summarize what matters from your inbox. Runs before you wake up.
---name: inboxschedule: 1dmodel: sonnetbudget: 0.50---Check my unread emails from thelast 24 hours. Summarize anythingfrom customers or investors.Ignore newsletters and marketing.
Generate release notes from your git log. Push to docs automatically.
---name: changelogschedule: 1dmodel: sonnetmax_turns: 10---Look at git commits from the last24 hours. Write a concise changelogentry. Group by feature, fix, chore.Skip merge commits and CI changes.
Remembers past incidents, so it reports new patterns instead of repeating old ones.
---name: errorsschedule: 30mmodel: sonnetbudget: 0.10memory: true---Read the last 100 lines of/var/log/app/error.log.Group similar errors, identifyroot causes. Build on what youalready know — report only deltas.
Plans destructive work in read-only mode. Executes only after you approve.
---name: dbcleanupschedule: 1dmodel: sonnetbudget: 0.50gate: true---Find bloated tables, unused indexes,and rows older than retention policy.Propose a cleanup plan with exactcommands and expected impact.
watchd is a thin orchestration layer. No AI runtime, no model loading, no API keys to manage. It spawns claude -p and parses the JSON output. Every run records prompt_hash and agent_hash, so you can always answer "which instructions produced this output."