repair

repair is a command for Claude Code from Jujitae/invara. It costs 48 tokens per session (3,186 once invoked), scanned A, original, Apache-2.0.

A governed command for tidying a repository's internal structure without intentionally changing its behaviour.

In plain words
What is it for?
It is for reorganising code, planning and applying repair units, and verifying that the resulting project still behaves as expected.
Why use it?
It freezes the existing behaviour first and checks each repair before keeping it, reducing the risk that cleanup breaks the software.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

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 invara plugin — 3 commands, 1 MCP server shipped together

Good fit It is for reorganising code, planning and applying repair units, and verifying that the resulting project still behaves as expected.

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 Jujitae/invara
Claude Code
/plugin install invara

Made for: Claude Code.

Or install invara, the plugin that ships this one along with the rest of its 3 commands, 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 repair

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/jujitae/invara/repair"><img src="https://agentmods.dev/badge/commands/jujitae/invara/repair.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,186 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.00048 $0.03186
Opus 5.5 $0.00019 $0.01274
Sonnet 5.5 $0.00010 $0.00637
Haiku 4.5 $0.00005 $0.00319

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

Security

Grade A, and why

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

plugin/commands/repair.md · 273 lines

How it starts

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

The user asked for something like: "기능은 그대로 두고 이 프로젝트를 제대로 정리해줘." You are the transformer. INVARA is the judge. You may inspect, propose, plan and edit; you may not decide that a change is safe. Every decision below comes from a command's output, and the verdict words PASS, BLOCK, UNVERIFIABLE, HUMAN_REVIEW are quoted exactly, never paraphrased and never upgraded.

0. The tool, and where it runs

The bundled package runs locally, offline, with only the standard library. Set the path once per shell, then use python -m invara:

export PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/src"        # bash / zsh
$env:PYTHONPATH = "${CLAUDE_PLUGIN_ROOT}/src"        # PowerShell

python -m invara repair --help lists the steps. Every command takes --db <file>; use the repository's .runtime/verify.db (--db .runtime/verify.db) so the evidence sits beside the verifier's own ledger. If python is not Python 3.12+, stop and run /invara:doctor.

1. Preconditions

  • The working tree must be clean: git status --porcelain prints nothing. If it does not, ask the user to commit or set aside their changes. Never do it for them, and never run git clean or git reset --hard anywhere.
  • Note the base commit (git rev-parse HEAD). Nothing you do will move it.

2. Inspect, then declare how the program is observed

Read the repository the way a careful engineer would: entry points, how input arrives (stdin, arguments, a file, HTTP), what it prints, what it writes (files, a SQLite database), what its existing tests cover. Then write the Equivalence Manifest — the machine-readable declaration of what "same behaviour" means. Save it as .invara/repair.manifest.json:

{
  "schema_version": "invara.assurance.manifest/1",
  "session_id": "repair-2026-09-03",
  "title": "one sentence: what the program does",
  "source_system": {"id": "before", "kind": "process", "command": ["python", "app.py"], "root": "$SOURCE_ROOT"},
  "target_system": {"same_as_source": true},
  "input_domain": {
    "kind": "corpus",
    "delivery": "stdin_json",
    "corpus": [
      {"id": "typical", "input": {"...": "a realistic input"}},
      {"id": "edge", "input": {"...": "an input next to a boundary you found in the code"}},
      {"id": "invalid", "input": {"...": "an input the program rejects"}}
    ]
  },
  "probes": [
    {"id": "cli", "adapter": "process", "capture": ["stderr"], "mandatory": true},
    {"id": "out", "adapter": "json", "source": "stdout", "mandatory": true},
    {"id": "files", "adapter": "filesystem", "root": "$WORKSPACE/out", "content": "text", "mandatory": true},
    {"id": "db", "adapter": "sqlite", "path": "$WORKSPACE/app.db", "tables": [{"name": "orders", "order": "ordered"}], "mandatory": true}
  ],
  "policies": [],
  "claims": [
    {"id": "corpus", "kind": "corpus_equivalence", "mandatory": true},
    {"id": "search", "kind": "counterexample_search", "mandatory": true, "params": {"runs": 80, "seconds": 300, "seed": 1}},
    {"id": "stability", "kind": "baseline_stability", "mandatory": true, "params": {"runs": 2}}
  ],
  "exclusions": [
    {"id": "stderr-text", "path": "/cli/stderr", "reason": "traceback text names files and lines that change under a refactor; exit code and stdout are the contract"}
  ],
  "human_review": []
}

Read the full file on GitHub · 273 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 · 273 lines · 48 tokens per session scan A 1018bfeef019

Subscribe to this mod's changes

repair is a command published in the GitHub repository Jujitae/invara (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 3,186 once invoked, about $0.0002 per session on Opus 5.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-09-07.