provider-switch

provider-switch is a skill for Claude Code from kochetkov-ma/claude-brewcode. It costs 35 tokens per session (5,765 once invoked), scanned B, original, MIT.

A configuration tool for switching an AI coding agent to alternative API providers, the services that supply its language models.

In plain words
What is it for?
Configuring DeepSeek, Z.ai/GLM, Qwen, MiniMax, or OpenRouter as an API provider.
Why use it?
It helps change which provider handles model requests when another service is needed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Part of the brewtools plugin — 9 skills, 3 agents shipped together

Good fit Configuring DeepSeek, Z.ai/GLM, Qwen, MiniMax, or OpenRouter as an API provider.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kochetkov-ma/claude-brewcode/provider-switch
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 kochetkov-ma/claude-brewcode --skill provider-switch
Clone the repo
git clone --depth 1 https://github.com/kochetkov-ma/claude-brewcode

Made for: Claude Code.

Or install brewtools, the plugin that ships this one along with the rest of its 9 skills, 3 agents.

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 provider-switch

README.md
[![agentmods](https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/provider-switch/github.svg)](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/provider-switch)
Your own site
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/provider-switch"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/provider-switch/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 provider-switch

Your own site · 80×15
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/provider-switch"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/provider-switch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,765 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00035 $0.05765
Opus 5.5 $0.00014 $0.02306
Sonnet 5.5 $0.00007 $0.01153
Haiku 4.5 $0.00003 $0.00577

Measured 10d ago against content hash f80420eee8a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

provider-switch scanned grade B with 2 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 10d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (scripts/check-status.sh, scripts/detect-mode.sh, scripts/provider-alias.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

| curl -s -K - -o /dev/null -w "%{http_code}" -X POST "https://api.z.ai/api/anthropic/v1/messages" -H "content-type: application/json" -H "anthropic-version: 2023-06-01" -d '{"model":"glm-5.2","max_tokens":5,"messages":[

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Identifies the model answering this ALIAS-launched session via 5 questions, no curl/scripts. BASE not set → print and stop:
brewtools/skills/provider-switch/SKILL.md · 444 lines

How it starts

The opening of the file, as written. The whole thing — 444 lines — stays where its author put it; the contents beside it link to each section on GitHub.

[DICT: P=Phase, PRV=provider, EXEC=EXECUTE using Bash tool, AUQ=AskUserQuestion, REF=references, ALIAS=shell alias, CFG=configured, BASE=ANTHROPIC_BASE_URL, MOD=ANTHROPIC_DEFAULT_OPUS_MODEL]

Provider Switch

Claude Code alt API providers, each an isolated ALIAS in ~/.zshrc: DeepSeek V4 (priority default, 1M ctx, native Anthropic endpoint; recommend first), Z.ai/GLM, Qwen/DashScope, MiniMax, OpenRouter.

Prompt contract

$ARGUMENTS is one free-form RU/EN prompt; mode tokens and flags may sit anywhere in it.

  1. Mode: an explicit mode token wins outright; else the most distinct whole-word keyword hits (mode table in P1 below). Tie with a destructive mode -> AskUserQuestion; with status -> status; of two mutating modes -> the keyword that comes first. No hit or empty -> status.
  2. Scope: prose that is not a mode/provider name is still input: take the provider or scope from it.
  3. Ask: at most ONE AskUserQuestion (max 4 questions) to resolve mode and scope, before any work, only when the answer changes what gets written. status itself is read-only and asks nothing.

Print once, before the first action (labels literal, values in the conversation language):

PLAN — brewtools:provider-switch
INPUT:  <arguments verbatim, or "(empty)">
MODE:   <resolved> — <explicit | matched keyword: X | default>
SCOPE:  <resolved paths / target / level / flags>
DO:     <2-5 imperative bullets>
RESULT: <what the user ends up holding>

Robustness Rules (MANDATORY)

Rule Scope
Every Bash call: && echo "OK ..." || echo "FAILED ..." ALL
On FAILED: stop phase, report error, !=retry blindly ALL
Max 3 AUQ per phase ALL
!=write secrets anywhere except ~/.zshrc ALL
!=ask for, receive, repeat or compose a key value (no AUQ, prompt or Bash line with it): the user places it out of band, scripts/read-secret.sh moves it. CC 2.1.296 has no masked input: AUQ answers land in the transcript; sensitive userConfig never reaches skill content ALL
!=commit ~/.zshrc changes ALL
~/.zshrc comments: ENGLISH only ALL writes

Read the full file on GitHub · 444 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. 10d ago Changed · +1 lines f80420eee8a2
  2. 14d ago Changed · -127 lines e54aa4665c0f
  3. 26d ago Changed · +13 lines dc02c86f3fb4
  4. 1mo ago First seen · 557 lines · 35 tokens per session scan B 16cf0a12bb7e

Subscribe to this mod's changes

provider-switch is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (38 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 5,765 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fresh-start

Continue in a new chat without losing anything — writes a compact handoff to paste into a fresh conversation. Use whenever the user wants to move to a new chat or conversation, hits usage limits, says replies got slow or Claude forgets earlier details, or the conversation has grown long.

egorfedorov/claude-context-optimizer · 60 tokens

doc-digest

Turn a long document, PDF, transcript, spreadsheet or log into a compact working digest the conversation can continue from. Use when the user shares or pastes something long (several pages or more) and wants to discuss, analyze, compare or use it over more than one message, or asks to summarize a document so they can…

egorfedorov/claude-context-optimizer · 75 tokens

token-check

Estimate how many tokens a pasted text, an attached file or the conversation so far takes, what it means for the context window and usage limits, and how to cut it. Use when the user asks how big something is in tokens, why they keep hitting limits, or whether a file is too large to send.

egorfedorov/claude-context-optimizer · 66 tokens

sharpen-prompt

Rewrite a vague request into a precise prompt — goal, context, scope, constraints, what done looks like, output format. Use when the user asks to improve, rewrite, sharpen or check a prompt.

egorfedorov/claude-context-optimizer · 47 tokens

skill-creator-plus

Create, test, evaluate, and improve Claude skills — and answer questions about how skills work. Use for "create a skill", "make a skill for", "write a SKILL.md", "turn this into a skill", "run evals", "test/benchmark my skill", "optimize my skill description", "improve triggering", "A/B test my skill", "blind…

yaniv-golan/skill-creator-plus · 147 tokens

deep-research

Deep Research (/deep-research or /dr) — exhaustive, evidence-based investigation of any topic. Use when the user invokes /deep-research, /dr, asks for deep research, says 'research this thoroughly', wants expert-level analysis on any subject (technical, business, scientific, regulatory, financial, medical, legal…

yachi/claude-skills · 164 tokens