Claude switch models setup

From daymade/claude-code-skills · View interactive version

Claude switch models setup is an AI agent skill from the GitHub repository daymade/claude-code-skills. Isolates profiles for multi-provider setup and switching models in separate terminal windows (Kimi, MiniMax, DeepSeek, GLM, StepFun, Anthropic). Use for provider switching, csk/csd/csg aliases, CLAUDE_CONFIG_DIR, ~/.claude-profiles, profile drift (missing skills/hooks, symlinks, settings), context-w

How to use this skill

Skill file

Claude Code Profiles and Local Skill Activation

Overview

This skill creates an isolated-but-shared profile system for Claude Code CLI. Each profile gets its own .claude.json state file (provider credentials and session history) while sharing skills, projects, hook scripts, agents, and installed plugin state across all profiles — and converging each profile's settings.json (hook registration, marketplaces, env feature flags, permissions, preferences) plus the behavior slice of its .claude.json (e.g. workflowSizeGuideline) from the default profile, so the only intended difference between profiles is the model/provider.

The result: you can open one terminal with Kimi, another with DeepSeek, another with Anthropic — each running as a fully independent Claude Code process, without configuration bleed.

For reducing fixed startup context from preloaded MCP tool schemas, read

references/mcp-startup-context.md. It owns

same-mode measurement, active-profile discovery, provider compatibility checks,

reversible server suppression, and fresh-process acceptance.

How It Works

Before selecting or repairing entries, read the

host-specific activation contract.

It owns the manifest fields, marketplace expansion, Claude plugin/direct-link

distinction, unresolved-name handling, collision safety, and legacy compatibility.

Source registration alone does not choose activation policy; do not hand-create

links or repurpose the manifest to manage third-party inventory.

leased-authoring owner procedure.

⚠️ Never run the converger against a synthetic main

