cc-switch-cli: Instructions file for Codex

AGENTS.md

cc-switch-cli AGENTS.md is an instructions file for Codex, OpenCode from SaladDay/cc-switch-cli. It costs 2,507 tokens per session, scanned B, original, MIT.

Project guidance for SaladDay/cc-switch-cli, a Rust command-line tool for switching settings between coding applications. It documents the project's files, commands, architecture, and configuration model.

In plain words
What is it for?
Building, formatting, linting, testing, and inspecting providers, proxies, environment tools, and application-specific settings.
Why use it?
It gives coding agents the repository-specific context needed to run commands and change the right parts of the project.

Instructions file for CodexOpenCode

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

This is SaladDay/cc-switch-cli's own configuration. It tells Codex and OpenCode 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/SaladDay/cc-switch-cli

Made for: Codex, OpenCode.

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 AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/saladday/cc-switch-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,507 This file is loaded in full into every session.
When invoked 2,507 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 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.02507 $0.02507
Opus 5.5 $0.01003 $0.01003
Sonnet 5.5 $0.00501 $0.00501
Haiku 4.5 $0.00251 $0.00251

Measured 1mo ago against content hash 0b0b88481872, 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 AGENTS.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

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.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.

AGENTS.md

This file mirrors CLAUDE.md for Codex and other coding agents. Keep both files aligned when repository guidance changes.

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 0b0b88481872
  2. 1mo ago Changed · +1 lines · +36 tokens per session 66e4c2b78fd3
  3. 2mo ago First seen · 119 lines · 2,537 tokens per session scan B 821ef789e00f

Subscribe to this mod's changes

cc-switch-cli AGENTS.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,507 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). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

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

cc-switch-cli AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cc-switch-cli AGENTS.mdSaladDay/cc-switch-cliInstructions file5.4kyesterdayMITB2,507Codex, OpenCode
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