remove-agent

A command that removes a named CC-Suite advisor agent from a project. It deletes the agent definition and cleans up its registrations, with a choice about keeping its timeline.

In plain words
What is it for?
Use it to delete an advisor, remove or retain its timeline directory, and refresh the project's connected-agent configuration.
Why use it?
It prevents an unwanted advisor from remaining active while letting you preserve its consultation history if you may recreate it later.

Command

Part of the cc-suite plugin — 13 skills, 39 commands, 4 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/xiaolai/cc-suite/remove-agent
Clone the repo
git clone --depth 1 https://github.com/xiaolai/cc-suite

Or install cc-suite, the plugin that ships this one along with the rest of its 13 skills, 39 commands, 4 agents, 3 hooks.

Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 638 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00039 $0.00638
Opus 5 $0.00019 $0.00319
Sonnet 5 $0.00008 $0.00128
Haiku 4.5 $0.00004 $0.00064

Measured 3d ago against content hash f16c25b4a594, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

remove-agent scanned grade C 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ".cc-suite/agents/<name>/"
commands/remove-agent.md · 93 lines

How it starts

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

CC-Suite Remove Agent

Delete an advisor agent from the project. The agent's MCP registrations and timeline data are removed; the agent file itself goes too.

User Input

$ARGUMENTS

Workflow

Step 1: Resolve the target

Parse $ARGUMENTS as the agent name. If empty, list the agents (call /cc-suite:list-agents logic) and ask the user to pick one.

Verify the file exists:

ls ".cc-suite/agents/<name>.md" 2>/dev/null

If it doesn't exist, list what does exist:

ls .cc-suite/agents/*.md 2>/dev/null

and stop.

Step 2: Confirm and ask about the timeline

AskUserQuestion:
  question: "Remove agent `<name>`? This deletes .cc-suite/agents/<name>.md and re-bridges. What about its timeline directory?"
  header: "Confirm"
  options:
    - label: "Remove agent + delete timeline (Recommended)"
      description: "Cleanest. The timeline contains the advisor's prior consultation history."
    - label: "Remove agent, keep timeline"
      description: "Preserves the history at .cc-suite/agents/<name>/timeline/ — useful if you might recreate the agent later."
    - label: "Cancel"
      description: "Do nothing."

If cancel: stop.

Step 3: Delete the agent file

rm ".cc-suite/agents/<name>.md"

Step 4: Delete the timeline directory (if requested)

rm -rf ".cc-suite/agents/<name>/"

(Note: only if the user chose the "delete timeline" option.)

Step 5: Re-bridge

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/bridge_agents.py"

The script will detect the agent file is gone and remove the corresponding entries from .mcp.json and .codex/config.toml. Run /cc-suite:bridge-mcp afterward if Antigravity should lose the advisor from its generated .agents/mcp_config.json projection as well.

Step 6: Report

## Agent removed: <name>

- Deleted `.cc-suite/agents/<name>.md`
- Deleted `.cc-suite/agents/<name>/` (if chosen)
- Cleaned up `.mcp.json` entry
- Cleaned up `.codex/config.toml` sentinel block
- Cleaned up the generated `.agents/mcp_config.json` entry (after `bridge-mcp`)

### Reminder

Restart Claude Code so the MCP loader drops the removed server. Codex sees the change on next invocation.

Read the full file on GitHub · 93 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. 3d ago First seen · 93 lines · 39 tokens per session scan C f16c25b4a594

Subscribe to this mod's changes

remove-agent is a command published in the GitHub repository xiaolai/cc-suite (44 stars, last pushed 24d ago), licensed ISC. It adds 39 tokens to every session and 638 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.