health

health is a command for Claude Code from RohiRIK/OpenLtm. It costs 37 tokens per session (2,326 once invoked), scanned B, original, MIT.

A command for checking the health of stored project memories, including their freshness, confidence, coverage, and recent activity.

In plain words
What is it for?
It is for reviewing memory scores, finding stale memories, inspecting cleanup status, and diagnosing memory decay.
Why use it?
It helps reveal when saved context is becoming outdated, incomplete, or neglected.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the openltm plugin — 6 skills, 8 commands, 2 agents, 6 hooks shipped together

Good fit It is for reviewing memory scores, finding stale memories, inspecting cleanup status, and diagnosing memory decay.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add RohiRIK/OpenLtm
Claude Code
/plugin install openltm

Made for: Claude Code.

Or install openltm, the plugin that ships this one along with the rest of its 6 skills, 8 commands, 2 agents, 6 hooks.

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 health

README.md
[![agentmods](https://agentmods.dev/badge/commands/rohirik/openltm/health/github.svg)](https://agentmods.dev/commands/rohirik/openltm/health)
Your own site
<a href="https://agentmods.dev/commands/rohirik/openltm/health"><img src="https://agentmods.dev/badge/commands/rohirik/openltm/health/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 health

Your own site · 80×15
<a href="https://agentmods.dev/commands/rohirik/openltm/health"><img src="https://agentmods.dev/badge/commands/rohirik/openltm/health.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,326 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00037 $0.02326
Opus 5.5 $0.00015 $0.00930
Sonnet 5.5 $0.00007 $0.00465
Haiku 4.5 $0.00004 $0.00233

Measured 1mo ago against content hash abbd1aced4d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

health scanned grade B with 2 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 1mo 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Exit 0: no OpenLTM hooks in `~/.claude/settings.json` — show `🟢 hooks come from the plugin only`.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:7331/api/health/projects
commands/health.md · 218 lines

How it starts

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

Project Health Scores

curl -s http://localhost:7331/api/health/projects

If the server responds: parse JSON and render ranked table (highest score first):

SCORE  STATUS           PROJECT              MEMORIES  STALE  CTX
  85   🟢 healthy        claude-config            142      3   4/4
  62   🟡 needs_attention my-app                   38     12   2/4
  31   🔴 neglected       old-project               9      9   0/4

Status: 🟢 ≥70 · 🟡 40–69 · 🔴 <40

Metric Weight
Memory freshness (accessed ≤30 days) 35%
Avg confidence 25%
Context coverage (goal/decision/gotcha/progress) 20%
Session activity (any access ≤14 days) 20%

If the server is NOT running, show: (graph server offline — start with /openltm:server start)


Activity (last 24 h)

Prefer ltm.jsonl (structured JSONL log) when available; fall back to hooks.log.

bun --eval "
import { readFileSync, existsSync, statSync } from 'fs';
import { join } from 'path';
import { homedir } from 'os';

const PLUGIN_DATA = '${CLAUDE_PLUGIN_DATA}' || process.env.CLAUDE_PLUGIN_DATA;
const JSONL_LOG = join(PLUGIN_DATA, 'logs', 'ltm.jsonl');
const HOOKS_LOG = join(homedir(), '.claude', 'logs', 'hooks.log');

const LABELS = {
  'session.start':     'Sessions started',
  'session.evaluated': 'Sessions evaluated',
  'context.updated':   'Context updates',
  'compact.pre':       'Compactions',
  'recall.hit':        'Recall hits',
  'learn.write':       'Memories learned',
  'recall.prompt':     'Prompt recalls',
  'memory.stale_flagged': 'Stale flags (commits)',
  'wizard.complete':   'Wizard completions',
  'git.commit':        'Git commits tracked',
  'server.notify':     'Server notifies',
};

const cutoff = Date.now() - 24 * 60 * 60 * 1000;
const counts = {};
const hookCounts = {};
const errors = [];

if (existsSync(JSONL_LOG)) {
  // Primary: ltm.jsonl — structured LtmEvent lines
  readFileSync(JSONL_LOG, 'utf-8').trim().split('\n').slice(-100).forEach(line => {
    try {
      const e = JSON.parse(line);
      if (!e.event || !e.ts) return;
      if (new Date(e.ts).getTime() < cutoff) return;
      counts[e.event] = (counts[e.event] ?? 0) + 1;
      if (e.hook) hookCounts[e.hook] = (hookCounts[e.hook] ?? 0) + 1;
      if (e.level === 'error') errors.push(e);
    } catch {}
  });
} else if (existsSync(HOOKS_LOG)) {
  // Fallback: hooks.log — event-level entries only
  readFileSync(HOOKS_LOG, 'utf-8').trim().split('\n').forEach(line => {
    try {
      const e = JSON.parse(line);
      if (e.level !== 'event' || !e.event) return;
      if (new Date(e.ts).getTime() < cutoff) return;
      counts[e.event] = (counts[e.event] ?? 0) + 1;
      if (e.hook) hookCounts[e.hook] = (hookCounts[e.hook] ?? 0) + 1;
    } catch {}
  });
} else {
  console.log('No log files yet — hooks have not fired.');
  process.exit(0);
}

console.log('Activity (last 24 h)');
console.log('────────────────────');
const eventKeys = Object.keys(LABELS);
const anyEvent = eventKeys.some(k => counts[k]);
if (!anyEvent) { console.log('  No hook events yet.'); }
else { eventKeys.forEach(k => { if (counts[k]) console.log('  ' + (LABELS[k] ?? k).padEnd(26) + counts[k]); }); }

if (Object.keys(hookCounts).length) {
  console.log('');
  console.log('Per-hook counts');
  console.log('───────────────');
  Object.entries(hookCounts).sort((a,b) => b[1]-a[1]).forEach(([h,n]) => console.log('  ' + h.padEnd(22) + n));
}

if (errors.length) {
  console.log('');
  console.log('Last errors (up to 5)');
  console.log('─────────────────────');
  errors.slice(-5).forEach(e => console.log('  [' + e.ts + '] ' + e.hook + ': ' + (e.detail ?? e.event)));
}
"

Read the full file on GitHub · 218 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. 1mo ago Changed · +18 lines scan A → B abbd1aced4d5
  2. 3mo ago First seen · 200 lines · 37 tokens per session scan A 94019be83f19

Subscribe to this mod's changes

health is a command published in the GitHub repository RohiRIK/OpenLtm (31 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 2,326 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

health compared with commands from other repositories

health next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
healthRohiRIK/OpenLtmCommand312d agoMITB37Claude Code
helpEverMind-AI/EverOSCommand14kyesterdayApache-2.0A10Claude Code
memory-migrategmickel/flow-nextCommand735yesterdayMITA38Claude Code
auditgmickel/flow-nextCommand735yesterdayMITA30Claude Code
warden-selectvukkt/token-wardenCommand1329d agoMITA29Claude Code
memory-statusPseudogiant-xr/Pseudolife-MCPCommand9todayApache-2.0A14Claude Code
primeTechDufus/oh-my-claudeCommand1744mo agoMITA20Claude Code