← Back to Skills Marketplace
nyxun123

Agent Heartbeat

by nyxun123 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
616
Downloads
0
Stars
5
Active Installs
1
Versions
Install in OpenClaw
/install agent-heartbeat
Description
Agent 心跳配置技能 — 配置 OpenClaw Agent 的定期心跳机制,保持在线状态,自动检查任务和更新。适用于需要长期运行的 Agent 任务。
README (SKILL.md)

Agent Heartbeat 配置技能

触发词: heartbeat, 心跳, 定期任务, 在线状态, cron, schedule

问题

Agent 需要定期检查任务、保持在线状态、执行定时操作,但缺乏配置心跳的指导。

解决方案

通过配置 HEARTBEAT.md 文件,设置 Agent 定期执行的任务。

HEARTBEAT.md 配置

# Heartbeat Tasks

## 每30分钟检查一次
- 检查未完成的任务
- 发送在线状态更新
- 检查新消息

## 每小时执行一次
- 清理临时文件
- 备份重要数据
- 同步远程状态

OpenClaw CLI 配置

# 查看当前心跳配置
openclaw --profile \x3Cprofile> status

# 心跳间隔默认为 30 分钟
# 可以通过配置文件修改

最佳实践

  1. 保持心跳任务轻量 - 避免在心跳中执行耗时操作
  2. 幂等性 - 心跳任务应该可以安全地重复执行
  3. 错误处理 - 心跳失败不应影响 Agent 正常运行
  4. 日志记录 - 记录心跳执行情况便于调试

示例:监控心跳

// 在心跳中检查服务状态
async function heartbeat() {
  const status = await checkServices();
  if (status.degraded) {
    await notifyAdmin('Service degraded');
  }
  return { ok: true, timestamp: Date.now() };
}

相关技能

  • error-handling - 错误处理模式
  • http-retry - HTTP 重试机制
Usage Guidance
This is an instruction-only skill that helps you author a HEARTBEAT.md and follow best practices for periodic agent tasks. Before using it: (1) ensure you have the OpenClaw CLI available if you plan to run the shown commands (the SKILL.md references it but the skill metadata doesn't declare the binary), (2) place HEARTBEAT.md in a repository or path your agent legitimately uses and set file permissions appropriately, (3) keep heartbeat tasks lightweight and avoid doing sensitive operations in them, and (4) test heartbeats in a staging environment to confirm they don't unintentionally trigger heavy work or data exposure. Because the skill contains only documentation and examples, it does not itself execute code or request credentials.
Capability Analysis
Type: OpenClaw Skill Name: agent-heartbeat Version: 1.0.0 The skill bundle describes how to configure an agent heartbeat mechanism. The `SKILL.md` provides instructions and examples for setting up periodic tasks and checking agent status. There is no evidence of malicious prompt injection, data exfiltration, unauthorized command execution, or any other harmful intent. All examples, including the `HEARTBEAT.md` content and JavaScript snippet, align with the stated benign purpose of configuring a heartbeat.
Capability Assessment
Purpose & Capability
The skill's name and description (configuring an agent heartbeat) match the SKILL.md contents (creating HEARTBEAT.md, examples, best practices). One small inconsistency: the documentation references the 'openclaw' CLI, but the registry metadata lists no required binaries. The skill is instruction-only and does not itself install or require additional services, but users should have the OpenClaw CLI available for the provided commands to work.
Instruction Scope
SKILL.md stays within scope: it describes creating a HEARTBEAT.md, how to configure/check heartbeat, best practices, and a small JavaScript example. It does not instruct reading unrelated system files, collecting secrets, or sending data to external endpoints beyond expected notifications (e.g., notifyAdmin in example).
Install Mechanism
No install spec and no code files — lowest-risk, nothing is written to disk by the skill itself. The skill only provides guidance and examples.
Credentials
The skill declares no required environment variables, credentials, or config paths, and the instructions do not request secrets or unrelated credentials. Proportional to its stated purpose.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request permanent presence or modify other skills' configs. Autonomous model invocation remains platform-default and is not specially enabled here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-heartbeat
  3. After installation, invoke the skill by name or use /agent-heartbeat
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of agent-heartbeat. - Provides configuration guidelines for OpenClaw Agent's periodic heartbeat mechanism. - Explains how to schedule regular tasks via a HEARTBEAT.md file. - Includes best practices for heartbeat task design: lightweight, idempotent, fault-tolerant, and with logging. - Offers sample configuration and code snippets for setup and monitoring. - Lists related skills for enhanced error handling and retry support.
Metadata
Slug agent-heartbeat
Version 1.0.0
License
All-time Installs 5
Active Installs 5
Total Versions 1
Frequently Asked Questions

What is Agent Heartbeat?

Agent 心跳配置技能 — 配置 OpenClaw Agent 的定期心跳机制,保持在线状态,自动检查任务和更新。适用于需要长期运行的 Agent 任务。 It is an AI Agent Skill for Claude Code / OpenClaw, with 616 downloads so far.

How do I install Agent Heartbeat?

Run "/install agent-heartbeat" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Heartbeat free?

Yes, Agent Heartbeat is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Heartbeat support?

Agent Heartbeat is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Heartbeat?

It is built and maintained by nyxun123 (@nyxun123); the current version is v1.0.0.

💬 Comments