← 返回 Skills 市场
wyblhl

Heartbeat Cron

作者 wyblhl · GitHub ↗ · v0.4.4 · MIT-0
cross-platform ⚠ suspicious
162
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install heartbeat-cron
功能描述
Create and refine HEARTBEAT.md files for murmur — a CLI daemon that runs scheduled Claude prompts on a cron or interval schedule. Use this skill when the use...
使用说明 (SKILL.md)

\r \r

Heartbeat Creator\r

\r Create well-crafted HEARTBEAT.md files for murmur through a structured interview, test run, and refinement loop.\r \r

Context\r

\r Murmur is a minimal scheduler. It reads a HEARTBEAT.md file, sends its contents to Claude on a schedule, and classifies the response:\r \r

  • HEARTBEAT_OK — nothing to report (silent)\r
  • ATTENTION: ... — needs human attention (logged + surfaced in TUI)\r \r Murmur cannot notify the user. It only runs the prompt and logs the result. If the user wants notifications (Slack, Telegram, push), the HEARTBEAT.md itself must include the delivery step. The heartbeat is the entire pipeline: gather data → decide → act → deliver.\r \r Each heartbeat is stateless. Every run is a fresh Claude session with no memory of previous runs. For workflows that need to track changes over time (price deltas, last-checked timestamps), use files in the workspace as simple state stores (e.g., last-price.txt, tracking-state.json).\r \r Sleep/wake behavior. When the machine sleeps, the daemon freezes — no ticks fire. On wake, overdue jobs run immediately but multiple missed runs collapse into a single catch-up execution (not one per missed interval). This is correct for heartbeat-style tasks: you want to check current state, not replay missed checks. If the user needs reliable scheduling, advise them to disable sleep on their machine (see FAQ in README).\r \r

HEARTBEAT.md Format\r

\r Every heartbeat is a markdown file with an optional YAML frontmatter block. Frontmatter values take precedence over config.json.\r \r

