claudemods

All Claude Code modspreisnerai/claude-mods

model-router

A Claude Code mod in preisnerai/claude-mods

Cache-aware model and effort routing for Claude Code Desktop: each prompt goes to Haiku, Sonnet or Opus by what it needs, and a cheaper model or effort only when that pays after the prompt-cache re-write. Rules read non-code work too, research is Sonnet at most, !+ and !- nudge the tier, /router-help lists every command, /router why explains the decision, /router-cache shows the cache hit rate and /router-budget caps the spend. Long sessions auto-compact with Haiku at tier thresholds, every prompt you send carries a small model·effort tag, and savings show in dollars and tokens. The hardest tasks can run as Ultracode. Crew mode keeps your /model and hands mechanical work to a warm Haiku worker when that is clearly cheaper; savings and paid quality upgrades are shown apart. Bash output is compressed rtk-style and answers drop the filler.

review UI rewrite

model-router reaches L3 (network) and passed claude plugin validate with warnings.

Install hint

/plugin install model-router --marketplace preisnerai/claude-mods

From the repository's own marketplace. Confirm the plugin name in the repository's README before installing. Mods need Claude Code 2.1.287 or later.

Access

L3 Uses the networknetwork, runs processes, writes files, drives Claude, reads files, reads env vars, reads the transcript, reads mod state, persists state, draws

Validation

Passed with warnings

Listed under Prompt cache mods for Claude Code.

View the source on GitHub Back to the list

What the scan recorded

Observed events
every prompt, subagent spawns, every tool call, classic hooks, compaction
Hooks
session.start, ui.render {component=Pane, requestId=model-router}, ui.render {component=UserMessage}, ui.render {component=SessionMode}, session.send, command.run {command=router}, command.run {command=router-help}, command.run {command=router-start}, command.run {command=router-why}, command.run {command=router-effort}, command.run {command=router-ultracode}, command.run {command=router-cache}, command.run {command=router-stats}, command.run {command=router-budget}, command.run {command=router-compact}, command.run {command=router-log}, command.run {command=router-panel}, command.run {command=router-style}, command.run {command=router-off}, command.run {command=router-on}, command.run {command=router-reset}, prompt.submit, turn.start, turn.step, turn.complete, agent.spawn, tool.call, session.append {door=tool-result}, classic.PostModelSwitch, session.end, session.compact, prompt.compose
API calls
$.agent.list, $.agent.register, $.clock.now, $.clock.sleep, $.command.list, $.command.register, $.env.get, $.fs.exists, $.fs.read, $.fs.write, $.http.fetch, $.model.complete, $.process.run, $.session.compact, $.session.cwd, $.session.id, $.session.messages, $.session.model, $.session.usage, $.state.get, $.state.set, $.store.delete, $.store.get, $.store.set, $.ui.open, $.ui.resolve, $.ui.status
Validation
Passed with warnings
Scanned revision
5b36fe701543
Marketplace passed
claude-mods
UI rewrite review
UI hook source contains control-character strings. Review any values passed to next() as rewritten props.text; the scanner does not trace whether these strings reach that call. model-router/hooks/compress.ts:205

These are the hooks and API calls reported by claude plugin validate. Access levels describe the widest reach of those calls and are not safety ratings. Validation is a static check, not a runtime test, and a passing result does not prove that a mod works or is safe. What a mod can access and how the scan works.

More from preisnerai/claude-mods

Badge for your README

Reach badge for model-router Validation badge for model-router

Authors can show the latest scan result in their README. Each badge links to this page.

[![reach](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/preisnerai--claude-mods--model-router-reach.svg)](https://mods.aidojo.si/mods/preisnerai--claude-mods--model-router/)
[![validates](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/preisnerai--claude-mods--model-router-validates.svg)](https://mods.aidojo.si/mods/preisnerai--claude-mods--model-router/)