agentleFS
shahshreyshahshrey/unclaw/.claude/skills/heartbeat/SKILL.md

heartbeat

Skill16 starsChanged 8 months agoMITView on GitHub

Proactive check-in with pre-gathered context. Run automatically via launchd every 30 minutes.

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the channel server is DEAD -> run bash ./bin/start-agent.sh to restart (the watchdog also does this, but belt-and-suspenders)

    line 24
  2. Distinctive:

    If there are urgent pending items -> send a notification and summarize what needs attention

    line 25
  3. Distinctive:

    If there are stale uncommitted changes -> suggest committing or stashing

    line 26
  4. Distinctive:

    If nothing needs attention -> do nothing (don't generate output for the sake of it)

    line 27
  5. Very specific:

    NEVER call Telegram's getUpdates API via curl — this competes with the bun long-poller and breaks message delivery

    line 32
  6. Very specific:

    If the channel is flaky, inspect .claude/runtime/watchdog.log, .claude/runtime/incidents/*.log, and the latest …

    line 36

“Common” is measured: kept by at least 6 in 10 of the 11 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Proactive heartbeat — gather context first, then reason:

  1. Gather context (deterministic, no reasoning yet):
    bash .claude/scripts/gather-context.sh
  2. Read the output and assess:
    • Is the configured channel server alive? If DEAD -> this is critical, notify immediately
    • Are there pending/follow-up items with passed or imminent deadlines?
    • Are there uncommitted changes that have been sitting for a long time?
    • Is disk space running low?
    • Are there duplicate claude/tmux processes? (expected: 1 each)
    • Any patterns in today's log that suggest an unfinished thread?
  3. Act based on what you find:
    • If the channel server is DEAD -> run bash ./bin/start-agent.sh to restart (the watchdog also does this, but belt-and-suspenders)
    • If there are urgent pending items -> send a notification and summarize what needs attention
    • If there are stale uncommitted changes -> suggest committing or stashing
    • If nothing needs attention -> do nothing (don't generate output for the sake of it)
  4. Only notify if something is actionable. Silent heartbeats are good. Don't be noisy.

Debugging rules

  • NEVER call Telegram's getUpdates API via curl — this competes with the bun long-poller and breaks message delivery
  • Safe to check: getWebhookInfo (read-only, no side effects)
  • Safe to check: pgrep -f "bun.*server\.ts" (process alive?)
  • Safe to check: lsof -i -P | grep bun (network connections?)
  • If the channel is flaky, inspect .claude/runtime/watchdog.log, .claude/runtime/incidents/*.log, and the latest .claude/runtime/agent-session-*.log before restarting anything

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.