cc-switch-cli: Instructions file for Claude Code

CLAUDE.md

cc-switch-cli CLAUDE.md is an instructions file for Claude Code, Codex from SaladDay/cc-switch-cli. It costs 2,503 tokens per session, scanned B, a copy of cc-switch-cli AGENTS.md, MIT.

Repository instructions for cc-switch-cli, a Rust application that switches between provider settings for coding-agent command-line tools.

In plain words
What is it for?
Use them when running, building, formatting, linting, testing, or changing cc-switch-cli.
Why use it?
They collect the project’s commands, configuration model, architecture, formatting checks, lints, and tests in one place.

Instructions file for Claude CodeCodex

Written for Codex and Claude Code: reads $CODEX_HOME, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is SaladDay/cc-switch-cli's own configuration. It tells Claude Code and Codex how to work on cc-switch-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-switch-cli configures →

About the project

CC-Switch CLI is a command-line tool that manages several coding agents, including Claude Code, Codex, Gemini CLI, OpenCode, Hermes, OpenClaw, and Pi, through an interactive terminal interface or scripts. It is for developers who use multiple agent tools and want to control them from one place. The catalogue instructions extend workflows for this tool.

SaladDay/cc-switch-cli · 5,442 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to SaladDay/cc-switch-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SaladDay/cc-switch-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/SaladDay/cc-switch-cli

Made for: Claude Code, Codex.

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 cc-switch-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/claude-md/github.svg)](https://agentmods.dev/instructions/saladday/cc-switch-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/saladday/cc-switch-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/claude-md/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 cc-switch-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/saladday/cc-switch-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,503 This file is loaded in full into every session.
When invoked 2,503 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod 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.02503 $0.02503
Opus 5.5 $0.01001 $0.01001
Sonnet 5.5 $0.00501 $0.00501
Haiku 4.5 $0.00250 $0.00250

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

Security

Grade B, and why

cc-switch-cli CLAUDE.md scanned grade B with 1 finding 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 1mo ago.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Claude: `~/.claude/settings.json`, `~/.claude.json`, `~/.claude/CLAUDE.md`
Origin

This is a copy

98% identical to cc-switch-cli AGENTS.md — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 118 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

The Rust crate lives in src-tauri/. Run Cargo commands from that directory unless a command explicitly targets repository-root assets or scripts.

cd src-tauri

cargo run                                  # Run cc-switch in interactive mode
cargo run -- provider list                 # Run a specific CLI command
cargo run -- --app codex provider list     # Run a command for a specific app
cargo run -- proxy show                    # Inspect proxy state
cargo run -- env tools                     # Check local CLI tools
cargo build --release                      # Build release binary at target/release/cc-switch

cargo fmt                                  # Format Rust code
cargo fmt --check                          # Check formatting, matching CI
cargo clippy                               # Run lints
cargo test                                 # Run all tests
cargo test provider_switch                 # Run tests whose names contain provider_switch
cargo test --test provider_commands        # Run a single integration test target
cargo test --features test-hooks           # Run tests with the test-hooks feature enabled

The repository pins Rust through src-tauri/rust-toolchain.toml to Rust 1.91.1 with rustfmt and clippy. CI currently runs cargo fmt --check for changes under src-tauri/**.

Project overview

CC-Switch CLI is a Rust command-line management tool for Claude Code, Codex, Gemini, OpenCode, Hermes, and OpenClaw. It manages provider configurations, MCP servers, prompts, skills, WebDAV sync, local proxy routes, failover, daemon/start flows, deep-link imports, workspace memory files, and environment checks.

The main crate is src-tauri/; the repository root contains docs, assets, install/update scripts, packaging metadata, and Nix files.

Key Rust entry points:

  • src/main.rs parses CLI arguments, initializes logging, creates startup state for most commands, and dispatches to command handlers.
  • src/lib.rs declares crate modules and re-exports public types used by integration tests and command code.
  • src/cli/mod.rs defines the top-level Clap CLI, global --app flag, and command enum.
  • src/cli/commands/ contains direct command implementations for providers, MCP, prompts, skills, config/WebDAV, proxy, failover, Hermes, start, daemon, env, update, completions, and internal commands.
  • src/commands/ contains library command helpers that are not top-level Clap subcommands, including OpenClaw workspace file and daily memory operations.
  • src/cli/interactive/ and src/cli/tui/ contain the interactive ratatui UI, runtime action handlers, forms, overlays, route state, and UI rendering.
  • src/services/ contains durable business logic used by commands and the TUI: providers, auth, MCP, prompts, skills, proxy, WebDAV sync, stream checks, speed tests, environment checks, visible apps, subscription/coding-plan quota checks, and state coordination.
  • src/database/ is the SQLite persistence layer. Database owns a mutex-wrapped rusqlite connection, schema creation/migration, backups, and DAO modules for providers, MCP, prompts, skills, settings, proxy state, stream checks, universal providers, and failover queues.
  • src/app_config.rs, src/provider.rs, and app-specific config modules (claude_*, codex_config.rs, gemini_*, hermes_config.rs, opencode_config.rs, openclaw_config.rs) define the shared configuration model and live-file adapters for supported apps.
  • src/deeplink/ implements the ccswitch://v1/import?... import protocol for provider resources and is exported through lib.rs for tests and callers.
  • src/proxy/ implements the local multi-app proxy with Axum handlers, request forwarding, provider routing/failover, provider-specific transformations, response/stream handling, usage logging, model mapping, cache/thinking rectifiers, circuit breaking, and metrics.
  • src/daemon/ implements the Unix supervisor daemon, IPC protocol, logging, pidfile, and restart support.
  • src/store.rs defines AppState, which ties together the database, an in-memory MultiAppConfig snapshot, startup live-config imports/recovery, and ProxyService.

Read the full file on GitHub · 118 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. 1mo ago Changed · -2 lines · -66 tokens per session 327a6cf976be
  2. 1mo ago Changed · +1 lines · +36 tokens per session e5c355806a48
  3. 2mo ago First seen · 119 lines · 2,533 tokens per session scan B 2463ba11bc6e

Subscribe to this mod's changes

cc-switch-cli CLAUDE.md is an instructions file published in the GitHub repository SaladDay/cc-switch-cli (5,442 stars, last pushed yesterday), licensed MIT. It adds 2,503 tokens to every session, about $0.0100 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 98% identical to cc-switch-cli AGENTS.md, differing in 4 lines, and is treated as a copy.

Related

cc-switch-cli CLAUDE.md compared with instructions from other repositories

cc-switch-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cc-switch-cli CLAUDE.mdSaladDay/cc-switch-cliInstructions file5.4kyesterdayMITB2,503Claude Code, Codex
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode