# Use cases

> Setups to copy, from an agent per repository and a research agent to cheaper subagents, a read-only review, several Claude accounts, UI work and backups.
>
> Pick the setup closest to your work and copy its commands. You need a vault with a workspace to edit; the quickstart makes one.

Each setup is a few lines of manifest or `config.toml` plus the commands to launch it. If you have no vault yet, do the [quickstart](/docs/quickstart) first.

## An agent per repository

Give each code repository its own agent, and name the repository as `code_repo` in the manifest (`.claude/superclaude.toml`):

```sh
sc vault new work --workspace api/main
sc -v work api main
```

Claude Code opens as the `main` agent of project `api`. For each further repository, add a workspace to the same vault from a guided session: `sc create "a project billing with agent main"` (its text becomes the first message of a `sc system` session). `sc list` shows every project and its agents.

**Point the agent at my repository**

Open the manifest with `sc -v work api main --sc-edit` and set `code_repo`:

```toml
code_repo = "~/code/api-server"

plugins = [
  "$SC_PLUGINS/sc-memory",
]
system_prompt = ["identity"]

[section.identity]
content = """
<identity>
You own the api-server repository. Work in a worktree for every change.
</identity>
"""
```

`-v` picks the vault. After `sc vault default work`, `sc api main` is enough. You can also ask for the workspace from `sc system` instead of scaffolding it.


**Reclaim disk from worktrees**

The workspace is not a git checkout, so Claude Code's own `-w`/`--worktree` flag is refused. `sc` provisions worktrees itself through Claude Code's WorktreeCreate hook, and places them at `../worktrees` next to the repository (override with `$SC_RELATIVE_WORKTREE_ROOT`). When a worktree is released, `sc` marks it `detached` and keeps the checkout. Reclaim the disk explicitly:

```sh
sc worktree ls
sc worktree prune
```

`prune` skips anything dirty, anything with commits beyond its base, and anything locked.


## A research agent

Load [sc-web](/docs/web-research) for web search and [sc-browse](/docs/browser) for pages that need a real Chrome, then ask in plain words:

> What changed in the last three Rust releases?

The agent searches on its own and cites what it found. Ask for a thorough, checked report and it runs a longer, multi-round search instead.

**Set up the research agent**

```toml
plugins = [
  "$SC_PLUGINS/sc-memory",
  "$SC_PLUGINS/sc-web",
  "$SC_PLUGINS/sc-browse",
]
system_prompt = ["identity"]

[harness]
remove_tools = ["WebSearch"]

[section.identity]
content = """
<identity>
You answer questions with cited sources and say what you could not confirm.
</identity>
"""
```

`[harness] remove_tools` drops the built-in WebSearch, so Exa is the only search path. Loading a plugin renders its own guidance in the main prompt, so `system_prompt` does not list it. Name a plugin section only to pin where it renders.

sc-web needs `EXA_API_KEY` in the environment. sc-browse needs a Chrome with remote debugging, plus the `mcpr` and `gaze` tools on `PATH`; its plugin page lists the setup. Check what rendered before launching:

```sh
sc research main --prompt --plugins
```


**Send subagents to a cheaper model**

Keep Claude Opus on the main loop and send Sonnet and Haiku subagents to DeepSeek V4.1 Flash through OpenCode:

```sh
sc -u claude-flash <project> <agent>
```

[Cheaper subagents](/docs/custom-profiles) builds the `claude-flash` profile step by step, and its [walkthrough](/docs/custom-profiles#recommended-profile-walkthrough) explains each row. Any provider on the [support matrix](/docs/models#what-works) can take the subagent rows instead, [Codex](/docs/codex-usage#claude-main-loop-codex-subagents) included.


**Review code I do not trust, read-only**

`-i` launches a hardened, read-only session: hooks, skills and MCP servers off, Claude Code in plan mode, non-essential network calls disabled. Point the agent's `code_repo` at the checkout you do not trust. Relative `-f` and `-F` paths resolve against the directory you run `sc` from:

```sh
cd ~/code/vendor-sdk
sc -i <project> <agent>
```

On macOS, `-i` also wraps `claude` in `sandbox-exec`. The sandbox denies writes outside the workspace and temp directories, and denies reads of credentials, shell history and the vault's memory hub. Outbound network is limited to TCP ports 443 and 80, DNS, and localhost. On other platforms `-i` applies the same flags without the sandbox, and prints a warning. The daemon is not touched.

Add filesystem rules with `-f`. `+` allows a path and `-` denies one. Rules apply in order and the last match wins. 
```sh
sc -i <project> <agent> -f -./.env -f -./secrets
```

For a longer list, keep the rules in a file, one per line, with `#` comments, and pass it with `-F`:

```sh
cat > review-rules.txt <<'EOF'
# review-rules.txt
-./.env
-./secrets
+./secrets/fixtures
EOF
sc -i <project> <agent> -F review-rules.txt
```


**Switch between several Claude accounts**

On macOS, store more than one Claude Code login and switch between them:

```sh
sc accounts capture --label <label>
sc accounts use --label <label>
```

[Anthropic and Claude](/docs/provider-anthropic#several-claude-accounts) covers listing, usage checks and automatic switching near a limit.


**Build UI in a large frontend codebase**

[sc-frontend](/docs/frontend) fits an agent that changes UI in a large web or iOS codebase. It records one library, one theme and one token source per repository, and checks every change against that record. Ask in plain words:

> Learn how this app's UI is built before you change anything.

> Build a settings page where people choose which notifications they get.

No workspace loads it by default. Add it to `plugins`, and point `code_repo` at the app. Its prompt section renders on its own:

```toml
code_repo = "~/code/web-app"

plugins = [
  "$SC_PLUGINS/sc-memory",
  "$SC_PLUGINS/sc-browse",
  "$SC_PLUGINS/sc-frontend",
]
system_prompt = ["identity"]

[section.identity]
content = """
<identity>
You own the frontend of the web-app repository: its screens, components and theme.
</identity>
"""
```

With it loaded, the agent reads your UI suggestions as outcomes, to check Mobbin references before it decides a pattern, and to end every frontend task with a doctor check. [sc-browse](/docs/browser) lets the build step screenshot the result.

Sign in to Mobbin once from a terminal. The helper opens your browser, and Mobbin's MCP server needs a paid plan:

```sh
python3 ~/.superclaude/plugins/sc-frontend/bin/mobbin-auth login
```

The first request has it scan the repository and write `.claude/frontend.json`: the library chosen for each job, the token source, and the replacement for each retired library. After that, an edit that would make a file start importing a retired library is refused. If a turn changed frontend files and no doctor check ran after the last edit, a Stop hook sends the agent back once to run it.

To see the debt still standing, run the doctor from a shell:

```sh
node ~/.superclaude/plugins/sc-frontend/bin/sc-frontend doctor ~/code/web-app
```

It needs that `.claude/frontend.json`. It prints, for each retired library, how many files still import it and what replaces it, then a count of hardcoded color literals. To list the files, run `node ~/.superclaude/plugins/sc-frontend/bin/sc-frontend sites <package> ~/code/web-app`. Ask the agent to pay the debt down and it works through that list where the work in hand touches it.


**Back up my files and restore one**

The daemon runs `sc backup run` on the `[backup]` interval once a `[backup]` table is in [`config.toml`](/docs/config-toml). Files are stored by content, so a renamed directory costs no upload. Check, list versions and restore one file:

```sh
sc backup status
sc backup versions <root>/<rel>
sc backup restore <root>/<rel> --to ~/restored.md
```

`restore` never writes into a backed-up root and refuses an existing `--to` path.

+++
