maintain-check

maintain-check is a command for coding agents from randomittin/heimdall. It costs 34 tokens per session (2,147 once invoked), scanned A, original, MIT.

A command that runs one controlled maintenance cycle for a software repository. It checks the maintainer mode, reviews pending issues, applies the repository's maintenance process, and records a checkpoint.

In plain words
What is it for?
Use it to run or preview a scheduled maintenance pass, including issue triage, fixes, checks, approval pauses, and a machine-readable completion record.
Why use it?
It removes the need to manually coordinate issue selection, safety limits, approvals, and recovery after an interrupted run. A dry-run option lets you preview the cycle first.

Command

Part of the hmd plugin — 4 skills, 18 commands, 16 agents, 5 hooks, 1 MCP server shipped together

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.

agentmods
npx agentmods add commands/randomittin/heimdall/maintain-check
Clone the repo
git clone --depth 1 https://github.com/randomittin/heimdall

Or install hmd, the plugin that ships this one along with the rest of its 4 skills, 18 commands, 16 agents, 5 hooks, 1 MCP server.

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 maintain-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/randomittin/heimdall/maintain-check.svg)](https://agentmods.dev/commands/randomittin/heimdall/maintain-check)
Your own site
<a href="https://agentmods.dev/commands/randomittin/heimdall/maintain-check"><img src="https://agentmods.dev/badge/commands/randomittin/heimdall/maintain-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 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,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.02147
Opus 5 $0.00017 $0.01073
Sonnet 5 $0.00007 $0.00429
Haiku 4.5 $0.00003 $0.00215

Measured 4d ago against content hash 65ff0f61f3c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

maintain-check 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 4d 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.

commands/maintain-check.md · 179 lines

How it starts

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

Maintainer Check Cycle

Run a single maintainer autopilot cycle. This is the command /loop or /schedule calls repeatedly. The heavy lifting is NOT prose LLM steps — it is delegated to the deterministic engine bin/heimdall-maintain-loop, which wraps the honest issue loop (bin/heimdall-issue-loop → pick → orient → fix → GATE → attest → PR). The engine owns the parts that must never drift: the token BUDGET CAP, the run-away STOP conditions, the approval PARK, agent-pool BACKPRESSURE, and the machine-readable CHECKPOINT receipt that lets a fresh session resume after death/compaction.

Your job here is thin: gate on enablement, run ONE cycle (or preview it), and report the receipt. Do not re-implement scan/triage/fix in prose — the engine is authoritative.

Pre-flight

  1. Check maintainer is enabled:
heimdall-state get '.maintainer.enabled'

If false, respond: "Maintainer mode is off. Run /hmd:maintain to enable." and stop.

  1. Check the ⚠-class queue has not aged. Every ⚠ observation owes, within 24h of being filed, either a fix or a durable triage reason a human wrote:
heimdall-sla --repo .          # exit 1 on BREACH; each breach names id, class, age

A BREACH is not a blocker for this cycle — it is work this cycle owes. Fold every breached item into the triage below, oldest first, and give each one a verdict. The reason this runs here rather than nowhere: the aging IS the bug. An unactioned item that quietly gets older is the same disease as a monitor that quietly stops — in both cases the absence of a signal is indistinguishable from the absence of a problem, so some surface has to ask the question on a schedule.

Dry-Run Mode

If $ARGUMENTS contains --dry-run, DO NOT execute or mutate anything. Show the plan:

# What the next drain WOULD do — budget snapshot + queued issues in pick order +
# the action each would take (park for approval vs fix+gate+PR). Mutates nothing.
heimdall-maintain-loop plan --repo .

# The current queue buckets + in-flight machine states (read-only).
heimdall-issue-loop status --repo .

Read the full file on GitHub · 179 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. 4d ago First seen · 179 lines · 34 tokens per session scan A 65ff0f61f3c8

Subscribe to this mod's changes

maintain-check is a command published in the GitHub repository randomittin/heimdall (5 stars, last pushed 13d ago), licensed MIT. It adds 34 tokens to every session and 2,147 once invoked, about $0.0002 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-31.