> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.
> The source code for these products is public on GitHub. Switch Rooms: https://github.com/sandbox-quantum/switch. Switch Trust CLI: https://github.com/sandbox-quantum/switch-trust-cli. Switch Trust CodeScan action: https://github.com/sandbox-quantum/switch-trust-codescan-action. Switch Trust MCP server: https://github.com/sandbox-quantum/switch-trust-mcp. Switch Trust Python SDK: https://github.com/sandbox-quantum/switch-trust-sdk-py. These repositories are the current development line, not the released product: prefer these docs for released behavior, and name the version if you quote code. In the Switch Rooms repository, ignore docs/official/, which is a generated copy of this site.

# Claude Code plugin

> See each person's Claude Code sessions and cost in Switch Trust, with no code changes

The Switch Trust plugin for Claude Code reports your Claude Code activity to Switch Trust. Each
person who installs it appears in Switch Trust as an [agent](https://docs.switchagents.ai/switch-trust/resources/glossary.md#agent), with their [sessions](https://docs.switchagents.ai/switch-trust/resources/glossary.md#session), [turns](https://docs.switchagents.ai/switch-trust/resources/glossary.md#turn), tokens,
models, and cost. Switch Trust prices each turn from [Model pricing](https://docs.switchagents.ai/switch-trust/cost/model-pricing.md).

The plugin reports as you work. It doesn't apply [guardrails](https://docs.switchagents.ai/switch-trust/resources/glossary.md#guardrail), so nothing is blocked or
redacted. An agent that only reports through the plugin doesn't count as a
[managed agent](https://docs.switchagents.ai/switch-trust/admin/plans-and-billing.md#what-counts-as-a-managed-agent).

To open the setup steps, go to **Settings**, then **Data sources**, and select
**Claude Code plugin**. **Trace my agents**, on the **Agents** page, opens the same steps.

## Before you begin

You'll need:

* **Access to the Switch Trust organization your team uses.** If you don't have it, ask an Org Admin to
  [invite you](https://docs.switchagents.ai/switch-trust/admin/users.md#invite-a-user). Signing up without an invitation creates a
  separate, empty organization.
* **The Editor role or higher in Switch Trust.** With a lower role, the **Claude Code plugin**
  card can't be selected.
* **Claude Code**, on each computer where you want to report usage.
* **Python 3 on that computer**, available as the `python3` command.

### Roll the plugin out to a team

Each person installs the plugin on their own computer. You can share one **Ingest only** key
across the team. Teammates don't need a Switch Trust account to send data, only to see it.
Each person still appears as their own agent, named from their Git email or the address they
set in **User Email Override**.

Revoking a shared key stops reporting for everyone who uses it. To stop one person at a time,
give each person their own key.

## Connect Claude Code

**1. Create an API key**

In the setup steps, under **Get an API key**, select **Create one now**. The
**Ingest only** role is selected for you, which lets the key send data to Switch Trust without reading
any. Copy the key. To use an existing key instead, see [API keys](https://docs.switchagents.ai/switch-trust/admin/api-keys.md).

**2. Install the plugin**

In Claude Code, run:

```
/plugin marketplace add https://github.com/sandbox-quantum/switch-trust-cc-plugin
/plugin install switch-trust-cc-plugin@switch-trust-cc-plugins
```

**3. Enter your API key**

When Claude Code asks for the plugin's settings, enter the key under
**Switch Trust API Key**. To change the settings later, open `/config` in Claude Code.

**4. Use Claude Code**

Ask Claude Code for something as you normally would. The plugin uploads your first reply in
a session right away.

Within a minute or two, an agent named **Claude Code — your email** appears on the
[Agents](https://docs.switchagents.ai/switch-trust/inventory/agents.md) page, with your session on its **Sessions** tab and
its spending on its cost cards.

After the first upload in a session, the plugin uploads again after a reply once a minute has
passed since the last upload or 20,000 new tokens have built up, and once more when the session
ends.

> [accordion] Where the email comes from
>
> The plugin uses **User Email Override** if you set it, then your Git email
> (`git config user.email`), then the login name on your computer.

## Choose what the plugin sends

By default, the plugin sends whole conversations, including tool calls and their output. It
removes personal data it recognizes on your computer before sending, but it can miss some.
Everyone in your Switch Trust organization can read what it sends, whatever their role.

To send less, set **Report Mode** in `/config`:

* **text:** Prompts and responses, without tool calls or tool output.
* **condensed:** Token counts for each model and a one-line title for the session, with no
  conversation text. The plugin uploads once, when the session ends.
* **none:** Stops reporting.

Settings for a project can lower **Report Mode** but can't raise it.

> [!NOTE]
>
> Switch ROI bases most of its recommendations on conversation content. With **text**, it doesn't
> see tool calls, which some recommendations depend on. With **condensed**, you still see cost, but most
> recommendations have nothing to analyze. With **none**, the plugin sends nothing.

## Check the plugin

If no agent appears, run `/switch-trust-status` in Claude Code. It shows the plugin's settings
and the end of its log. If the log says `no switch_trust_api_key configured; skipping`, enter
your key under **Switch Trust API Key** in `/config`.

## Remove the plugin

In a terminal, run:

```
claude plugin uninstall switch-trust-cc-plugin@switch-trust-cc-plugins
```

The plugin stops reporting and deletes the files it kept on your computer. What it already sent
stays in Switch Trust.

## Next steps

> [card] [Spending and caps](https://docs.switchagents.ai/switch-trust/cost/spending-and-caps.md)
>
> See what each person's Claude Code use costs

> [card] [Connect your data sources](https://docs.switchagents.ai/switch-trust/admin/data-sources/index.md)
>
> Add another data source