Scope is every profile — all of ~/.claude-profiles/* plus $CLAUDE_CONFIG_DIR

— and the source of truth is CLAUDE_MAIN_CONFIG_DIR. Point that at a throwaway

directory while CLAUDE_PROFILES_ROOT or $CLAUDE_CONFIG_DIR still reaches a

real profile, and the run converges that real profile toward the synthetic

main: its whole hooks object is replaced by whatever the fake main holds, and

its env gains the fake main's keys. **Every guard registered in that profile

stops firing.** The output does name hooks among the keys it synced and, when

the overwrite drops profile-only entries, reports how many — but nothing in it

says guards stopped firing, so it reads as the converger doing its job. A

synthetic main is safe only when the profiles root and $CLAUDE_CONFIG_DIR are

synthetic and disposable too.

Before running it by hand, check both halves of the scope:

echo "MAIN=$CLAUDE_MAIN_CONFIG_DIR ROOT=$CLAUDE_PROFILES_ROOT ACTIVE=$CLAUDE_CONFIG_DIR"

An unset CLAUDE_PROFILES_ROOT is not a green light — it defaults to the

real ~/.claude-profiles, so every real profile converges. Stop unless both

CLAUDE_PROFILES_ROOT and $CLAUDE_CONFIG_DIR are synthetic and disposable.

Test fixtures must build the subprocess environment from a scrubbed base instead

of inheriting the live one — a shell profile sets these variables, and unset

inside a script does not reliably reach a child process:

env -u CLAUDE_CONFIG_DIR -u CLAUDE_MAIN_CONFIG_DIR -u CLAUDE_PROFILES_ROOT …

Decide whether a run wrote anything mechanically, not by eye. Record the target

profile's settings.json size before the run and compare after. .sync-backup

is written with shutil.copy2, which preserves the source mtime, so **an old

backup timestamp does not prove nothing was written** — compare size and bytes.

If a real profile did get written, restore from that profile's own backup and

verify byte-for-byte:

cp -p <profile>/settings.json.sync-backup <profile>/settings.json

Check size, JSON validity, top-level key count, hooks length, unexpected env

keys, and sandbox signatures such as /bin/true. Then scan the other profiles:

scope is all of them, so one run can hit several.

Callers that capture native structured output

Source scripts/claude-profiles.sh and call

claude-profile-with-command "<absolute-executable>" <profile> [claude arguments...]

when a caller must attach stdout capture at the native invocation. The supplied

executable file (or a symlink to one) receives the original --settings and Claude arguments with the

profile's CLAUDE_CONFIG_DIR; profile validation, synchronization, launch output

and credentials keep their existing owners. The executable controls only its

native invocation and returns that invocation's exit status.

Use a trusted, version-matched script with the

claude-profile-native-command-api: 1 contract before invoking this entry. A caller

that requires this boundary must refuse an unsupported script before running

profile setup; intercepting a shell function named claude cannot cover `command

claude or an absolute native path. Ordinary claude-profile` calls retain their

existing behavior.

One-Click Setup Workflow

When the user says something like "set up Claude Code profiles" or "I want to use Kimi and DeepSeek in different windows":

  1. Check prerequisites
  1. Install the profile manager scripts — symlink them, do not copy

On a machine that has this repo checked out (the maintainer case), run the

bundled installer:

```bash

<absolute-path-to-this-repo>/daymade-claude-code/claude-switch-models-setup/scripts/setup.sh

```

scripts/setup.sh is the single source for the exact deployment set. It links

each helper into ~/.config/claude-switch-models-setup/ and seeds the activation

manifest only when it does not already exist. Do not maintain another helper list

here. No chmod step is needed: the deployment is by symlink, and the source

files retain their committed modes.

Recorder files are deployed without enabling the optional wrapper. Existing

ordinary recorder copies must be compared and preserved before setup replaces

them with links; pinned deployments follow the “advance the pin” procedure.

Why symlinks and not cp: ~/.config/… is what actually runs — the

LaunchAgent and claude-profile invoke scripts by that path — while this

repo holds their source. Copies drift, and nothing about a deployed copy

looks different from its source. A link prevents independent edits and

source updates from silently diverging, *for as long as it stays a

link* — an atomic-save editor, an rsync or a stray cp turns one back into

a real file without saying so, which is why this is worth re-checking rather

than declaring solved. It also lets sync-local-skill-sources.py locate its

own source repo by resolving its own path, instead of falling back to

guessing.

Worth re-checking how? Any periodic check works; there is none bundled with

this skill. One line, run wherever you keep such things:

```bash

for f in ~/.config/claude-switch-models-setup/.py ~/.config/claude-switch-models-setup/.sh; do

[ -L "$f" ] && [ -e "$f" ] || echo "not a live link: $f"

done

```

If one has become a real file, move it aside before re-linking — it may

hold edits that exist nowhere else, which is the whole problem being

described: mv "$f" "$f.local-edits" && ln -sf <source> "$f", then diff.

On a machine without the repo, copy the scripts listed by the installer out of this skill

bundle instead — and accept that repo fixes will not reach it until you copy

again.

On a machine whose LaunchAgent runs the pinned plugin copy (the maintainer

layout described in local-source-sync-architecture.md),

these same links point at that copy's version directory under .../plugins/cache/...,

not at the checkout, and move only when the pin is advanced

(troubleshooting.md, "advance the pin"). The

installer refuses to relink such a machine to the checkout

(CSMS_SETUP_RELINK_TO_CHECKOUT=1 overrides), because the daemon and

claude-profile would then follow whatever branch the checkout sits on. The

live-link check above applies to both layouts.

  1. Add shell integration

the script's help text only lists the base examples above; variants like

cssplan/cssp are hand-added, not generated

  1. Generate provider settings files

where it is already registered — the owner's provider credential setup

and recovery entry (their operations docs or account-provider skill),

the shell exports it already maintains, and any existing profile

binding. A missing key at the default settings path does not mean

the credential is unavailable. Hand the token to consumers as a

~/.zprofile export with an explicit per-profile binding, and verify

by actually invoking the original consumer — a real headless request

succeeding, not a written file or an echoed variable.

API key and base URL; never hardcode defaults, and never copy or

lend the maintainer's credentials. Have them store the key the same

way — a shell export (e.g. in ~/.zprofile) bound explicitly to the

profile that consumes it — not as a secret inside a settings file.

1. ~/.claude/settings/<new>.json: carry over host-portable permissions (deny/allow), isolation flags, context-window configuration, and CLAUDE_CODE_EFFORT_LEVEL from <old>.json (keep host-specific hooks out).

2. ~/.claude-profiles/<new>/CLAUDE.md: if <old> carried profile-local session constraints (such as rules paired with a permissions.deny entry), mirror and update them for <new>.

3. Shell aliases (~/.zshrc / ~/.bashrc): add or repoint shortcuts so interactive shells launch <new>, and read back via an interactive shell (alias <name>).

4. Managed worker/fleet model policy (if configured on the host): update the allowed profile list, sync reachable workers, and record any offline workers separately.

  1. Initialize profile directories

Statusline wiring: claude-profiles-init auto-detects a statusline script from

~/.claude/settings.json or ~/.claude/statusline.sh and injects it into each new

profile. If neither is present, profiles will work but without a status bar. **It is

the AI's job** to decide whether the user needs a statusline, install the

statusline-generator skill if appropriate, and run its installer — not the profile

setup script. Do not hardcode dependency installs into shell scripts.

  1. Register the settings converger
  1. Verify isolation
  1. Select local source Skills for Codex and Claude
  1. Show the user how to launch

claude-profiles.sh does not generate them. StepFun is the running

example: its subscription plan only answers at a dedicated plan base URL

(https://api.stepfun.com/step_plan, single model), while pay-as-you-go

goes through the provider's standard endpoint or whatever gateway fronts

it — same provider, two billing modes, so they live as two profiles with

two aliases (always ask for the exact base URLs):

```bash

alias cssplan='claude-profile step-plan --dangerously-skip-permissions'

alias cssp='claude-profile step-pay --dangerously-skip-permissions'

```

Commands

After setup, the user can run:

claude-profiles-init          # Re-scan settings/*.json, create missing profiles;
                               # reports symlink drift (real dirs that should be symlinks).
                               # Add --repair to archive drift and replace with symlinks.
claude-profile <name>         # Launch a specific profile
claude-profiles-ls            # List profiles
claude-profiles-doctor        # Check symlink health
claude-profile-rm <name>      # Remove a profile's isolation directory
python3 ~/.config/claude-switch-models-setup/claude-plugins-sync.py
                               # Repair per-profile plugin structure and enabledPlugins
python3 ~/.config/claude-switch-models-setup/sync-profile-settings.py --all
                               # Converge every profile from the default profile:
                               # settings.json (hooks, marketplaces, env flags,
                               # permissions, preferences) + .claude.json behavior
                               # keys (workflowSizeGuideline etc.). Session start
                               # already does this for all profiles; run --all to
                               # apply a manual settings edit immediately.
                               # --check audits the same scope without writing
python3 ~/.config/claude-switch-models-setup/sync-local-skill-sources.py
                               # Maintainers: preview host selections and affected paths
python3 ~/.config/claude-switch-models-setup/sync-local-skill-sources.py --apply
                               # Apply the inspected Codex, Claude, and explicit
                               # legacy compatibility changes
~/.config/claude-switch-models-setup/sync-local-skill-sources-daemon.sh --install
                               # Maintainers: install automatic macOS watcher

These are not day-to-day commands. Edits to activated canonical sources are live through symlinks. The one-shot commands are for repair, bootstrap, or non-macOS environments without the LaunchAgent watcher. When a repair would adopt a published ref into a live canonical checkout, use the published-content adoption procedure instead of treating --apply as sufficient.

Provider Templates

Use the provider templates in CODE0. Read the

chosen file for its model, endpoint, context settings, and thinking behavior;

do not infer those values from a hand-maintained template summary.

Templates contain non-secret provider settings. Configurable gateways also use <BASE_URL>; the MiniMax templates pin the documented regional endpoint. Resolve required values through setup step 4: on an owner-authorized machine, first reuse the registered source and binding; a new user supplies their own valid key and never receives the maintainer's. Put the key only in the explicit export binding, and fill only non-secret values into the settings file. Existing legacy JSON credentials remain supported for reading; do not generate a new in-file credential.

For new MiniMax profiles, recommend minimax.json (global) or minimax-cn.json

(China) first. These select MiniMax-M3.1-Flash. The explicit M3 alternatives

are minimax-m3.json and minimax-m3-cn.json. Match the API key to its regional

endpoint. All four use [1m] for Claude Code's 1M context handling; the actual

API model IDs omit that suffix.

Flash templates enable thinking and pin CLAUDE_CODE_EFFORT_LEVEL=max.

The expected request uses thinking.type=adaptive and output_config.effort=max.

When upgrading Claude Code, maintainers can rerun the localhost wire tests from

the repository root; installed Skill bundles do not include this test suite:

CSMS_RUN_CLAUDE_WIRE_TESTS=1 python3 -m unittest discover \
  -s daymade-claude-code/claude-switch-models-setup/tests \
  -p test_minimax_profiles.py -v

Flash also accepts low, medium, high, and xhigh effort. Do not disable

Flash thinking (none/disabled is rejected). For an explicit non-thinking

workflow, choose M3 and set alwaysThinkingEnabled to false; keep

ANTHROPIC_REASONING_MODEL on the same model. See the

MiniMax API contract.

Do not replace a saved model or custom endpoint when adding templates. M2.7

examples remain under assets/templates/legacy/ for explicit legacy requests

only, outside the active catalog. Their thinking is always on; do not claim a

template-level disable path. Read exact values from the chosen template.

Configuring Context Window Size

Every provider template sets the model's context window one of two ways — get this wrong and Claude Code doesn't know how much context the model can actually hold. Undershoot and it compacts (summarizes, drops old detail) far earlier than the provider actually requires; overshoot and it won't compact until the real limit is already blown past.

The full client-side mechanism of the [1m] marker — what it strips off the model

field, what it adds to the anthropic-beta header, and why a missing [1m] does

not mean the provider can't hold a big prompt — is documented in

references/context-window-config.md. Reach for it when a context number looks

wrong, not at template-writing time.

Decision rule

When writing a new provider's settings/<name>.json, pick based on the provider's real, verified context window — not the model's marketing name, and not by copying whatever the nearest template happens to do:

| Provider's real context window | What to set | Example template |

|---|---|---|

| ~1M tokens, explicitly confirmed (not assumed from the model's tier/name) | [1m] suffix on every ANTHROPIC_MODEL / ANTHROPIC_DEFAULT_*_MODEL / CLAUDE_CODE_SUBAGENT_MODEL value. Must be the exact 4 characters [1m] — Claude Code matches this literal string, not a made-up marker like [1million] or [max]. | kimi.json |

| A known, smaller size (e.g. 200K) | Explicit CLAUDE_CODE_MAX_CONTEXT_TOKENS and/or CLAUDE_CODE_AUTO_COMPACT_WINDOW set to the real number — no [1m]. | kimi-highspeed.json |

| Unknown / not yet verified | Don't guess, and don't copy another provider's number just because a template needs something there. Ask the user to check the provider's own docs/console first. An unverified [1m] or an unverified large CLAUDE_CODE_AUTO_COMPACT_WINDOW just moves the failure from "compacts too early" to "doesn't compact until well past the real limit" — worse, because it's silent until a request actually fails. |

When a template supplies both a context marker and an explicit limit, retain

both unless their precedence has been verified. Read the actual values from

the selected template rather than maintaining a model summary here.

For checking provider model identity and whether an environment variable changes

the request sent over the wire, read references/context-window-config.md.

Important: The exact endpoint depends on whether the user is calling the provider directly or through a compatibility gateway (e.g., OpenRouter). Always ask.

Shared vs. Isolated

| Data | Location | Shared? |

|------|----------|---------|

| Session history | ~/.claude-profiles/<name>/.claude.json | Isolated per profile |

| Auth tokens/cache | ~/.claude-profiles/<name>/.claude.json | Isolated per profile |

| Account + MCP OAuth tokens | macOS Keychain, entry named from the config dir | Isolated by default; set CLAUDE_SECURESTORAGE_CONFIG_DIR="" to make every profile share one entry, so an MCP server authorized once is connected everywhere — see credential-storage.md |

| Skills | ~/.claude/skills/ | Shared via symlink |

| Plugin content | ~/.claude/plugins/marketplaces, cache, data, ... | Shared via symlink |

| Plugin install registry | ~/.claude/plugins/installed_plugins.json | Shared via symlink |

| Enabled plugin map | ~/.claude/settings.json -> <profile>/settings.json | Converged by sync-profile-settings.py (also mirrored by claude-plugins-sync.py) |

| Plugin marketplace index | <profile>/plugins/known_marketplaces.json | Per-profile (installLocation is config-dir-specific; can't be shared) |

| Projects/memory | ~/.claude/projects/, ~/.claude/memory/ | Shared via symlink |

| Hook scripts | ~/.claude/hooks/, ~/.claude/commands/ | Shared via symlink (scripts only — NOT registration) |

| settings.json config: hook registration, marketplaces, env flags, permissions, preferences | <profile>/settings.json | Converged from default profile into every profile by sync-profile-settings.py at session start (identity keys like model and provider-routing/isolation env vars are never synced) |

| .claude.json behavior keys (workflowSizeGuideline, notification/UI preferences) | ~/.claude.json → <profile>/.claude.json | Behavior allowlist converged by the same script; state/cache/counter/migration/credential keys (incl. projects, oauthAccount, userID) are never synced; unknown drifted keys are reported for human classification |

| MCP server registry (mcpServers) | ~/.claude.json → <profile>/.claude.json | Converged as a union: main's entries propagate, a server defined only in one profile survives, main wins on a shared name. It is a behavior key, not a credential — the OAuth token it needs lives in the Keychain and is governed by the row above, so a registry entry without a shared credential store still costs one authorization per profile |

| Provider settings | ~/.claude/settings/<name>.json | Shared source, loaded per profile |

Troubleshooting

A profile directory exists but claude-profiles-doctor reports it as an "orphan profile"

Symptom: claude-profiles-doctor reports

WARN: orphan profile — no settings/<name>.json; claude-profile <name> fails. Run: claude-profile-rm <name>.

Cause: the profile isolation directory exists under ~/.claude-profiles/ but

the corresponding ~/.claude/settings/<name>.json provider config file is

missing. claude-profiles-init only scans settings/*.json, so an orphan

profile's symlinks are never created or maintained, and claude-profile <name>

will fail to launch with "Error: Settings file not found." The profile directory

may still contain useful per-profile data (history.jsonl, .claude.json with

provider credentials, settings.json, skill workspaces).

Fix:

safely removes the isolation directory (it checks for unexpected files first).

~/.claude/settings/<name>.json (use a provider template from

assets/templates/), then run claude-profiles-init.

A shared directory (skills/projects/hooks/agents/...) shows as a real directory, not a symlink

Symptom: claude-profiles-doctor reports

<name> is a real directory (expected symlink to ~/.claude/<name>) — drift; run: claude-profiles-init --repair.

Cause: the profile was created before the symlink-convergence design landed (or

was hand-created), so a shared content directory ended up as a real per-profile

directory instead of a symlink. That profile's copy now silently diverges from the

main ~/.claude/ copy — its skills/projects/hooks/agents are not the same as every

other profile's. A real directory is not a broken link; the directory-type check in

claude-profiles-doctor detects this drift.

Fix (reversible — data is archived, never deleted):

claude-profiles-init --repair

For each drifted directory this archives the real dir to

<name>.pre-symlink-bak-<timestamp> inside the profile directory, then creates the

symlink that should have been there. Run claude-profiles-doctor again to confirm

a clean bill. If an archive turns out to hold data you need, it is sitting right

there — nothing was destroyed.

Note on what gets shared: after repair, that directory points at the main

~/.claude/<name> copy, so the profile sees the same skills/projects/etc. as the

default profile — which is the entire point of the shared-symlink design. The

per-profile state that must stay isolated (.claude.json, settings.json

identity keys like model/provider env, plugins/known_marketplaces.json) is

never one of these symlinked dirs, so repair never touches it. Inspect the archive

before discarding it if the profile held session/history data you care about —

those would now resolve to the shared copy.

Marketplace says "corrupted installLocation"

Symptom: /plugin or claude plugin marketplace update reports

corrupted installLocation ... expected a path inside <config-dir>/plugins/marketplaces.

Cause: known_marketplaces.json ended up shared across profiles (or hand-edited). Its

installLocation is config-dir-specific because Claude validates with path.resolve()

(symlinks NOT resolved), so one shared copy cannot satisfy multiple profiles.

Fix: claude-plugins-sync.py rebuilds each profile's own copy + the shared-content

symlinks. It runs automatically at claude-profile init/launch; to run manually:

python3 ~/.config/claude-switch-models-setup/claude-plugins-sync.py

Skill exists in default Claude but is missing in Kimi/GLM/DeepSeek

Symptom: the default Anthropic profile can see a skill, but a third-party profile cannot.

Cause: Claude Code stores enabledPlugins in each config directory's settings.json.

Sharing plugins/cache only makes files available; it does not enable them.

Fix:

python3 ~/.config/claude-switch-models-setup/claude-plugins-sync.py

Then restart the affected Claude Code window.

Local source edits do not show up in Claude Code or Codex

Read the source-change and pin-update procedure.

It distinguishes source-backed routes from pinned runtime copies and inventory

reports from successful synchronization and fresh-host discovery.

Source sync also manages derived cache artifacts:

Both are visible in a dry run before --apply touches anything.

A profile is missing hooks, marketplaces, env flags, or other default-profile settings

Symptom: the default profile has hook guards, marketplaces, or feature flags configured, but a third-party profile behaves as if they don't exist (no PreToolUse guards fire, claude plugin marketplace list is empty, a feature enabled in the default profile is off).

Sibling symptom, different layer: a behavior preference set on the default profile — e.g. the workflow size guideline — has no effect in third-party profiles. That key lives in the per-profile .claude.json, which symlinks and the settings.json sync both miss. See "Default-profile behavior settings don't reach third-party profiles" in references/troubleshooting.md.

Cause: those live in each profile's own settings.json, which is config-dir-local — symlinking directories does not cover the config layer, and it drifts silently the moment the default profile changes.

Fix:

python3 ~/.config/claude-switch-models-setup/sync-profile-settings.py --all

Then restart the affected window. Once the converger is registered as a SessionStart hook (setup step 6), the next session start converges every profile — not just the one that started — so --all is only needed to apply a manual settings edit immediately.

Third-party profile tries to use Anthropic-specific features

Symptom: WebSearch or other Anthropic-native tools fail with 400 errors.

Fix: Ensure the profile's settings.json sets:

{
  "env": {
    "ENABLE_TOOL_SEARCH": "false",
    "DISABLE_GROWTHBOOK": "1",
    "DISABLE_TELEMETRY": "1"
  }
}

(Add "DISABLE_AUTOUPDATER": "1" only when you intentionally want to pin the CLI version or stay offline; native auto-update uses the public release bucket without Anthropic account credentials.)

Subagent calls fall back to a different model

Symptom: Subagents inside a Kimi window call claude-opus-4-7.

Fix: Set CLAUDE_CODE_SUBAGENT_MODEL to the same value as ANTHROPIC_MODEL in the profile's settings.json.

A huge-context provider compacts/summarizes way too early, or the statusline context number looks wrong

Symptom: a provider whose own docs claim ~1M tokens of context gets auto-compacted by Claude Code well below that — long sessions get summarized when there's clearly no real need to yet, or the context percentage in the statusline tracks like it's looking at a ~200K model instead of the real ceiling.

Cause: the profile's ANTHROPIC_MODEL (and its ANTHROPIC_DEFAULT_*_MODEL / CLAUDE_CODE_SUBAGENT_MODEL siblings) is missing the [1m] marker. Claude Code has no other way to learn the provider's real context size — the request itself succeeding with a huge prompt doesn't tell Claude Code anything, since that's a property of the upstream provider, not of the client. See references/context-window-config.md for the full mechanism.

Fix: add the literal [1m] suffix to ANTHROPIC_MODEL, every ANTHROPIC_DEFAULT_*_MODEL, and CLAUDE_CODE_SUBAGENT_MODEL in the profile's settings.json (match kimi.json's pattern). Restart the affected window.

Adding a New Provider Later

  1. Create ~/.claude/settings/<new-provider>.json using a template.
  2. Check the provider's real, verified context window and configure it — [1m] marker or explicit CLAUDE_CODE_MAX_CONTEXT_TOKENS/CLAUDE_CODE_AUTO_COMPACT_WINDOW, see "Configuring Context Window Size" below and references/context-window-config.md. Don't skip this because the template you copied from happened not to need it.
  3. Run claude-profiles-init.
  4. Add an alias to the shell rc file if desired.

Auditing and Retiring Profiles

Profiles accumulate: a variant added for one experiment stays forever. Before

removing anything, audit actual usage — three signals, in order of reliability:

  1. Prompt history (~/.claude-profiles/<name>/history.jsonl) — the

strongest signal. Count entries and read the first/last timestamp values;

a profile with no history.jsonl at all was never typed into.

  1. Launch records in shell history — e.g.

atuin search --search-mode prefix "<alias> " counts how often each launch

alias was actually used.

  1. .claude.json mtime is NOT a usage signal — the settings converger and

the behavior-key sync both rewrite this file on session starts, so every

profile looks recently active (observed 2026-10-06: a fleet of untouched

profiles shared one recent mtime left by a sync run).

Retire by archiving, never by deleting outright:

file to an archive location outside ~/.claude-profiles/. If you keep a

dotfiles backup that mirrors that root with --delete, it would otherwise

erase the archived profile's backup copy on its next run; an archive outside

the mirror root survives.

old profile's history.jsonl into the successor's directory first, so the

prompt history follows the role.

Troubleshooting — the same audit applies before reviving or removing one.

For non-secret provider-pin verification, headless permission failures or a

success-looking invocation without a tool result, follow

headless profile verification.

Security Notes

Next Step

After setup, the user can immediately test by opening two terminals and running csk (Kimi K3) in one and csd in the other. Each window is independent.

When the person being set up is a workshop attendee doing it on their own machine

rather than someone you are driving, hand them references/student-setup-guide.md

instead of walking them through this file — it is written for them, front to back,

without the maintenance and troubleshooting material they do not need yet.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.