gateway-switch

by Koichi Shiraishi · ★ 1 · updated yesterday

ToastsCommandsvalidates

0

Switches a running session between api.anthropic.com and the local Model Gateway: onto the gateway once Remote Control has registered, on /gateway on, or as each session starts after /gateway setup, and back to api.anthropic.com whenever the gateway stops answering.

install gateway-switch

Install

/plugin marketplace add zchee/claude-code-mods
/plugin install gateway-switch@claude-code-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.startagent.spawnturn.stepcommand.run
API calls
$.clock.after$.clock.every$.clock.now$.clock.sleep$.command.list$.command.register$.command.run$.env.get$.env.set$.fs.exists$.fs.list$.fs.read$.fs.write$.http.fetch$.process.run$.session.id$.session.root$.ui.log$.ui.toast
Can see
subagent spawns
Reach
level 3 of 3 networkruns processeswrites filessets env varsdrives Claudereads filesreads env varsdraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/zchee/claude-code-mods
Path in repo
mods/gateway-switch
Source commit
30a1a13 the exact code the scan read
Author
Koichi Shiraishi @zchee
License
Apache-2.0
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from zchee/claude-code-mods

decision-compaction

zchee/claude-code-mods

Hands back the conversation itself in place of a compaction summary, less the tool calls and results a System One decision model judges no longer needed. The model can be TypeSafe Jev, Cloudflare Clef, Codiv OpenJev, Perplexity pplx-decider, OpenAI GPT-6 Luna, or Jev through OpenRouter, decisions-api.dev or decisionapi.net.

★ 1Toasts

model-gateway-rc

zchee/claude-code-mods

Starts a session on api.anthropic.com so that Remote Control can register, then points it at the local Model Gateway once Remote Control has registered or on /gateway on, and back at api.anthropic.com whenever the gateway stops answering.

★ 1ToastsCommands