altimate-code: Command for Claude Code

.claude/commands/bridge-guard.md

bridge-guard is a command for Claude Code from AltimateAI/altimate-code. It costs 62 tokens per session (4,205 once invoked), scanned A, original, MIT.

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

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents; mentions Codex; mentions OpenCode.

This is AltimateAI/altimate-code's own configuration. It tells Claude Code how to work on altimate-code 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 altimate-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AltimateAI/altimate-code. 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/AltimateAI/altimate-code/main/.claude/commands/bridge-guard.md
Clone the repo
git clone --depth 1 https://github.com/AltimateAI/altimate-code

Made for: Claude Code.

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 bridge-guard

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/altimateai/altimate-code/bridge-guard"><img src="https://agentmods.dev/badge/commands/altimateai/altimate-code/bridge-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00062 $0.04205
Opus 5.5 $0.00025 $0.01682
Sonnet 5.5 $0.00012 $0.00841
Haiku 4.5 $0.00006 $0.00421

Measured 1mo ago against content hash 9d73fdfe9d28, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

.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. 1mo 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 (813 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 4,205 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-08-30.