Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Agent wake-up and health monitoring protocol. 9-step startup cycle that grounds the agent in identity, fetches tasks, selects work, and begins execution. Also serves as a periodic health check — detect stalled or dead agents. Scheduled or event-triggered. Triggers on: "heartbeat", "wake up", "agent health", "check agents"
.claude/skills/miosa-osa-heartbeat/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 82% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 104% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -59% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -60% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -32% | 0% |
> Agent wake-up protocol and health monitoring.
Two functions in one. First: the startup ritual every agent runs when it wakes up — a 9-step cycle that establishes identity, checks approvals, fetches available work, selects a task, locks it, understands context, executes, updates status, and optionally delegates sub-work. Second: a monitoring heartbeat that detects stalled, crashed, or unresponsive agents and triggers recovery.
bash# Run the wake-up cycle (agent runs this on startup) /heartbeat # Run heartbeat for a specific agent /heartbeat --agent researcher # Check health of all running agents /heartbeat --check-all # Set heartbeat interval /heartbeat --interval 60s # View heartbeat history /heartbeat --history --last 10 # Force wake-up of a stalled agent /heartbeat --wake researcher
| Flag | Type | Default | Description | |------|------|---------|-------------| | --agent | string | self | Agent to run heartbeat for | | --check-all | flag | false | Health check all registered agents | | --interval | duration | 60s | Time between heartbeat pings | | --timeout | duration | 180s | Mark agent as stalled after this silence | | --history | flag | false | Show heartbeat event history | | --last | int | 10 | Number of history entries to show | | --wake | string | — | Force wake-up of a specific agent | | --on-stall | enum | warn | Action on stall: warn, restart, reassign, kill |
/approve). Process approvals before starting new work./checkout. If lock fails (409), return to step 4.in_progress → complete or blocked. Send result message to parent./delegate. Return to step 3 if more work available.--interval.--timeout.--on-stall: warn (log + alert), restart (kill + respawn), reassign (release tasks + redistribute), kill (terminate).markdown## Heartbeat — researcher (agent-a1b2) | Step | Status | Detail | |------|--------|--------| | 1. Identity | done | researcher / Market Analyst / scope: read-only | | 2. Approvals | done | 0 pending | | 3. Fetch tasks | done | 3 available tasks | | 4. Select work | done | task-d4e5: "Analyze competitor pricing" (priority: high) | | 5. Checkout | done | Lock acquired | | 6. Understand | done | Loaded 4 context files (8,200 tokens) | | 7. Execute | running | ... |
markdown## Agent Health — All Agents | Agent | Status | Last Heartbeat | Current Task | Budget Used | |-------|--------|---------------|--------------|-------------| | researcher | healthy | 12s ago | task-d4e5 | 23,400/50,000 | | writer | healthy | 8s ago | task-f6g7 | 11,200/30,000 | | analyst | stalled | 4m 12s ago | task-h8i9 | 45,100/50,000 | | coder | idle | 3s ago | — | 0/100,000 | ### Alerts - analyst: STALLED (exceeded 180s timeout). Last activity: writing to processed/report.md. Action: warn.
/checkout — Task locking (step 5)/inbox — Message checking (step 2) and result delivery (step 8)/delegate — Sub-task creation (step 9)/budget — Budget tracking| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,106 | 8,513 | +5% | 1 | 1 | 0% | 1,318 | 2,397 | +82% | 0 | 0 | — |
case-02 | fail→fail | 11,432 | 6,352 | -44% | 1 | 1 | 0% | 1,885 | 2,131 | +13% | 0 | 0 | — |
case-03 | fail→pass | 8,467 | 6,525 | -23% | 1 | 1 | 0% | 1,112 | 2,266 | +104% | 0 | 0 | — |
case-04 | fail→pass | 20,863 | 2,002 | -90% | 1 | 1 | 0% | 3,573 | 1,452 | -59% | 0 | 0 | — |
case-05 | fail→pass | 23,938 | 2,103 | -91% | 1 | 1 | 0% | 3,457 | 1,400 | -60% | 0 | 0 | — |
case-06 | fail→pass | 14,142 | 3,049 | -78% | 1 | 1 | 0% | 2,283 | 1,550 | -32% | 0 | 0 | — |
case-07 | fail→pass | 22,888 | 3,040 | -87% | 1 | 1 | 0% | 2,967 | 1,586 | -47% | 0 | 0 | — |
case-08 | fail→fail | 65,509 | 2,261 | -97% | 1 | 1 | 0% | 3,403 | 1,457 | -57% | 0 | 0 | — |
case-09 | fail→pass | 6,864 | 2,533 | -63% | 1 | 1 | 0% | 1,077 | 1,453 | +35% | 0 | 0 | — |
case-10 | pass→pass | 9,585 | 3,897 | -59% | 1 | 1 | 0% | 1,229 | 1,861 | +51% | 0 | 0 | — |
case-11 | fail→pass | 11,641 | 2,110 | -82% | 1 | 1 | 0% | 1,925 | 1,499 | -22% | 0 | 0 | — |
case-12 | pass→pass | 19,964 | 3,410 | -83% | 1 | 1 | 0% | 2,805 | 1,628 | -42% | 0 | 0 | — |
case-13 | fail→pass | 9,790 | 1,360 | -86% | 1 | 1 | 0% | 1,610 | 1,356 | -16% | 0 | 0 | — |
case-14 | fail→pass | 12,072 | 1,646 | -86% | 1 | 1 | 0% | 1,884 | 1,442 | -23% | 0 | 0 | — |
case-15 | fail→pass | 39,570 | 1,549 | -96% | 1 | 1 | 0% | 6,947 | 1,411 | -80% | 0 | 0 | — |
case-16 | fail→pass | 9,786 | 2,198 | -78% | 1 | 1 | 0% | 1,423 | 1,567 | +10% | 0 | 0 | — |
case-17 | fail→pass | 8,740 | 2,704 | -69% | 1 | 1 | 0% | 1,529 | 1,579 | +3% | 0 | 0 | — |
case-18 | pass→pass | 15,860 | 3,941 | -75% | 1 | 1 | 0% | 2,584 | 1,773 | -31% | 0 | 0 | — |
case-19 | pass→pass | 11,365 | 10,602 | -7% | 1 | 1 | 0% | 1,699 | 2,974 | +75% | 0 | 0 | — |
case-20 | pass→pass | 8,979 | 7,061 | -21% | 1 | 1 | 0% | 1,868 | 2,527 | +35% | 0 | 0 | — |
case-21 | pass→pass | 20,410 | 25,018 | +23% | 1 | 1 | 0% | 3,062 | 4,814 | +57% | 0 | 0 | — |
case-22 | pass→pass | 8,773 | 6,845 | -22% | 1 | 1 | 0% | 1,657 | 2,448 | +48% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.