Skip to content

Guide · Agent skill

How to use the CC Switch CLI agent skill (cli-anything-ccswitch)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The cli-anything-ccswitch skill teaches an AI agent to operate a command-line tool that controls CC Switch, a desktop app for managing configurations of AI coding tools such as Claude Code, Codex and Gemini CLI. This guide is for developers who already use CC Switch and want an agent to inspect or adjust their setup. By the end you will know how to install the skill, ask for things in plain language, and which commands can change your live configuration.

CC Switch CLIHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Check prerequisites. Confirm Python 3.10 or newer is installed and that CC Switch has an active database at ~/.cc-switch/cc-switch.db.
  2. 2Download the skill ZIP. Download the ZIP from the skill page.
  3. 3Unzip into a skills folder. Unzip into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder.
  4. 4Install the CLI package. Run pip install -e . in the cli-anything-ccswitch package folder so the command is available.
  5. 5Ask a read-only question. Request a provider list or usage stats in plain language to confirm the setup works.
  6. 6Review write actions. Before approving set-current, proxy config, mcp enable or settings set, check the exact change, since these modify the database directly.

What is an agent skill and what does this one do?

An agent skill is a folder with a SKILL.md file that tells an AI agent when and how to use a tool. This skill wraps the cli-anything-ccswitch command-line tool, which reads and writes the CC Switch database.

Once installed, the agent can list and switch API provider configurations, check the local proxy, enable MCP servers, read usage and cost statistics, browse past sessions, and change some settings.

  • Read commands (listing, getting, status, usage and session views) do not modify the database.
  • Write commands (providers set-current, proxy config, mcp enable, settings set) modify the database directly.

Install the CC Switch CLI agent skill

Download the ZIP from the skill page and unzip it into one of these locations. For a personal skill, use ~/.claude/skills/. For a single project, use the .claude/skills/ folder inside that project.

Alternatively, in the Claude apps, open Settings, then Capabilities, then Skills, and upload the skill there.

The skill also needs the command-line tool itself. The source installs it from the package folder with pip install -e . (run this where the cli-anything-ccswitch package lives). After installation the command cli-anything-ccswitch is available.

  • Python 3.10 or newer is required.
  • CC Switch must be installed with an active database at ~/.cc-switch/cc-switch.db. The tool cannot work without it.
  • You can override the database path with the --db PATH option.
pip install -e .

How to trigger the skill with natural requests

You do not need to type commands yourself. Ask the agent in plain language about your CC Switch setup, and it should pick this skill when the request matches its description. Be specific about the app (Claude, Codex, Gemini and so on) when it matters.

If you want to be sure the agent uses the skill, name CC Switch in your request.

  • "Which API providers do I have set up for Claude?"
  • "How much did I spend on Claude over the last 30 days?"
  • "Check whether the local proxy for Claude is running."
  • "List my MCP servers and tell me which ones are enabled for Codex."

Commands the agent uses behind the scenes

The tool is organised into groups: status, providers, proxy, mcp, skills, usage, settings and sessions. Valid app types are claude, codex, gemini, opencode, openclaw and hermes.

Two global options matter. --json returns machine-readable output and is recommended for agents. It must come before the subcommand. --db PATH overrides the database location.

  • status: quick database overview
  • providers: list, get, set-current
  • proxy: status, config
  • mcp: list, enable
  • skills: list, repos
  • usage: stats, logs
  • settings: list, get, set
  • sessions: list
cli-anything-ccswitch --json providers list cli-anything-ccswitch --json usage stats --days 30 cli-anything-ccswitch usage logs --limit 10

Safety: which commands change your setup

API tokens, keys and secrets are masked in all output. For example, a key appears as sk-bc089...5cbb. The skill runs local scripts and the source does not describe any network use.

Write operations change the live database immediately. A wrong change could break a working AI tool setup, so review what the agent intends to run before approving any of these: providers set-current, proxy config, mcp enable and settings set.

The CLI exits with code 1 on errors such as a missing resource or invalid app type, and prints the message to stderr. Agents should check the exit code before parsing output.

  • Keep write actions under your review, especially in unattended runs.
  • Read-only usage and listing commands are the safe starting point.

Tips for getting good results

Start with read-only questions to confirm the agent can see your database. Ask for a status overview or a provider list before asking for changes.

For usage figures, name the number of days and the app. The source shows usage stats with --days and --app options, and usage logs with --limit.

  • Use the app flag to narrow results, for example --app claude.
  • Ask for a list first, then refer to the provider or server ID in a follow-up request.
  • Try the command yourself in a terminal to compare its output with what the agent reports.
cli-anything-ccswitch --json usage stats --days 30 --app claude

What people use it for

  • Listing API providers configured for Claude Code and checking which one is active.
  • Pulling usage and cost statistics for the last 7 or 30 days, optionally filtered to one app.
  • Checking whether the local proxy for an app is running and reviewing its config.
  • Reviewing which MCP servers are enabled, or enabling one for a given app after review.
  • Browsing recent AI conversation sessions for a specific app.

Frequently asked questions

How do I install the cli-anything-ccswitch skill?

Download the ZIP from the skill page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings, then Capabilities, then Skills. The command-line tool is installed separately with pip install -e . from the package folder.

What do I need to run this skill?

You need Python 3.10 or newer, the CC Switch desktop app installed, and an active CC Switch database at ~/.cc-switch/cc-switch.db. Without that database the tool cannot work.

Is the CC Switch CLI agent skill free?

The source lists the licence as Apache-2.0 for the HKUDS/CLI-Anything repository. Check the licence file in that repository for the full terms before you use or redistribute it.

Can the agent change my settings by mistake?

Yes, certain commands write to the live database: providers set-current, proxy config, mcp enable and settings set. Read commands do not modify the database. Review write actions before approving them, especially in unattended runs.

Does the skill use the internet?

The listing says it does not use the network, but it does run scripts. Read the SKILL.md and the package code yourself if you need to confirm this for your environment.

How is this different from using the CC Switch desktop app?

The skill lets you do the same kinds of tasks from a terminal or through an agent, which suits scripting and automation. The desktop app remains the visual option if you prefer clicking through its interface.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who already run CC Switch and want an agent to check providers, proxy status and usage figures from the terminal. It is a poor fit if you do not have CC Switch installed, or if you want an agent to change configuration without supervision. Use the read-only commands freely and treat the four write commands with care.

Download the skill