persona-heartbeat

persona-heartbeat is a skill for Claude Code from L-LesterYu/OpenClaw-hot-skills-zh. It costs 118 tokens per session (2,991 once invoked), scanned A, original, MIT.

A session health and memory-maintenance system for an AI personality workspace. It monitors how much conversation context is being used, saves checkpoints when usage is high, and performs background housekeeping.

In plain words
What is it for?
Use it to check context usage, resume earlier sessions, trigger checkpoint notices, offer proactive suggestions, and clean up or archive old memory records.
Why use it?
It helps prevent important work from being lost as a conversation becomes long and keeps stored workspace information maintained over time.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the hiivmind-openclaw-os plugin — 6 skills, 1 command shipped together

Good fit Use it to check context usage, resume earlier sessions, trigger checkpoint notices, offer proactive suggestions, and clean up or archive old memory records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add L-LesterYu/OpenClaw-hot-skills-zh --skill persona-heartbeat
Clone the repo
git clone --depth 1 https://github.com/L-LesterYu/OpenClaw-hot-skills-zh

Made for: Claude Code.

Or install hiivmind-openclaw-os, the plugin that ships this one along with the rest of its 6 skills, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for persona-heartbeat

README.md
[![agentmods](https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat/github.svg)](https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat)
Your own site
<a href="https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat"><img src="https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for persona-heartbeat

Your own site · 80×15
<a href="https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat"><img src="https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/persona-heartbeat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,991 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.02991
Opus 5 $0.00059 $0.01496
Sonnet 5 $0.00024 $0.00598
Haiku 4.5 $0.00012 $0.00299

Measured 12d ago against content hash d29d22d97370, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

persona-heartbeat scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-persona-os-zh/skills/persona-heartbeat/SKILL.md · 400 lines

How it starts

The opening of the file, as written. The whole thing — 400 lines — stays where its author put it; the contents beside it link to each section on GitHub.

人格心跳

AI 人格操作系统的环境监控和健康心跳系统。本技能处理程序化的上下文健康检查、主动建议展示、会话恢复和记忆维护。

阶段 1:上下文健康检查

目的: 监控上下文窗口使用量并根据阈值触发相应操作。

步骤 1.1:确定当前上下文使用量

通过可用的系统指标检查当前上下文窗口使用百分比。

context_usage_pct = get_context_window_usage()
computed.context_level = context_usage_pct

步骤 1.2:应用阈值逻辑并呈现用户可见消息

根据上下文使用量,确定用户看到的内容以及需要采取的操作:

使用范围 用户可见行为
< 50% 无 — 正常运行
50-69% 无 — 内部记录以供跟踪
70-84% "📝 上下文 [X]% — 继续前正在保存检查点。"然后委托给 persona-checkpoint
85-94% "🟠 上下文 [X]% — 已保存紧急检查点。建议尽快启动新会话。"
95%+ "🔴 上下文 [X]% — 严重。正在保存必要信息。请启动新会话。"
if context_usage_pct >= 95:
    show_critical_warning()
    save_essential_state()
    computed.action_taken = "critical_checkpoint"
elif context_usage_pct >= 85:
    show_emergency_warning()
    delegate_to_checkpoint()
    computed.action_taken = "emergency_checkpoint"
elif context_usage_pct >= 70:
    show_checkpoint_notice()
    delegate_to_checkpoint()
    computed.action_taken = "standard_checkpoint"
else:
    computed.action_taken = "none"

步骤 1.3:记录阈值跨越事件

跟踪阈值跨越时间,避免在同一会话中重复通知。

if computed.action_taken != "none":
    timestamp = current_timestamp()
    append_to_session_log(threshold_event, timestamp)

阶段 2:主动建议引擎

目的: 在顾问模式启用时提供有用建议,遵循严格规则以避免噪音。

激活条件: 仅当 USER.md 中顾问模式为开启状态时。

步骤 2.1:检查顾问模式状态

user_config = read_file("~/workspace/USER.md")
advisor_enabled = parse_advisor_mode(user_config)
computed.advisor_active = advisor_enabled

步骤 2.2:评估建议条件

仅在满足所有条件时才展示建议:

  • 发现了关于用户目标的重要新上下文
  • 发现了未注意到的模式或机会
  • 存在时间敏感的机会
  • 当前未进行复杂任务
  • 未超过每会话最多 1 条建议的限制
  • 上一条建议未被忽略/拒绝
if not advisor_enabled:
    return  # 完全跳过建议引擎

suggestion_contexts = [
    "new_goal_context",
    "unnoticed_pattern",
    "time_sensitive_opportunity"
]

blockers = [
    "complex_task_active",
    "session_quota_exceeded",
    "previous_ignored"
]

if any_suggestion_context() and not any_blocker():
    computed.suggestion_eligible = true
else:
    computed.suggestion_eligible = false

Read the full file on GitHub · 400 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 400 lines · 118 tokens per session scan A d29d22d97370

Subscribe to this mod's changes

persona-heartbeat is a skill published in the GitHub repository L-LesterYu/OpenClaw-hot-skills-zh (54 stars, last pushed 5mo ago), licensed MIT. It adds 118 tokens to every session and 2,991 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens