heartbeat
Skill64 starsChanged 2 months agoMITView on GitHub
Run agent heartbeat — periodic checks, memory consolidation, proactive work. Triggers on /agent:heartbeat, "heartbeat", "heartbeat check", "periodic check", "consolidar memoria".
18 other projects use a version of this.
Adopted by
Most recently taken up by
- 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
- naman10parikh/pixeltheir 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
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
BenjaminGSkillharness-review
Turn one PR's review comments into harness fixes — classify each cause by the most solid place it can live (codebase, lint, rules, skill), then draft the fixes in a separate PR.
Also in 5 projects that use this
- +6 more from naman10parikh
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- frank890417/taiwan-md★ 1.2ksame name
- aaronjmars/aeon★ 789same name
- aeonfun/aeon★ 789same name
- modimihir07/agentic-os★ 209same 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
- naman10parikh/agentgrid★ 9same name
8 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 repository23 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run the agent's periodic checks.
- Very specific: line 17
Call CronList and pipe its FULL output to: bash "$CLAUDE_PLUGIN_ROOT/skills/crons/writeback.sh" audit (mechanical diff: refreshes …
- Very specific: line 20
If orphaned=0 and blocked=0: clear cronAudit.pending in memory/heartbeat-state.json if set — done, say nothing.
- Distinctive: line 37
Remove outdated entries from MEMORY.md
- Very specific: line 38
Check IMPORT_BACKLOG.md if it exists — remind user about pending items
- Distinctive: line 39
Verify installed skills are accessible
- Distinctive: line 44
If something needs the user's attention → notify (via reply tool if on a messaging channel, or print if CLI)
- Distinctive: line 45
If nothing noteworthy → do nothing.
- Distinctive: line 54
When a check is no longer needed → agent removes it from HEARTBEAT.md
- Very specific: line 77
Default: */30 * * * * (every 30 minutes)
- Distinctive: line 78
Only fires while Claude Code is open and REPL is idle
“Common” is measured: kept by at least 6 in 10 of the 17 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
Run the agent's periodic checks. Triggered every 30 minutes by a local cron, or manually.
How it works
- Cron health (ALWAYS — even outside active hours). This is infrastructure, not a user-facing check; it is what heals orphaned reminders in long-running sessions (see issue #32). This step manages its own state: it reads AND writes the
cronAuditfield ofmemory/heartbeat-state.jsonitself, here, regardless of whether the later steps run. Every heartbeat:- Load the tools once per session if needed:
ToolSearch(query="select:CronList,CronCreate"). - Retire fired one-shots FIRST so the repair below cannot resurrect them:
bash "$CLAUDE_PLUGIN_ROOT/skills/crons/writeback.sh" prune-expired - Call
CronListand pipe its FULL output to:bash "$CLAUDE_PLUGIN_ROOT/skills/crons/writeback.sh" audit(mechanical diff: refresheslastSeenAlive, relinks survivors, printsorphan key=…/blocked key=…lines and anaudit: alive=K/N …summary; exit 4 = format drift — stop, surface it, do not create anything). - If
orphaned=0andblocked=0: clearcronAudit.pendinginmemory/heartbeat-state.jsonif set — done, say nothing. - If
orphaned>0: repairorphan key=lines ONLY (NEVERblocked key=lines — those have ambiguous live duplicates; recreating them would add a third copy).touch "$CLAUDE_PROJECT_DIR/memory/.reconciling"(the registry's crons are replayed verbatim, so the cron-from.sh stamp gate must be bypassed), then for each orphan key:CronCreatewith that entry's cron/prompt/recurring frommemory/crons.json+writeback.sh set-alive --key <key> --harness-task-id <new id>; continue past individual failures. Thenrm -f "$CLAUDE_PROJECT_DIR/memory/.reconciling"immediately and re-runCronList→audit. - Notification throttle: write the keys still orphaned-after-repair or blocked into
cronAudit.pending(with a timestamp) inmemory/heartbeat-state.json. Notify the user ONLY when the same key(s) were already incronAudit.pendingfrom the previous beat — one notice (orphans: "couldn't re-create X, run /agent:crons reconcile"; blocked: "X has duplicate live reminders, review with /agent:crons list"), then record it as notified so it doesn't repeat every beat.
- Load the tools once per session if needed:
- Check active hours — read
agent-config.jsonforheartbeat.activeHours. If outside the window, skip the remaining steps silently (the cron-health step above already ran). - Load state — read
memory/heartbeat-state.json(if exists) to know when each check last ran. Avoid repeating checks done less than 30 min ago. - Read HEARTBEAT.md — this is the checklist. Follow it strictly. Do not infer or repeat old tasks from prior conversations. If nothing in the checklist needs attention, skip to step 7.
- Execute checks — rotate through the items in HEARTBEAT.md, doing 2-4 per heartbeat (not all every time). For each:
- Memory consolidation: review last 3 daily logs → distill insights → update MEMORY.md
- Dream review:
dream(action='status')→ note high-recall items not yet promoted - Custom checks: whatever the user added to HEARTBEAT.md (emails, health, projects, etc.)
- Proactive work (do without asking):
- Organize memory files
- Remove outdated entries from MEMORY.md
- Check
IMPORT_BACKLOG.mdif it exists — remind user about pending items - Verify installed skills are accessible
- Update state — write
memory/heartbeat-state.jsonwith timestamps for each check performed. - Notify or stay quiet:
- If something needs the user's attention → notify (via reply tool if on a messaging channel, or print if CLI)
- If nothing noteworthy → do nothing. No "heartbeat completed" messages.
Self-managing the checklist
The agent should edit HEARTBEAT.md during normal conversations when something needs periodic attention:
- User says "revísame los emails cada rato" → agent adds
- **Email inbox** — check for urgent unreadto HEARTBEAT.md - User installs a new skill with periodic needs → agent adds a check for it
- A reminder is due daily → agent adds it to HEARTBEAT.md instead of creating a separate cron
- When a check is no longer needed → agent removes it from HEARTBEAT.md
Rule: batch similar checks into HEARTBEAT.md instead of creating multiple cron jobs. Heartbeats are cheaper (one turn, multiple checks) than separate crons (one turn each).
Active hours
{
"heartbeat": {
"activeHours": {
"start": "08:00",
"end": "23:00",
"timezone": "America/Santiago"
}
}
}Outside this window, heartbeats skip silently. Configure via /agent:settings.
Scheduling
Created automatically on first session (SessionStart hook):
- Default:
*/30 * * * *(every 30 minutes) - Only fires while Claude Code is open and REPL is idle
- For 24/7 heartbeats, use
/agent:service install
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.

