Skip to content
Back to skills

Bot Heartbeat

ASecurity

Pilot Bot heartbeat — spawns background subagent for periodic health check, notifies only when issues are detected

  • 30 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 12, 2026
ai-agentsbashreact

Works with

  • mcp

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill bot-heartbeat --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bot Heartbeat?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bot Heartbeat
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-bot-heartbeat-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-bot-heartbeat-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bot-heartbeat
description: Pilot Bot heartbeat — spawns background subagent for periodic health check, notifies only when issues are detected
model: sonnet
effort: medium
---

# Bot Heartbeat Skill

Spawns a background subagent to run periodic checks.
The main session is released immediately after the subagent is launched.

## Steps

1. Launch a subagent with `run_in_background=true`
2. Main session exits immediately (does not wait for subagent completion)

## Background Subagent Prompt

Prompt to pass to the subagent:

```
You are a heartbeat agent for Pilot Bot.

Steps:
1. Run: bash $PILOT_BOT_DIR/../../.claude/skills/bot-heartbeat/scripts/check.sh
   If the script outputs "SKIP", exit immediately (dedup — heartbeat already ran recently).
2. Evaluate whether any issues exist (dead processes, failed jobs, etc.)
3. Check if Telegram MCP tools (reply, react) are available. Track telegram_available.
4. Notification rule:
   - NO issues → do NOT send any message. Stay silent.
   - Issues found AND telegram_available → send issue details via Telegram reply (brief, no "alive" prefix)
   - Issues found AND NOT telegram_available → output alert to console only.
5. Exit.

Keep it brief. Do not ask questions. Do not wait for responses.
```

## Lock File Dedup

The check.sh script implements lock file deduplication:
- Lock file: `$PILOT_BOT_DIR/.heartbeat-lock`
- Threshold: 1350s (75% of the 30-minute interval)
- If the last check ran within the threshold, check.sh outputs "SKIP" and the subagent exits

## Usage

Registered automatically at boot by `/bot-boot`.
Default schedule: `*/30 * * * *` (every 30 minutes).

## Note

The subagent inherits MCP tools from the main session.
It does not inherit the main session's conversation context.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.