kata-session-heartbeat

Write atomic JSON heartbeat records for active Claude Code sessions.

Updated Sep 3, 2025
One-click install
npx skills add https://github.com/guardiatechnology/design-system --skill kata-session-heartbeat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kata-session-heartbeat
Source: https://github.com/guardiatechnology/design-system/tree/main/.claude/skills/kata-session-heartbeat
Command: npx skills add https://github.com/guardiatechnology/design-system --skill kata-session-heartbeat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents Claude Code session tracking from losing continuity by keeping a persistent heartbeat record updated for the currently active plan and session.

Core Features & Use Cases

  • Session heartbeat recording: Writes/updates a JSON heartbeat file keyed by the current session id.
  • Atomic, idempotent updates: Preserves the original started_at timestamp and only refreshes last_heartbeat and last_activity, using an atomic write pattern.
  • Configurable storage location: Chooses the heartbeat directory from directives and defaults to a standard sessions folder.

Quick Start

Run the kata inside Claude Code with an active plan so it can update the heartbeat JSON for the current session.

Frequently Asked Questions about kata-session-heartbeat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track active Claude Code sessions with a persistent heartbeat?

You can track active Claude Code sessions by writing a JSON heartbeat file keyed by session id. The heartbeat record preserves the original started_at timestamp while updating last_heartbeat and last_activity fields.

What is an atomic file write for session heartbeat tracking?

An atomic file write ensures the JSON heartbeat record is saved completely or not at all, preventing corrupted session data. It refreshes last_heartbeat and last_activity without losing the original started_at value during automated work.

How do I keep session tracking from losing continuity during automated work?

Session tracking maintains continuity by creating or refreshing a per-session JSON record. It uses Claude Code environment variables for session id and entrypoint to update the active plan heartbeat idempotently.

Does Claude Code session heartbeat recording require specific environment variables?

Yes, heartbeat recording requires session id and entrypoint variables from the Claude Code environment. It also needs heartbeat recording enabled via directives and a resolved directory to store the JSON file.

Can I configure the storage location for Claude Code session heartbeat files?

Yes, you can configure the heartbeat directory through directives. If no specific directory is provided, it defaults to a standard sessions folder for writing the atomic JSON heartbeat record.