selfheal

selfheal is a command for Claude Code from viitorohit/sitrep. It costs 0 tokens per session (523 once invoked), scanned A, original, MIT.

A manually invoked health-check command for the sitrep project's files and structure. It can also repair certain safe problems, such as missing files or invalid required sections.

In plain words
What is it for?
Use it to run standard or deep checks, inspect differences, lock a file, restore a file, or apply supported automatic repairs.
Why use it?
It gives one command responsibility for checking and repairing sitrep files instead of having many other commands alter them independently.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to run standard or deep checks, inspect differences, lock a file, restore a file, or apply supported automatic repairs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/viitorohit/sitrep/selfheal
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.

Clone the repo
git clone --depth 1 https://github.com/viitorohit/sitrep

Made for: Claude Code.

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 selfheal

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/viitorohit/sitrep/selfheal"><img src="https://agentmods.dev/badge/commands/viitorohit/sitrep/selfheal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 523 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.00000 $0.00523
Opus 5.5 $0.00000 $0.00209
Sonnet 5.5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00052

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

Security

Grade A, and why

selfheal 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 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.

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.

.claude/commands/selfheal.md · 27 lines

How it starts

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

Selfheal — Health Check & Auto-Fix

Intentional (manually invoked). This command owns all file-repair behavior for sitrep — session-start, session-end, capture, plan-update, and handoff deliberately do not search for or move files themselves; they defer to /selfheal.

Thin wrapper (GETSITREP-10) — every check below, and every auto-fix, lives in getsitrep selfheal (src/commands/selfheal.js is the single source of truth for exact behavior and known scope boundaries; this file is a pointer to it, not a second copy of its logic).

Run:

getsitrep selfheal $ARGUMENTS

Examples: getsitrep selfheal (default checks), getsitrep selfheal deep (adds Check 5), getsitrep selfheal lock --file dashboard, getsitrep selfheal diff --file selfheal, getsitrep selfheal restore --file selfheal --force.

Print its output verbatim — do not reinterpret, re-run, or duplicate its checks yourself.


What it checks (reference — see the CLI source for exact scope)

  1. File Structure — sitrep/ layout, the 8 canon command files, the hash manifest. Auto-fixes what's safe to create.
  2. File Integrity — required sections in PROJECT_PLAN.md/STATUS_REPORT.md/MANIFEST.md, valid JSON.
  3. Cross-File Consistency — phase names, Active Sprint ID references, session-count drift, Current Phase sanity. Report-only.
  4. Progress Accuracy — recalculates progress bars and cost totals for phases it can confidently compute (skips this project's own Jira-Story-tracked phases rather than guessing).
  5. Codebase Sync (deep only) — git-tag presence for completed phases (auto-fixable), plus a best-effort commit-trace heuristic. Deliberately does not attempt "flag code not tracked in any task" — that needs an LLM's judgment, not deterministic code.

Lock/diff/restore (GETSITREP-31) — lock/unlock accept or resume monitoring on a drifted command MD; diff shows it against the canonical version shipped with the CLI; restore overwrites it with canonical, refusing without --force if it's been customized (the upgrade-protection warning). <name> is one of the 8 canon command names, not a file path.

Read the full file on GitHub · 27 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 First seen · 27 lines · 0 tokens per session scan A dd051f97ffd8

Subscribe to this mod's changes

selfheal is a command published in the GitHub repository viitorohit/sitrep (19 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 523 tokens. 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.