← 返回 Skills 市场
nyxun123

Agent Heartbeat

作者 nyxun123 · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
616
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-heartbeat
功能描述
Agent 心跳配置技能 — 配置 OpenClaw Agent 的定期心跳机制,保持在线状态,自动检查任务和更新。适用于需要长期运行的 Agent 任务。
使用说明 (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 重试机制
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-heartbeat
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-heartbeat 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug agent-heartbeat
版本 1.0.0
许可证
累计安装 5
当前安装数 5
历史版本数 1
常见问题

Agent Heartbeat 是什么?

Agent 心跳配置技能 — 配置 OpenClaw Agent 的定期心跳机制,保持在线状态,自动检查任务和更新。适用于需要长期运行的 Agent 任务。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 616 次。

如何安装 Agent Heartbeat?

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

Agent Heartbeat 是免费的吗?

是的,Agent Heartbeat 完全免费(开源免费),可自由下载、安装和使用。

Agent Heartbeat 支持哪些平台?

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

谁开发了 Agent Heartbeat?

由 nyxun123(@nyxun123)开发并维护,当前版本 v1.0.0。

💬 留言讨论