bridge-guard

A post-merge audit command for reviewing a large upstream bridge merge, which brings changes from another codebase into the current project.

In plain words
What is it for?
Use it after the bridge-merge tool creates a pull request, or against a detected merge branch, to check branding, behavior patches, module consistency, and test fixtures.
Why use it?
It looks for regressions such as leftover product names, overwritten custom behavior, mismatched paired modules, and tests tied to old interfaces before the merge reaches the main branch.

Command for Claude Code

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/altimateai/altimate-code/bridge-guard
Clone the repo
git clone --depth 1 https://github.com/AltimateAI/altimate-code

Made for: Claude Code.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,205 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.00062 $0.04205
Opus 5 $0.00031 $0.02103
Sonnet 5 $0.00012 $0.00841
Haiku 4.5 $0.00006 $0.00421

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

Security

Grade A, and why

bridge-guard 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 2d 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/bridge-guard.md · 263 lines

How it starts

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

Bridge Merge Audit

Run this after script/upstream/bridge-merge.ts (or any large upstream merge) produces a PR. Catches the regression classes that v1.4.0 shipped before we built the three-layer safety net (commits 3a6b59bdea + 13ba57f7f1).

Input

$ARGUMENTS = PR number, or empty to detect from current branch via gh pr view. Branch name typically upstream/merge-vX.Y.Z.

Why this skill exists

The v1.4.0 bridge merge shipped 16 user-impacting regressions across 30 files. Root cause: many altimate customizations were never wrapped in altimate_change markers, so the bridge merge tool — working as designed — overwrote them with upstream's version. The branding scan was too narrow to catch user-visible bare opencode strings; behavior patches (function calls, retry loops, default values) had no marker discipline at all.

This skill walks the auditor through every regression class we've actually seen, with the exact greps + code reads to detect each one. Treat the patterns as a checklist, not a suggestion — every item below was a real bug in v1.4.0 that reached the user before we caught it.

Step 0: Setup

git fetch origin
gh pr view --json number,title,headRefName,baseRefName,url
git checkout <merge-branch>
git status --short

If working tree is dirty, stop. Capture base SHA: BASE=$(git merge-base HEAD origin/main). The audit compares HEAD vs $BASE.

Step 1: Run the three-layer tooling check (mandatory, do this first)

bun run script/upstream/analyze.ts --branding --strict
bun run script/upstream/analyze.ts --require-markers --strict
bun run script/upstream/analyze.ts --markers --base main --strict

All three must pass before continuing. If --branding flags leaks: those are user-visible strings the broadened scan caught (yargs describe, console output, User-Agent, MCP client name, OIDC audience, etc.). Fix each before moving on.

If --require-markers flags missing markers: behavioral patches in known-vulnerable files were lost. Restore them or remove the file from config.requireMarkers if it no longer holds patches.

Read the full file on GitHub · 263 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. 2d ago First seen · 263 lines · 62 tokens per session scan A 9d73fdfe9d28

Subscribe to this mod's changes

bridge-guard is a command published in the GitHub repository AltimateAI/altimate-code (803 stars, last pushed 2d ago), licensed MIT. It adds 62 tokens to every session and 4,205 once invoked, about $0.0003 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-30.