heartbeat
Skill0 starsChanged 28 days agoMITView on GitHub
Implement the HEARTBEAT.md pattern for proactive agent behavior. Agents check for updates, run scheduled tasks, and act without user prompting. Each agent has a HEARTBEAT.md file that defines scheduled tasks: If HEARTBEAT.md is empty or missing, no heartbeat fires (saves API costs).
20 other projects use a version of this.
Adopted by
Most recently taken up by
- bradbushSFAI/noltytheir own version, first seen Nov 16, 2026
- BarzinL/barzins-cc-improvementstheir own version, first seen Nov 15, 2026
- naman10parikh/pennyword for word, first seen Nov 8, 2026
- genericService/claude-skillstheir own version, first seen Nov 8, 2026
- naman10parikh/wikimemword for word, first seen Nov 8, 2026
- modimihir07/agentic-ostheir own version, first seen Oct 25, 2026
Other versions20 projects use a version of this.
Word for word · 4
- naman10parikh/agentgrid★ 9100% same
- naman10parikh/wikimem★ 8100% same
- naman10parikh/penny★ 0100% same
- naman10parikh/turbo★ 0100% same
Edited · 0
None found.
Wrote their own version · 16
- 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
6 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 repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agent-runtimeSkill
- frontend-designSkill
- architectSkill
- deep-thinkSkill
- design-systemsSkill
- ecosystem-referenceSkill
- fractal-delegationSkill
- harness-reviewSkill
- integrate-resourcesSkill
- llm-council-critiqueSkill
- loop-createSkill
- mcp-setupSkill
- memory-compressionSkill
- memorySkill
- model-routingSkill
- oss-project-scaffoldSkill
- playwright-cliSkill
- repo-scoutSkill
- self-improveSkill
- skill-creatorSkill
- skill-routingSkill
- sprintSkill
- test-visualSkill
- troubleshootSkill
- ux-auditSkill
- Accessibility AuditorSkill
- artifacts-builderSkill
- brand-guidelinesSkill
- canvas-designSkill
- frontend-patternsSkill
- design-mirrorSkill
- design-system-starterSkill
- design-to-codeSkill
- feature-design-assistantSkill
- figma-implement-designSkill
- frontend-designSkill
- frontend-dev-guidelinesSkill
- mobile-designSkill
- motion-canvasSkill
- pixel-agent-uiSkill
- pixel-animateSkill
- pixel-anti-slopSkill
- pixel-brain-pageSkill
- pixel-migrate-next16Skill
- pixel-rsc-boundarySkill
- pixel-ship-gateSkill
- premium-web-designSkill
- senior-frontendSkill
- shadcnSkill
- tailwind-design-systemSkill
- tailwind-patternsSkill
- theme-factorySkill
- ui-design-systemSkill
- ui-ux-pro-maxSkill
- ux-researcher-designerSkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
If HEARTBEAT.md is empty or missing, no heartbeat fires (saves API costs).
“Common” is measured: kept by at least 6 in 10 of the 15 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
Skill: Heartbeat System
Implement the HEARTBEAT.md pattern for proactive agent behavior. Agents check for updates, run scheduled tasks, and act without user prompting.
Pattern (From OpenClaw/NanoClaw)
Each agent has a HEARTBEAT.md file that defines scheduled tasks:
# Heartbeat — GiftFinder
## Every 6 hours
- [ ] Check tracked items for price drops
- [ ] Scan wishlists for new additions
## Every 24 hours
- [ ] Review saved preferences for staleness
- [ ] Check for new product launches in tracked categories
## Weekly
- [ ] Generate gift suggestion digest for upcoming eventsIf HEARTBEAT.md is empty or missing, no heartbeat fires (saves API costs).
Implementation
Task Scheduler (Host Process)
import { CronJob } from "cron-parser";
interface ScheduledTask {
id: string;
agentId: string;
prompt: string;
scheduleType: "cron" | "interval" | "once";
scheduleValue: string; // cron expression, ms interval, or ISO date
nextRun: Date;
status: "active" | "paused" | "completed";
}
// SQLite schema
const SCHEMA = `
CREATE TABLE IF NOT EXISTS scheduled_tasks (
id TEXT PRIMARY KEY,
agent_id TEXT NOT NULL,
prompt TEXT NOT NULL,
schedule_type TEXT NOT NULL,
schedule_value TEXT NOT NULL,
next_run TEXT NOT NULL,
status TEXT DEFAULT 'active',
last_run TEXT,
created_at TEXT DEFAULT (datetime('now'))
)`;
// Polling loop — check every 30 seconds
async function heartbeatLoop(db: Database): Promise<void> {
while (true) {
const due = db
.prepare(
`SELECT * FROM scheduled_tasks
WHERE status = 'active' AND next_run <= datetime('now')
ORDER BY next_run ASC LIMIT 5`,
)
.all() as ScheduledTask[];
for (const task of due) {
await executeHeartbeatTask(task);
updateNextRun(db, task);
}
await sleep(30_000);
}
}HEARTBEAT.md Parser
function parseHeartbeat(content: string): ScheduledTask[] {
const tasks: ScheduledTask[] = [];
let currentSchedule = "";
for (const line of content.split("\n")) {
const scheduleMatch = line.match(/^##\s+(.+)/);
if (scheduleMatch) {
currentSchedule = scheduleMatch[1].trim();
continue;
}
const taskMatch = line.match(/^-\s+\[[ x]\]\s+(.+)/);
if (taskMatch && currentSchedule) {
tasks.push({
id: crypto.randomUUID(),
agentId: "", // set by caller
prompt: taskMatch[1].trim(),
scheduleType: inferScheduleType(currentSchedule),
scheduleValue: inferScheduleValue(currentSchedule),
nextRun: computeNextRun(currentSchedule),
status: "active",
});
}
}
return tasks;
}
function inferScheduleValue(schedule: string): string {
const lower = schedule.toLowerCase();
if (lower.includes("every 6 hours")) return "0 */6 * * *";
if (lower.includes("every 24 hours") || lower === "daily") return "0 0 * * *";
if (lower === "weekly") return "0 0 * * 0";
if (lower.includes("every")) {
const match = lower.match(/every (\d+) (minute|hour|day)/);
if (match) {
const [, n, unit] = match;
if (unit === "minute") return `*/${n} * * * *`;
if (unit === "hour") return `0 */${n} * * *`;
if (unit === "day") return `0 0 */${n} * *`;
}
}
return "0 0 * * *"; // default: daily
}Heartbeat Execution
async function executeHeartbeatTask(task: ScheduledTask): Promise<void> {
// Spawn sandbox with task prompt + agent context
const prompt = [
`[HEARTBEAT TASK] ${task.prompt}`,
`This is an automated scheduled task. Act on it, save results to memory.`,
`If nothing actionable, reply briefly and exit.`,
].join("\n");
await spawnSandbox({
agentId: task.agentId,
prompt,
isHeartbeat: true, // lower priority in concurrency queue
maxTurns: 10, // cap heartbeat complexity
});
}Key Design Decisions
- Empty HEARTBEAT.md = no heartbeat (cost control)
- Heartbeat tasks run at lower priority than user messages
- Max 10 turns per heartbeat (prevents runaway costs)
- Results saved to agent memory for user visibility
- Tasks are idempotent — safe to retry on failure
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.

