Cc Switch
БесплатноЗапускает вложенные скриптыНе проверенDual-mode provider management skill for Codex and compatible CLI tools. Works with cc-switch desktop app OR standalone (no desktop app required)…
от eohmig457 установок в других каталогахОб этом скилле
CC Switch - Dual-Mode Provider Management
A provider management skill that works in two modes automatically:
| Mode | When Active | Data Storage |
|---|---|---|
| cc-switch mode | cc-switch desktop app is installed (~/.cc-switch/cc-switch.db exists) |
SQLite database |
| standalone mode | cc-switch is NOT installed | JSON files (~/.cc-switch-skill/) |
The skill automatically detects which mode to use - no manual configuration needed.
Supported Apps
| Application | app_type | Hot-Switch |
|---|---|---|
| Codex | Codex |
Endpoint-only |
| Codex | codex |
❌ No |
| Gemini CLI | gemini |
❌ No |
| OpenCode | opencode |
❌ No |
| OpenClaw | openclaw |
❌ No |
Mode Detection
The skill checks for ~/.cc-switch/cc-switch.db:
- Found → Uses SQLite mode (reads from cc-switch database)
- Not found → Uses standalone mode (reads from
~/.cc-switch-skill/)
You can install/remove cc-switch anytime and the skill will automatically adapt.
Storage Locations
cc-switch Mode
- Database:
~/.cc-switch/cc-switch.db - Managed by: cc-switch desktop application
Standalone Mode
- Config:
~/.cc-switch-skill/config.json— Active providers per app - Providers:
~/.cc-switch-skill/providers.json— All configured providers - Presets:
~/.Codex/skills/cc-switch/presets.json— Built-in presets
Core Operations
1. Add Provider
~/.Codex/skills/cc-switch/scripts/add_provider.sh \
--name "MiniMax" \
--app Codex \
--key "sk-xxxx" \
--url "https://api.minimax.com/v1" \
--sonnet "Codex-3-5-sonnet-20241022"
2. List Providers
~/.Codex/skills/cc-switch/scripts/list_providers.sh
~/.Codex/skills/cc-switch/scripts/list_providers.sh --app Codex
Output shows the current mode:
======================================
Providers List
======================================
Mode: [cc-switch mode]
### Codex
ID | Name | Status
--------------------------------------+------------------------------+--------
a1b2c3d4-e5f6-7890-abcd-ef1234567890 | Anthropic Official | 🟢 [Active]
3. Switch Provider (with Pre-flight Connectivity Check)
~/.Codex/skills/cc-switch/scripts/switch_provider.sh \
--app Codex \
--name "MiniMax"
Important: Switching runs a connectivity test first:
- ✅ Test passes → Switch proceeds automatically
- ❌ Test fails → Error details shown, user asked to confirm before proceeding
To skip the connectivity check (advanced use):
~/.Codex/skills/cc-switch/scripts/switch_provider.sh \
--app Codex \
--name "MiniMax" \
--skip-test
4. Delete Provider
~/.Codex/skills/cc-switch/scripts/delete_provider.sh --id provider-uuid
Cannot delete currently active provider - must switch first.
5. Test Provider Connectivity
~/.Codex/skills/cc-switch/scripts/test_connectivity.sh --app Codex --name "MiniMax"
Presets
Built-in provider presets in presets.json work in standalone mode:
| Name | App | Description |
|---|---|---|
| Anthropic Official | Codex, gemini | Official Anthropic API |
| MiniMax Official | Codex | Official MiniMax API |
| Zhipu AI Official | Codex | Official Zhipu AI endpoint |
| DeepSeek Official | Codex | Official DeepSeek API |
Presets are used as templates - you provide your own API key when adding.
Hot-Switching Support
Only Codex supports hot-switching — changes take effect immediately without restarting the terminal.
For all other apps, you must restart the terminal or CLI tool after switching providers.
Workflow
Typical Usage
- Add provider — Use
add_provider.shwith your credentials - Test — Use
test_connectivity.shto verify - Switch — Use
switch_provider.sh(auto-tests first) - List — Use
list_providers.shto see all options
Example Session
User: I want to switch to MiniMax
Codex: Running switch_provider.sh --app Codex --name MiniMax
[Connectivity test runs...]
✅ Connectivity test passed
Switching Codex to MiniMax...
✅ Successfully switched Codex provider to: MiniMax
ℹ️ Codex supports hot-switching - changes take effect immediately!
User: Test the connection
Codex: test_connectivity.sh --app Codex --name MiniMax
[Shows detailed test results]
When Connectivity Fails
User: Switch to TestProvider
Codex: Running switch_provider.sh...
======================================
Connectivity Test FAILED
======================================
Error Details:
HTTP Status: 401
API Endpoint: https://api.test.com/v1
Model: test-model
Response:
{"error": {"type": "authentication_error", "message": "Invalid API key"}}
==============================
Установить Cc Switch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Cc Switch?
Dual-mode provider management skill for Codex and compatible CLI tools. Works with cc-switch desktop app OR standalone (no desktop app required). Automatically detects mode: uses SQLite when cc-switch is present, otherwise uses JSON config. Pre-flight connectivity testing runs before switching with user confirmation on failure. For Codex, switching is endpoint-only: it reads the target provider's base URL but does not change cc-switch provider state, and only updates ~/.Codex/settings.json.
Как установить скилл Cc Switch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Cc Switch запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic