backlot: Agent for Claude Code

.claude/agents/invariance-reviewer.md

invariance-reviewer is an agent for Claude Code from brekkylab/backlot. It costs 65 tokens per session (2,070 once invoked), scanned A, original, MIT.

A review agent for a Backlot debloat pull request, which is a proposed code change that removes duplication or excess. It checks that behaviour and facts covered by tests have not changed, then returns evidence without editing.

In plain words
What is it for?
It reviews the change, repeats the repository's invariance proof, checks that only one kind of material was changed, and samples removed tests with small mutations.
Why use it?
It helps catch unsafe simplification that passes a superficial review but changes outputs or removes a tested fact.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; names the NotebookEdit tool.

This is brekkylab/backlot's own configuration. It tells Claude Code how to work on backlot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything backlot configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is (cd $R/head && uv run python scripts/invariance.py record $R/rec-head).

Part of the backlot plugin — 3 skills, 3 agents, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to brekkylab/backlot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/brekkylab/backlot/main/.claude/agents/invariance-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/brekkylab/backlot

Made for: Claude Code.

Or install backlot, the plugin that ships this one along with the rest of its 3 skills, 3 agents, 1 hook.

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 invariance-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/brekkylab/backlot/invariance-reviewer/github.svg)](https://agentmods.dev/agents/brekkylab/backlot/invariance-reviewer)
Your own site
<a href="https://agentmods.dev/agents/brekkylab/backlot/invariance-reviewer"><img src="https://agentmods.dev/badge/agents/brekkylab/backlot/invariance-reviewer/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 invariance-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/brekkylab/backlot/invariance-reviewer"><img src="https://agentmods.dev/badge/agents/brekkylab/backlot/invariance-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 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,070 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.00065 $0.02070
Opus 5.5 $0.00026 $0.00828
Sonnet 5.5 $0.00013 $0.00414
Haiku 4.5 $0.00006 $0.00207

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

Security

Grade A, and why

invariance-reviewer 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 6d 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/agents/invariance-reviewer.md · 119 lines

How it starts

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

You review one debloat pull request of Backlot. A debloat PR removes duplication and excess from code, prose or tests and claims that nothing Backlot does has changed and nothing the tests knew has been lost. Your job is to find out whether that claim is true. You do not judge whether a cut was worth making beyond the rules below; you judge whether it was safe.

The prompt names the PR: a number, or in rehearsal a local branch, the base to diff it against and the body the worker would have sent. Read the diff with gh pr diff <n> or `git diff

Reproduce the proof yourself

Never trust the numbers in the body; make your own. A prose PR needs only a head worktree and no recording; skip to its line below. Otherwise check out the base and the head in throwaway worktrees under a fresh directory (never in the working tree you were started in, whose branch the worker may have checked out, hence --detach), give both the same packages, and run the script from the head. Shell state does not survive between commands, so print R and spell it out after.

R=$(mktemp -d /tmp/inv-XXXXXX); echo "R=$R"
git worktree add --detach $R/base <base> && git worktree add --detach $R/head <head>
for t in base head; do (cd $R/$t && uv sync --all-extras -q \
  && uv pip install -q --no-deps "llama-index-readers-hubspot<0.6"); done
(cd $R/base && uv run python $R/head/scripts/invariance.py record $R/rec-base)
(cd $R/head && uv run python scripts/invariance.py record $R/rec-head)
  • prose: (cd $R/head && uv run python scripts/invariance.py prose <base>) must print invariant, and uv run pytest tests/test_docs.py tests/test_skills.py must pass. No recording is needed. That proof cannot see a fact disappear, so check the fact map against the diff, passage by passage: every request, answer, status, field, date or place of measurement the old text stated, and every constraint on the code it named, is still stated by the new text or at the line the map cites. A measured fact stated nowhere is a block; so is a correction of a sentence about vendor behaviour. What the map lists as dropped must be what rule 5 lets go. When the prompt says the map passed at an earlier commit, check only the passages git diff <that commit> touches.
  • code: record the base a second time to $R/rec-base2, then uv run python scripts/invariance.py compare $R/rec-base $R/rec-head --mode code --calibration $R/rec-base2 must print invariant. A difference is reproduced once more with a fresh head recording before you call it a finding: timing can line two base runs up by chance.
  • tests: compare $R/rec-base $R/rec-head --mode tests must print invariant.

Keep the two worktrees for the mutation samples of check 6, and make those only after every recording has finished: a change made while a recording runs corrupts it. When you are done, remove the worktrees (git worktree remove --force) and $R.

Read the full file on GitHub · 119 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. 6d ago First seen · 119 lines · 65 tokens per session scan A 752278247752

Subscribe to this mod's changes

invariance-reviewer is an agent published in the GitHub repository brekkylab/backlot (295 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 2,070 once invoked, about $0.0003 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-10-17.

Related

Other agents, from other repositories

pre-commit-reviewer

Use this agent to review code changes before committing and pushing to a PR. This agent analyzes diffs for bugs, style issues, dead code, missing tests, and alignment with target repository conventions. Use as a fallback when the PR review toolkit is unavailable, or dispatch directly for standalone pre-commit review.…

costajohnt/oss-autopilot · 243 tokens

test-analyzer

Analyzes test coverage quality and identifies critical gaps in the test suite relative to code changes.

liatrio-labs/claude-code-gauntlet · 21 tokens

implementer

Task implementer agent for impl-orchestration. Dispatched per plan task with full task context. Implements, tests, commits, and self-reviews.

Aimeerrhythm/enterprise-change-workflow · 35 tokens

pr-test-analyzer

Use this agent when you need to review a pull request for test coverage quality and completeness. This agent should be invoked after a PR is created or updated to ensure tests adequately cover new functionality and edge cases. Examples:\n\n \nContext: Daisy has just created a pull request with new…

anthropics/claude-code · 0 tokens

ai-hygiene-auditor

Audit codebases for AI-generation warning signs: vibe coding patterns, agent psychosis indicators, slop artifacts, and Tab-completion bloat. Specialized complement to bloat-auditor.

athola/claude-night-market · 48 tokens

sap-test-plan-reviewer

Adversarial review of a test-case plan produced by design-cases. READS the actual ABAP source snapshot (plus findings.md, flow.md, units.md, and the TC-.md files) to catch branches and MESSAGEs the plan missed, checks total case count against the enumerated minimum, checks every mandatory category has at least one…

marcellourbani/vscode_abap_remote_fs · 161 tokens