heartbeat
Skill1 starsChanged 6 months agoMITView on GitHub
Nolty's every-30-min self-check during waking hours. Detects Claude Code version drift and self-heals. Scans urgent email + upcoming meetings, alerts via Telegram if something needs attention.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- BarzinL/barzins-cc-improvementstheir own version, first seen Nov 15, 2026
- naman10parikh/pennytheir own version, first seen Nov 8, 2026
- genericService/claude-skillstheir own version, first seen Nov 8, 2026
- naman10parikh/wikimemtheir own version, first seen Nov 8, 2026
- modimihir07/agentic-ostheir own version, first seen Oct 25, 2026
- naman10parikh/turbotheir own version, first seen Oct 25, 2026
Used with
Projects with it also use ecosystem-reference, fractal-delegation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
naman10parikhSkillecosystem-reference
Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.
Also in 5 projects that use this
naman10parikhSkillfractal-delegation
Also in 5 projects that use this
roronoazoroshao369Skillmemory-compression
Also in 5 projects that use this
KirchliveSkillskill-routing
Decides which of the installed skills a task needs and loads them before the work starts. This skill should be used at the beginning of any multi-step task — build, fix, refactor, migrate, review, plan, release, research, write, design, video — and again at every phase change, after context compaction, and when work moves into a different part of the codebase. Use it for requests like "let's build X", "fix this bug", "refactor Y", "plan the migration", "review this", and also when the user asks which skill applies, why a skill did not fire, or asks to check what is available.
Also in 5 projects that use this
sublimotionSkillagent-runtime
Launch and manage detached agent runs on EKS via the agent-runner CLI. Use when the user says "launch an agent run", "agent runtime", "agent-runner", "run this spec on the cluster", "check run status", "agent run logs", or "stop a run". Do NOT use for writing the agent-runner code itself (edit the sibling ../agent-runner repo), Terraform of the foundation (use terraform-automation), or GPU serving deployments (use infra-deployer).
Also in 5 projects that use this
GoZippySkillrepo-scout
Also in 5 projects that use this
- +5 more from naman10parikh
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- frank890417/taiwan-md★ 1.2ksame name
- aaronjmars/aeon★ 794same name
- aeonfun/aeon★ 793same name
- modimihir07/agentic-os★ 209same name
- crisandrews/ClawCode★ 64same name
- reneyuxi0402/claude-cant-sleep★ 43same name
- systemind-team/AICOO-Skills★ 35same name
- aaronjmars/miroshark-aeon★ 20same name
- MiroShark/miroshark-aeon★ 20same name
- shahshrey/unclaw★ 17same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- TelegramConfig/CLAUDE.mdCLAUDE.md
- chatgpt-imageSkill
- cron-managementSkill
- nolty-moodSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
If you see a [cron model:X effort:Y] suffix, you were fired by cron-runner.py.
- Very specific: line 27
If hour < 7 OR hour >= 23 → QUIET HOURS.
- Very specific: line 121
Attribution rule: When reporting a thread, show who sent the most recent message — not the thread starter.
- Very specific: line 141
Only flag if diff_min is between 1 and 60 (inclusive)
- Very specific: line 142
Check memory/heartbeat-state.json → remindedEvents — if already reminded, skip
- Very specific: line 151
If a meeting was alerted, append it to memory/heartbeat-state.json → remindedEvents as "<title> <YYYY-MM-DD>" to prevent repeat pings.
- Very specific: line 157
If nothing urgent, respond with HEARTBEAT_OK <timestamp from STEP 0> and exit.
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Heartbeat
You are Nolty, running a scheduled heartbeat.
If you see a [cron model:X effort:Y] suffix, you were fired by cron-runner.py. Spawn a Task sub-agent with the specified model + effort. The sub-agent runs the steps below and has access to your reply MCP tool.
cron-runner fires this every 30 minutes, 24/7 — so the skill itself gates off-hours. Never send a Telegram outside the user's active hours (see USER.md), even if something seems urgent.
STEP 0 — Time gate (do this FIRST, before anything else)
Get the current hour in the user's timezone (look up Timezone in USER.md; default America/Chicago):
TZ='America/Chicago' date '+%Y-%m-%d %H:%M %Z (hour=%H, dow=%u)'Parse the hour=HH value as an integer.
Decision:
- If
hour < 7ORhour >= 23→ QUIET HOURS. Respond with the exact textQUIET_HOURS <timestamp>and exit. Make NO further tool calls. No file reads. No email checks. No Telegram. Nothing. - Otherwise, continue to STEP 0.5.
This rule is absolute. Customize the 7/23 bounds by reading active hours from USER.md if set.
STEP 0.5 — Claude Code version-drift self-heal
Claude Code auto-upgrades its binary symlink. When an upgrade lands, the supervisor daemon self-restarts but Nolty's tmux-resident process stays on the OLD binary — the Telegram plugin's bridge breaks (inbound still works, outbound reply fails silently). Detect drift and trigger a detached restart.
Run this block:
PANE_PID=$(tmux list-panes -t CC_running_like_OC -F '#{pane_pid}' 2>/dev/null | head -1)
CLAUDE_PID=$(pgrep -P "$PANE_PID" -f 'claude.*--channels' 2>/dev/null | head -1)
RUNNING=$(lsof -p "$CLAUDE_PID" 2>/dev/null | grep -oE 'versions/[0-9]+\.[0-9]+\.[0-9]+' | head -1 | cut -d/ -f2)
LATEST=$(ls -1 ~/.local/share/claude/versions/ 2>/dev/null | sort -V | tail -1)
echo "claude version: running=$RUNNING latest=$LATEST"
if [ -n "$RUNNING" ] && [ -n "$LATEST" ] && [ "$RUNNING" != "$LATEST" ]; then
NOLTY_HOME="${NOLTY_HOME:-$HOME/Documents/CodingProjects/nolty}"
nohup "$NOLTY_HOME/clawd-restart.sh" > /tmp/heartbeat-restart-$(date +%s).log 2>&1 &
disown 2>/dev/null
echo "VERSION_DRIFT_RESTART_TRIGGERED running=$RUNNING latest=$LATEST"
exit 0
fiDecision:
RUNNINGempty (couldn't detect) → continue. Don't fail just because detection failed.RUNNING == LATEST→ continue.RUNNING != LATEST→ restart triggered. Tmux session (and you) will die within seconds. Do NOT do other steps. Exit withVERSION_DRIFT_RESTART_TRIGGERED.
nohup ... & is critical — the restart script must survive the kill of its parent.
STEP 0.6 — Bun listener presence check
The Telegram plugin spawns a bun child process that long-polls Telegram for inbound messages. It dies silently under several conditions: Mac sleep/wake severs the TCP connection, CC binary swaps leave it zombie, the plugin's "experimental" channel gets unreliable over long uptime. When bun is dead, the main claude process is still alive — but inbound Telegram messages don't reach the agent. No error is surfaced anywhere.
Same self-heal pattern as STEP 0.5, but on a different signal.
Run this block:
NOLTY_HOME="${NOLTY_HOME:-$HOME/Documents/CodingProjects/nolty}"
BUN_PID=$(pgrep -f 'bun.*telegram' 2>/dev/null | head -1)
if [ -z "$BUN_PID" ]; then
echo "BUN_LISTENER_MISSING — triggering restart"
nohup "$NOLTY_HOME/clawd-restart.sh" > /tmp/heartbeat-bun-restart-$(date +%s).log 2>&1 &
disown 2>/dev/null
echo "BUN_RESTART_TRIGGERED"
exit 0
else
echo "bun listener alive (PID $BUN_PID)"
fiDecision:
- bun process found → continue to STEP 1.
- bun process missing → detached restart triggered. Tmux + main claude + your own sub-agent will die within seconds when
clawd-restart.shkills the session. Do NOT continue. Exit with sentinelBUN_RESTART_TRIGGERED.
Same nohup ... & discipline as STEP 0.5 — the restart script must outlive its parent.
This catches the silent-Telegram-death failure mode within 30 min (the heartbeat cadence), the same way STEP 0.5 catches version drift.
STEP 1 — Identity refresh (only during active hours)
Briefly read these to stay grounded:
SOUL.mdIDENTITY.mdMEMORY.md
STEP 2 — Urgent unread email
/opt/homebrew/bin/gog gmail search "is:unread" --limit 10 --account YOUR_EMAIL@example.com(Replace YOUR_EMAIL with the value from USER.md. If you don't use gog, substitute mcp__claude_ai_Gmail__search_threads.)
Flag only:
- Client replies
- Meeting reschedules / confirmations
- Time-sensitive items (invoices due, deadlines, urgent requests from known contacts)
Skip: newsletters, promotions, automated notifications, OOO auto-replies, LinkedIn/Apollo summaries, LinkedIn InMail messages (any email from LinkedIn with "InMail" in subject or body).
Attribution rule: When reporting a thread, show who sent the most recent message — not the thread starter. Parse the From header of the newest unread message in the thread.
STEP 3 — Upcoming meeting (next 60 min)
/opt/homebrew/bin/gog calendar list --today --account YOUR_EMAIL@example.comCompute time delta in bash — do NOT do mental math. For each event:
now_epoch=$(TZ='America/Chicago' date +%s)
meeting_time="HH:MM" # replace with actual start time from calendar
meeting_epoch=$(TZ='America/Chicago' date -j -f "%Y-%m-%d %H:%M" "$(TZ='America/Chicago' date +%Y-%m-%d) $meeting_time" +%s)
diff_min=$(( (meeting_epoch - now_epoch) / 60 ))
echo "$diff_min minutes until meeting"- Only flag if
diff_minis between 1 and 60 (inclusive) - Check
memory/heartbeat-state.json→remindedEvents— if already reminded, skip - Skip all-day events and events already in progress (
diff_min<= 0)
STEP 4 — Alert (only if anything from steps 2-3 needs attention)
Combine into ONE concise Telegram (under 300 chars, Markdown supported) and send via the reply MCP tool with chat_id from USER.md. Start with "❗" so the user sees urgency at a glance.
If a meeting was alerted, append it to memory/heartbeat-state.json → remindedEvents as "<title> <YYYY-MM-DD>" to prevent repeat pings.
STEP 5 — Silence
If nothing urgent, respond with HEARTBEAT_OK <timestamp from STEP 0> and exit. Do NOT send a silent Telegram.
Hard rules
- Quiet hours are absolute. Outside active hours →
QUIET_HOURSand exit, no tool calls. - Use the
replyMCP tool for Telegram, notsend-telegram.sh. - Never send a silent "nothing to report" Telegram. Silence =
HEARTBEAT_OKresponse only. - Deduplicate meeting reminders via
remindedEvents.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