---\r
interval: 1h # or cron: "0 9 * * 1-5" (pick one)\r
# tz: America/New_York  # timezone for cron (default: local system tz)\r
# timeout: 15m          # max run time (default: 5m)\r
# agent: claude-code    # "claude-code" (default), "codex", or "pi"\r
# model: opus           # model hint passed to the agent\r
# maxTurns: 50          # cap agent iterations per run (default: 99)\r
# name: My Heartbeat\r
# description: What this heartbeat does\r
# session: my-session   # pi-specific: reuse a named browser session\r
# sandbox: workspace-write  # codex-specific: "read-only", "workspace-write", or "danger-full-access"\r
# networkAccess: false  # codex-specific: allow outbound network in workspace-write sandbox\r
# permissions: skip      # skip permission checks (only "skip" supported in frontmatter)\r
---\r
Your prompt here...\r
```\r
\r
**Notes:**\r
\r
- `interval` or `cron` — use one, not both. Intervals: `15m`, `1h`, `6h`, `1d`. Cron: standard 5-field expressions.\r
- `permissions: "skip"` is the only permissions value supported in frontmatter. For deny lists, use config.json.\r
- `murmur init` generates a template with these fields pre-filled.\r
\r
## Workflow\r
\r
### 0. Preflight\r
\r
Before starting, verify murmur is installed:\r
\r
```bash\r
which murmur\r
```\r
\r
- **Found** → continue to interview.\r
- **Not found** → install via Homebrew:\r
  ```bash\r
  brew install t0dorakis/murmur/murmur\r
  ```\r
  If Homebrew isn't available, install from source:\r
  ```bash\r
  git clone https://github.com/t0dorakis/murmur.git\r
  cd murmur && bun install && bun run build\r
  # Then add ./murmur to PATH\r
  ```\r
\r
You can also scaffold a workspace immediately with flags:\r
\r
```bash\r
murmur init {path} --interval 30m\r
murmur init {path} --cron "0 9 * * 1-5" --timeout 15m\r
murmur init {path} --template github-digest   # Use a starter template\r
```\r
\r
**Multiple heartbeats per repo** — Use `--name` to create heartbeats in a `heartbeats/` directory:\r
\r
```bash\r
murmur init {path} --name issue-worker --interval 30m\r
murmur init {path} --name deploy-monitor --cron "0 9 * * 1-5"\r
```\r
\r
This creates `heartbeats/\x3Cname>/HEARTBEAT.md` inside the workspace. All heartbeats share the repo root as CWD. A root `HEARTBEAT.md` still works alongside named heartbeats.\r
\r
### 1. Interview\r
\r
Conduct a focused interview using AskUserQuestion. Go one or two questions at a time, building on previous answers.\r
\r
**Round 1 — The goal:**\r
\r
Ask what they want automated. If they're unsure or exploring, read [references/examples.md](references/examples.md) for inspiration across categories: code/repos, research/intelligence, ops/infrastructure, personal/creative. Suggest examples that match their context.\r
\r
**Round 1b — Tool discovery:**\r
\r
Before diving into details, check whether the user's goal needs tools beyond what's already installed. Run a web search to find relevant CLIs, MCP servers, or agent skills that could help.\r
\r
**Browser tools** — Many valuable heartbeats need to interact with real websites (checking prices, monitoring pages, logging into portals). Claude's built-in `WebFetch` works for simple static pages, but sites with JavaScript rendering, login flows, or anti-bot measures need a real browser:\r
\r
- [agent-browser](https://github.com/vercel-labs/agent-browser) — Headless browser CLI for AI agents. Works with Claude Code out of the box.\r
- [pi-browser](https://github.com/badlogic/pi-mono) — Browser extension for pi. Use with `agent: pi`.\r
\r
**Other tools** — Search the web for: `"{user's goal}" CLI tool` or `"{user's goal}" MCP server` or check [skills.sh](https://skills.sh) for community skills. Examples:\r
\r
- Calendar access → Google Calendar MCP or pi-google-calendar extension\r
- Slack/Discord delivery → webhook skills on [skills.sh](https://skills.sh)\r
- GitHub operations → ensure `gh` CLI is installed\r
\r
Tell the user what you found and recommend installing anything that would make the heartbeat more capable.\r
\r
**Round 2 — The details:**\r
\r
Based on their goal, dig into specifics:\r
\r
- What tools/APIs/commands are needed? (gh, curl, specific URLs, API keys)\r
- What's the workspace directory?\r
- How often should it run? Two options:\r
  - **Interval** — fixed frequency: `15m`, `1h`, `6h`, `1d`\r
  - **Cron** — precise schedule: `0 9 * * 1-5` (weekdays at 9am), `*/30 * * * *` (every 30 min)\r
  - If they pick cron, ask about timezone (defaults to local system tz)\r
- Does the heartbeat need more than the default 5-minute timeout? (e.g., `timeout: 15m` for long-running tasks)\r
- Any model preference? (default uses whatever the agent defaults to; can set `model: opus`, `model: sonnet`, etc.)\r
- Agent choice: `claude-code` (default) runs Claude Code CLI; `codex` runs OpenAI Codex CLI (uses sandbox policies); `pi` runs the pi agent (has browser extensions)\r
\r
**Round 3 — Delivery:**\r
\r
This is critical. Ask how they want results delivered. Options:\r
\r
- Write to a file in the workspace (simplest — good default)\r
- Post to Slack/Discord via webhook\r
- Send via Telegram bot API\r
- Create a GitHub issue/comment\r
- Push notification via ntfy.sh\r
- Just use ATTENTION response (user checks TUI/logs)\r
\r
Remind them: murmur is just a scheduler — it won't forward anything. If they want to be notified, the heartbeat itself must do the notifying.\r
\r
**Round 3b — Credentials (if needed):**\r
\r
If delivery or data sources need tokens/webhooks:\r
\r
- Env vars from `.env` in the workspace are available (Bun auto-loads them)\r
- Sensitive values should go in `.env`, referenced as `$VAR_NAME` in the heartbeat\r
\r
### 2. Draft\r
\r
Write the HEARTBEAT.md file. Rules:\r
\r
- Include a YAML frontmatter block with at least the schedule (`interval` or `cron`). Add `timeout`, `model`, or other fields as needed based on the interview.\r
- Don't include instructions about HEARTBEAT_OK / ATTENTION — the runtime injects those automatically\r
- Be explicit about every step — Claude has no memory between heartbeats\r
- For change-detection workflows (price drops, new items, status changes), include steps to read/write state files in the workspace (e.g., `last-price.txt`, `tracking-state.json`)\r
- Include exact commands with real values (no `{placeholder}` left behind)\r
- Include the delivery step if the user wants notifications\r
- Keep it focused — one purpose per heartbeat\r
- Use `$VAR_NAME` for secrets\r
\r
Place the file at `{workspace}/HEARTBEAT.md` for single-heartbeat workspaces, or `{workspace}/heartbeats/{name}/HEARTBEAT.md` for multi-heartbeat repos.\r
\r
### 3. Test\r
\r
Run one heartbeat to verify:\r
\r
```bash\r
murmur beat {workspace_path}\r
# Or for a named heartbeat:\r
murmur beat {workspace_path} --name {name}\r
```\r
\r
Show the user the outcome and output.\r
\r
### 4. Evaluate\r
\r
Ask the user: "Did that do what you expected?"\r
\r
- **No** → refine the HEARTBEAT.md based on feedback, test again. Repeat until satisfied.\r
- **Yes** → proceed to register.\r
\r
### 5. Register\r
\r
Register the workspace with murmur so the daemon knows about it:\r
\r
1. Run `murmur init {absolute_workspace_path}` — this auto-registers the workspace in `~/.murmur/config.json` (with `{ path, lastRun: null }`). If HEARTBEAT.md already exists, it skips creating it but still registers.\r
2. Verify registration: `murmur workspaces list`\r
3. Schedule, timeout, model, and other settings live in the HEARTBEAT.md frontmatter — no need to edit config.json for these.\r
4. **Only** edit `~/.murmur/config.json` directly if you need a `permissions.deny` list (frontmatter only supports `permissions: skip`).\r
5. Tell the user to start the daemon:\r
   - `murmur start` — foreground with TUI (press `q` to quit, `d` to detach)\r
   - `murmur start --detach` — background mode (reattach with `murmur watch`)\r
\r
## Rules\r
\r
- Never leave `{placeholder}` values in the final HEARTBEAT.md\r
- Always test with `murmur beat` before declaring done\r
- Always ask the user to evaluate the test result\r
- If a heartbeat needs tools the user doesn't have installed, tell them what to install\r
- One heartbeat = one purpose. Multiple automations in the same repo = use `heartbeats/` directory with `--name`.\r
- Schedule suggestions: `15m` for uptime, `1h` for active dev work, `6h`–`1d` for digests/research. Use cron when the user wants specific times (e.g., `0 9 * * 1-5` for weekday mornings).\r
安全使用建议
This skill appears coherent: it teaches the agent to interview the user, draft HEARTBEAT.md files, test them, and register or scaffold them for the murmur scheduler. Before installing or using it, review any HEARTBEAT.md you create for embedded secrets (Slack webhooks, Telegram tokens, GH credentials) — do not commit secrets into the repo; prefer environment-managed secrets or a vault. If you follow SKILL.md's install instructions, manually verify commands (Homebrew or git clone + bun) and the upstream murmur repo URL. Be cautious if you allow an agent to autonomously install or run external tools on your machine; the skill recommends installing browser-agent tools and other CLIs which will gain filesystem/network access. If you want extra reassurance, run the interview and scaffolding steps manually rather than granting the agent permission to execute installs or system commands.
功能分析
Type: OpenClaw Skill Name: heartbeat-cron Version: 0.4.4 The heartbeat-cron skill is a legitimate utility designed to help users create and manage scheduled automation tasks (heartbeats) for the 'murmur' CLI daemon. The bundle is exceptionally well-documented and includes a comprehensive test suite (unit, integration, and E2E) with nearly 99% code coverage, which is a strong indicator of a professional development workflow. While the skill facilitates the generation of shell commands and network requests (e.g., using curl for Slack/Telegram notifications or the GitHub CLI), these actions are explicitly aligned with the user's stated automation goals. The instructions in SKILL.md and examples.md emphasize security best practices, such as using environment variables for secrets. No evidence of data exfiltration, unauthorized persistence, or malicious prompt injection was found.
能力评估
Purpose & Capability
Name/description (create/refine HEARTBEAT.md for murmur) match the SKILL.md content and included examples. The README-like instructions refer to installing/using murmur, creating HEARTBEAT.md, testing prompts, and scaffolding — all consistent with the purpose. No unrelated credentials, binaries, or config paths are demanded by the skill metadata.
Instruction Scope
The SKILL.md guides interviews, prompt drafting, test runs, and registering heartbeats with murmur; it also suggests checking for and optionally installing murmur (Homebrew or source build), searching for helper CLIs/skills, and using browser tooling for complex web interactions. These actions remain within scope for creating/testing scheduled prompts, but the instructions do encourage the user (or agent) to install external tools and to write files in the workspace (which is expected for this workflow). The skill does not instruct the agent to read unrelated system secrets or sweep system state beyond the workspace.
Install Mechanism
No install spec is embedded in the skill (instruction-only). The SKILL.md documents how users can install murmur (Homebrew or git clone + bun), which are standard user-facing install instructions rather than a hidden install step performed by the skill. There are no opaque download URLs or archive extracts in an installer specification.
Credentials
The skill metadata requests no environment variables or credentials. Example HEARTBEAT.md snippets show using webhooks, Telegram tokens, GH CLI, etc., which are expected for delivery steps — but the skill itself does not demand those secrets. Users should be aware that any heartbeat that posts to external services will need tokens/URLs, and those should be managed carefully (not committed to public repos).
Persistence & Privilege
The skill does not request 'always: true' and uses default autonomous invocation permissions. It does not attempt to modify other skills or system-wide agent settings. Its recommended workspace file writes (logs, reports, heartbeat files) are consistent with its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install heartbeat-cron
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /heartbeat-cron 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.4.4
v0.4.4: Batch publish round 78
v0.4.3
Automated publish test - adding test script
元数据
Slug heartbeat-cron
版本 0.4.4
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Heartbeat Cron 是什么?

Create and refine HEARTBEAT.md files for murmur — a CLI daemon that runs scheduled Claude prompts on a cron or interval schedule. Use this skill when the use... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 162 次。

如何安装 Heartbeat Cron?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install heartbeat-cron」即可一键安装,无需额外配置。

Heartbeat Cron 是免费的吗?

是的,Heartbeat Cron 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Heartbeat Cron 支持哪些平台?

Heartbeat Cron 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Heartbeat Cron?

由 wyblhl(@wyblhl)开发并维护,当前版本 v0.4.4。

💬 留言讨论