Use an isolated temporary home and random localhost ports. Start bin/model-gateway.js serve-shim against a tiny fake HTTP proxy that serves /v1/models and records forwarded message bodies.
Drive these surfaces:
GET /v1/models through the running shim.
POST /v1/messages using both current and legacy model IDs, then inspect the fake proxy's received model.
ensure --quiet with a temporary ~/.claude/settings.json containing legacy settings. The command may exit nonzero when no proxy binary exists; inspect the settings mutation itself.
env --write-project against a temporary project directory to check that wiring lands in that project's .claude/settings.local.json and never in a committed .claude/settings.json. Then env --write-user against a temporary HOME for the shared fallback, checking preservation of user-set values. With both set, doctor must name the project-local one as effective and fail a mode contradiction. --mode and --show-mode are retired and must exit 2.
RC-compatibility mode: set CODEX_GATEWAY_HOSTS_FILE to a temp hosts file and CODEX_GATEWAY_COMPAT_PORT to a free ephemeral port (never the real 80) before starting serve-shim. With the file containing 127.0.0.1 api.anthropic.com, GET /healthz on both the main port and the compat port must report compat.hostsDetected: true and compat.port80Bound: true. With the entry absent, both must be false and the compat port must refuse connections. Pre-binding the compat port before spawning the shim proves the safe fallback: hostsDetected: true, port80Bound: false, a populated reason, and the main port still serving normally.
DNS-recursion guard: require lib/request-worker.js directly and call createHostsBypassResolver({ resolve4, resolve6 }) with injected fake resolvers to confirm it never falls back to a hosts-aware lookup and errors closed when both resolvers fail.
Keep the real gateway and user settings untouched. Capture response bodies and resulting settings JSON inline.
1---2name: verify3description: Verify model-gateway4---56# Verify model-gateway78Use an isolated temporary home and random localhost ports. Start `bin/model-gateway.js serve-shim` against a tiny fake HTTP proxy that serves `/v1/models` and records forwarded message bodies.910Drive these surfaces:11121. `GET /v1/models` through the running shim.132. `POST /v1/messages` using both current and legacy model IDs, then inspect the fake proxy's received model.143. `ensure --quiet` with a temporary `~/.claude/settings.json` containing legacy settings. The command may exit nonzero when no proxy binary exists; inspect the settings mutation itself.154. `env --write-project` against a temporary project directory to check that wiring lands in that project's `.claude/settings.local.json` and never in a committed `.claude/settings.json`. Then `env --write-user` against a temporary HOME for the shared fallback, checking preservation of user-set values. With both set, `doctor` must name the project-local one as effective and fail a mode contradiction. `--mode` and `--show-mode` are retired and must exit 2.165. RC-compatibility mode: set `CODEX_GATEWAY_HOSTS_FILE` to a temp hosts file and `CODEX_GATEWAY_COMPAT_PORT` to a free ephemeral port (never the real 80) before starting `serve-shim`. With the file containing `127.0.0.1 api.anthropic.com`, `GET /healthz` on both the main port and the compat port must report `compat.hostsDetected: true` and `compat.port80Bound: true`. With the entry absent, both must be false and the compat port must refuse connections. Pre-binding the compat port before spawning the shim proves the safe fallback: `hostsDetected: true`, `port80Bound: false`, a populated `reason`, and the main port still serving normally.176. DNS-recursion guard: require `lib/request-worker.js` directly and call `createHostsBypassResolver({ resolve4, resolve6 })` with injected fake resolvers to confirm it never falls back to a hosts-aware lookup and errors closed when both resolvers fail.1819Keep the real gateway and user settings untouched. Capture response bodies and resulting settings JSON inline.
Run npx skillmds@latest add eigenwise/verify in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Verify model-gateway It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
eigenwise (@eigenwise) published this skill. Their other Agent Skills are listed on their SkillMD profile.