Watchdog

From Rune-kit/rune · View interactive version

Watchdog is an AI agent skill from the GitHub repository Rune-kit/rune. Post-deploy monitoring. Use when verifying a deployed app is healthy after deploy or launch — auto-fires from launch/deploy. Checks HTTP status, response times, error detection, and smoke test report.

How to use this skill

Skill file

watchdog

Purpose

Post-deploy monitoring. Receives a deployed URL and list of expected endpoints, runs health checks, measures response times, detects errors, and returns a structured smoke test report.

Called By (inbound)

Calls (outbound)

None — pure L3 utility.

Executable Instructions

Step 1: Receive Target

Accept input from calling skill:

If no endpoints provided, default to: ["/", "/health", "/ready"]

Step 2: Health Check

For each endpoint, run an HTTP status check using Bash:

curl -s -o /dev/null -w "%{http_code}" https://myapp.com/health

Step 3: Response Time

For each endpoint, measure latency using Bash:

curl -s -o /dev/null -w "%{time_total}" https://myapp.com/health

Thresholds:

Step 4: Performance Signal Analysis

After collecting response times from Step 3, analyze for patterns that indicate root causes:

If no previous baseline exists, skip spike detection and note INFO: no baseline — first run.

Output performance signals into a perf_signals list (separate from alerts).

Step 5: Error Detection

Scan responses for problems:

Collect all flagged issues into an alerts list.

Step 6: Report

Output the following report structure:

## Watchdog Report: [base_url]

### Smoke Test Results
- [endpoint] — [HTTP status] ([response_time]s) — [HEALTHY|REDIRECT|CLIENT_ERROR|SERVER_ERROR|UNREACHABLE]

### Alert Rules Applied
- Response time > 2s → alert
- Any 4xx on non-auth endpoint → alert
- Any 5xx → critical alert
- Unreachable → critical alert

### Alerts
- [CRITICAL|WARNING] [endpoint] — [reason]

### Performance Signals
- [PERF_WARN|PERF_REGRESSION|INFO] [endpoint] — [diagnosis]

### Summary
- Total endpoints checked: [n]
- Healthy: [n]
- Alerts: [n]
- Perf Signals: [n]
- Overall status: ALL_HEALTHY | DEGRADED | DOWN

If no alerts and no perf signals: output Overall status: ALL_HEALTHY.

Output Format

## Watchdog Report: [base_url]
### Smoke Test Results
- / — 200 (0.231s) — HEALTHY
- /health — 200 (0.089s) — HEALTHY
- /api/status — 500 (1.203s) — SERVER_ERROR

### Alerts
- CRITICAL /api/status — HTTP 500

### Summary
- Total: 3 | Healthy: 2 | Alerts: 1
- Overall status: DEGRADED

Constraints

  1. MUST report with specific metrics — not vague "performance seems slow"
  2. MUST include baseline comparison when available
  3. MUST NOT generate false alarms — precision over recall
  4. MUST separate perf signals from error alerts — they are different severity channels
  5. MUST NOT call perf skill — watchdog is a detector, not a diagnoser

Sharp Edges

Known failure modes for this skill. Check these before declaring done.

| Failure Mode | Severity | Mitigation |

|---|---|---|

| curl timeout treated as slow (not unreachable) | HIGH | Non-zero curl exit code = UNREACHABLE, not a response time measurement |

| PERF_REGRESSION reported without baseline | MEDIUM | Only flag regression if a previous run exists — otherwise INFO: first run |

| All endpoints flagged SLOW because test env is slow | MEDIUM | Note environment context — add ENV: non-production detected if URL contains dev/staging/localhost |

| Perf signal without actionable diagnosis | LOW | Every PERF_WARN must include a hypothesis (N+1, pool saturation, etc.) |

Done When

Cost Profile

~500-1500 tokens input, ~300-800 tokens output. Sonnet for configuration quality.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.