codex-model-guard

codex-model-guard is a skill for Claude Code from ventusff/claude-model-guard. It costs 48 tokens per session (866 once invoked), scanned A, original, MIT.

A Codex CLI add-on that installs and manages a patched Model Guard build. It shows the requested and effective model, response labels, and repeated reasoning-token anomalies.

In plain words
What is it for?
Use it to install, inspect, update, or remove Model Guard and to review model-routing diagnostics and account status.
Why use it?
It helps you notice when a request may have used a different model or produced an unusual response pattern, without silently retrying or changing models.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the model-guard plugin — 3 skills, 7 hooks shipped together

Good fit Use it to install, inspect, update, or remove Model Guard and to review model-routing diagnostics and account status.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ventusff/claude-model-guard/codex-model-guard
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.

Any agent
npx skills add ventusff/claude-model-guard --skill codex-model-guard
Clone the repo
git clone --depth 1 https://github.com/ventusff/claude-model-guard

Made for: Claude Code.

Or install model-guard, the plugin that ships this one along with the rest of its 3 skills, 7 hooks.

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 codex-model-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/ventusff/claude-model-guard/codex-model-guard/github.svg)](https://agentmods.dev/skills/ventusff/claude-model-guard/codex-model-guard)
Your own site
<a href="https://agentmods.dev/skills/ventusff/claude-model-guard/codex-model-guard"><img src="https://agentmods.dev/badge/skills/ventusff/claude-model-guard/codex-model-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 codex-model-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/ventusff/claude-model-guard/codex-model-guard"><img src="https://agentmods.dev/badge/skills/ventusff/claude-model-guard/codex-model-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 866 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.00866
Opus 5 $0.00024 $0.00433
Sonnet 5 $0.00010 $0.00173
Haiku 4.5 $0.00005 $0.00087

Measured today against content hash 4b4bd31d4168, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

codex-model-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 today.

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.

codex/model-guard/skills/codex-model-guard/SKILL.md · 21 lines

What it actually says

Model Guard extends the native Codex status line. It uses a pinned custom build of official Codex with auditable source patches. Do not add a terminal wrapper, tmux server, separate live app-server adapter or shell PATH override.

The default footer is quiet: selected/requested model, request effort and the known account. Three things expand a warning line, in rank order: a disclosed different effective model (red), a response body whose model label names another family or a size tier than the request (orange; a same-family label with a date or suffix stays quiet), and a repeated reasoning anomaly (amber). Missing disclosure and single 516 hits belong in /status; never add permanent question marks or yellow unknown banners. At high/xhigh/max/ultra, at least three of the last five measured responses with exactly 516 reasoning tokens produce the heuristic warning. That threshold has no calibrated false-positive rate and does not identify a replacement model. Never infer recovery from answer quality or automatically retry/change models.

For setup/update, run python3 scripts/install.py from this plugin's root (two directories above this skill). Use --language zh or --language en. The prebuilt runtime requires Linux x86_64, glibc 2.39+, Python 3.12+, and official standalone Codex 0.153.4 with its existing executable symlink. The installer verifies native/release.json, prepares versioned files, then atomically switches the Codex symlink; it removes earlier versioned packages no session still uses. It preserves model/provider defaults and login files. Native builds must be updated together with the plugin; do not silently substitute a different upstream version. See native/README.md for source builds.

A running Codex process keeps the executable it started with, so an open session never gains Model Guard by installation alone. The installer and model-guard-codex doctor list such sessions with their directories; tell the user to finish or /quit each one and start codex resume there. Do not say that already running sessions were upgraded, and never terminate user sessions to finish installation, removal or validation.

Run model-guard-codex doctor after installation. Then codex, cx, resume and fork work through the same native executable in the current shell. Normal input handling, terminal scrolling, paste, profile loading and directory selection remain Codex's own. Remote app-servers need the metadata extension for complete disclosures.

Use /status inside the relevant Codex conversation for live routing evidence, the body label and reasoning details. Selected model, effort setting, the body label, assistant self-identification, benchmark answers and a 516 hit cannot prove backend identity. A provider may omit or rewrite effective-model headers. Explain absent evidence when asked; do not claim an unknown route is verified. Never read login files, persist raw transport logs, or edit Codex session records to diagnose routing. Read ROUTING.md or ROUTING.zh-CN.md for researched community methods and limits.

model-guard-codex probe --json makes one separate ephemeral read-only model request through official authentication and consumes provider quota. Use it for an authorized active check; -m MODEL -r EFFORT affects only that probe. It cannot certify another conversation. Exit codes are 0 for matching effective-model disclosure, 2 for a disclosed difference, 3 for missing disclosure, 4 for failure/unavailability, and 5 for a body label that differs while nothing was disclosed. JSON omits account identifiers and conversation text. Old external status and check commands direct users to native /status.

For removal, run model-guard-codex remove. It restores the original Codex symlink only while the entry is still managed, and preserves running sessions, packages and preferences. The plugin may then be removed with Codex's plugin manager if requested.

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. today First seen · 21 lines · 48 tokens per session scan A 4b4bd31d4168

Subscribe to this mod's changes

codex-model-guard is a skill published in the GitHub repository ventusff/claude-model-guard (2 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 866 once invoked, about $0.0002 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-09-10.

Related

Other skills, from other repositories