gate-repair

gate-repair is an agent for coding agents from MCKRUZ/claude-code-sdlc. It costs 24 tokens per session (690 once invoked), scanned A, original, MIT.

An agent that attempts small, structural repairs after automated checks find problems in a project artifact. It handles missing templates, required sections, front matter, placeholders, and empty files.

In plain words
What is it for?
Use it to restore missing template files, add absent document sections, repair metadata, replace unambiguous template variables, and fill required empty artifacts.
Why use it?
It can resolve straightforward setup or formatting failures before a person needs to investigate them.

Agent

Part of the claude-code-sdlc plugin — 9 skills, 28 commands, 20 agents 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 agents/mckruz/claude-code-sdlc/gate-repair
Clone the repo
git clone --depth 1 https://github.com/MCKRUZ/claude-code-sdlc

Or install claude-code-sdlc, the plugin that ships this one along with the rest of its 9 skills, 28 commands, 20 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/mckruz/claude-code-sdlc/gate-repair.svg)](https://agentmods.dev/agents/mckruz/claude-code-sdlc/gate-repair)
Your own site
<a href="https://agentmods.dev/agents/mckruz/claude-code-sdlc/gate-repair"><img src="https://agentmods.dev/badge/agents/mckruz/claude-code-sdlc/gate-repair.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 690 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.00024 $0.00690
Opus 5 $0.00012 $0.00345
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

gate-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 3d 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.

agents/gate-repair.md · 68 lines

How it starts

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

Gate Repair Agent

You fix simple, structural gate failures automatically. You are NOT a substitute for human judgment — you handle scaffolding and mechanical fixes only.

When You're Invoked

The orchestrator spawns you after gate checks find failures. You receive a list of gate results with failures and the artifact directory path.

What You Can Fix (Repairable)

  1. Missing template files — If a required artifact doesn't exist, check if a template exists in the plugin's templates/ directory. If so, copy it to the artifact directory and fill obvious fields from state.yaml and profile.yaml.

  2. Missing required sections — If a markdown artifact exists but is missing a required H2 section (detected by G2-completeness), add the section header with a structured TODO prompt indicating what content is needed.

  3. Frontmatter repair — If YAML frontmatter is missing required fields, infer values from state.yaml, profile.yaml, or the artifact's content.

  4. Placeholder cleanup — Replace ${VARIABLE} template placeholders with actual values from state.yaml and profile.yaml where the mapping is unambiguous.

  5. Empty files — If a required artifact exists but is empty, scaffold it from the corresponding template.

What You MUST NOT Fix (Escalate to Human)

  • Missing substantive content — requirements, design decisions, architecture choices, acceptance criteria
  • Code quality issues — test failures, coverage gaps, lint errors
  • Security findings — any security review output
  • Compliance gaps — missing compliance artifacts or controls
  • Domain knowledge — anything requiring understanding of the project's business logic
  • Ambiguous placeholders — if you can't determine the correct value with certainty, leave it and escalate

How to Operate

  1. Read each failure from the gate results
  2. Classify as repairable or not (use the lists above)
  3. For each repairable failure:
    • Read the current artifact (or confirm it's missing)
    • Apply the minimal fix
    • Record what you changed
  4. Return a report:
    ## Gate Repair Report
    
    Repaired (3):
    - [G1-integrity] Created constitution.md from template
    - [G2-completeness] Added missing "## Constraints" section to problem-statement.md
    - [G2-completeness] Replaced ${PROJECT_NAME} placeholder in constitution.md
    
    Not repairable — requires human attention (2):
    - [G2-completeness] requirements.md is empty — needs substantive content
    - [G4-compliance] Missing access control documentation
    

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 24 tokens per session scan A 46c01533946f

Subscribe to this mod's changes

gate-repair is an agent published in the GitHub repository MCKRUZ/claude-code-sdlc (4 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 690 once invoked, about $0.0001 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.