ccc-settings · diff

git:20260801.0de5ac7 to git:20261013.fbe187d

215 added, 66 removed. Audit B to B.

---
name: ccc-settings
- description: "Configuration hub — change theme, set cost ceiling, configure Linear, toggle animations, reset state. Use when the user says 'settings', 'change theme', 'configure',…"
+ description: "Settings hub: Commander preferences (name, level, cost ceiling, theme, animations, launch mode, Linear, reset) plus Claude Code permission mode, effort, model restrictions and workflow size, each written with a backup. Use when the user says settings, configure, change theme, set effort, auto mode."
allowed-tools:
- Read
- Write
- Bash
- AskUserQuestion
- argument-hint: "[name | level | cost | theme | linear | reset]"
+ argument-hint: "[name | level | cost | theme | animations | launch | linear | reset | mode | effort | models | workflows | --power]"
+ model: sonnet
+ effort: low
---
- # $ccc-settings — Configuration hub
+ # $ccc-settings — Commander and Claude Code settings
+ **CC Commander** · $ccc-settings · see current values → pick one → confirm → write with backup → read back
+
> Placeholders like ~~project tracker refer to connected tools. See [CONNECTORS.md](../../CONNECTORS.md).
- Configuration hub for CC Commander. Reads from and writes to `~/.claude/commander/config.json`. Full menu sourced from `references/settings.json`.
+ ## When to use / when not to
- ## Quick Mode (default)
+ - Use to change Commander preferences in `~/.claude/commander/config.json`, or the Claude Code settings this skill covers in user (`~/.claude/settings.json`) or project (`.claude/settings.json`) settings: permission mode, effort, model restrictions, workflow size.
+ - Not for switching the current model: that is `/model` in the session, and the user's selected model is preserved.
+ - Not for cleanup or missing structural keys: `$ccc-tuneup`. Not for unattended permission setups: `$ccc-yolo-setup`.
+ - `$ARGUMENTS` jumps straight to one setting (`theme`, `effort`, `mode`, …); `linear` runs only the Linear flow; `--power` (or `all`) opens the full menu.
+ - In Codex, ask each picker as a plain-text question with the same options. The Claude Code settings in Step 4 do not apply to Codex; say so and point to `~/.codex/config.toml` keys `model_reasoning_effort`, `approval_policy` and `sandbox_mode` instead.
- Load current config and show top 4 most-changed settings:
+ ## What happens
+ ### 1. Read current values
+
```bash
cat ~/.claude/commander/config.json 2>/dev/null || echo '{}'
+ node -e '
+ const fs=require("fs"),p=require("path");
+ const files={user:p.join(process.env.HOME,".claude/settings.json"),project:".claude/settings.json"};
+ for(const [layer,f] of Object.entries(files)){let j={};try{j=JSON.parse(fs.readFileSync(f,"utf8"))}catch(e){}
+ const pick={defaultMode:(j.permissions||{}).defaultMode,effortLevel:j.effortLevel,availableModels:j.availableModels,availableModelsMatch:j.availableModelsMatch,deniedModels:j.deniedModels,workflowSizeGuideline:j.workflowSizeGuideline,workflowSubagentModel:(j.env||{}).CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL};
+ console.log(layer+": "+JSON.stringify(pick));}'
```
- Display current values and offer via AskUserQuestion (max 4 options — "Back to main menu" is a plain-text line below the picker, not a 5th chip):
- - "Change my name" (currently: {name})
- - "Change theme" (currently: {theme})
- - "Set cost ceiling" (currently: ${costCeiling})
- - "More settings..."
-
- Below the picker: `Or say "back" to return to /ccc.`
-
- ## Power Mode
-
- Full settings menu from `references/settings.json`. Activate by passing `--power` or `all` as argument, or when user selects "More settings...".
-
- Page the 8 settings below into **two 4-option `AskUserQuestion` pickers** (max 4 per AUQ) rather than one 8-item list — page 1: name, level, cost ceiling, theme; page 2: animations, Linear setup, launch mode, reset. A "More…" chip on page 1 cascades to page 2, same pattern as `$ccc-more`.
-
- ### Available Settings
-
- All options from `references/settings.json`. Entries marked **(CLI-only)** configure the `ccc` terminal binary and have no effect in Claude Code Desktop / Cowork Desktop — surface them anyway (users may run both), but note the scope.
-
- **a) Display name** — How CC Commander addresses you
- - Ask: "What name should I use?" → write to `config.json`
-
- **b) Experience level** — beginner / intermediate / expert
- - Affects verbosity, auto-confirm thresholds, and suggested skill complexity
- - Ask via AskUserQuestion with 3 options
+ Unset values print as missing; treat them as platform defaults (auto permission mode, the model's default effort). Managed settings are not read here; if the user reports a model or mode they cannot change, an administrator's managed settings are the likely cause.
- **c) Cost ceiling** — Max budget per dispatch (default: $10)
- - Ask: "Max budget per session?" → validate is a number → write to `config.json`
- - Note: $10 hard ceiling in night-mode is separate
+ ### 2. Top picker
- **d) Theme (CLI-only)** — Visual theme for `ccc` CLI
- - Options: Claude Anthropic (default) / OLED Black / Matrix / Surprise Me
- - Use Bash to apply if `ccc --theme` is available; otherwise note takes effect on next `ccc` launch
+ Skip when `$ARGUMENTS` names a setting. Otherwise ask the top picker in Decision points. Below it print: `Or say "back" to return to /ccc.`
- **e) Animations (CLI-only)** — Toggle terminal animations
- - Ask: Enable / Disable
- - Sets `CC_NO_ANIMATION=1` in shell profile if disabled
+ ### 3. Commander preferences (`~/.claude/commander/config.json`)
- **l) Linear setup** — Choose team + project, check connection
- - Check for `LINEAR_CC_CLIENT_ID` and `LINEAR_CC_CLIENT_SECRET` in environment
- - If not set: show instructions to set the following in your shell config (`.bashrc`, `.zshrc`) or via your preferred secrets manager:
- `export LINEAR_CC_CLIENT_ID=<your_client_id>` and `export LINEAR_CC_CLIENT_SECRET=<your_client_secret>`
- - If set: test connection, show linked team and project, offer to change
+ Ask the preferences page-1 picker in Decision points; "More…" opens the page-2 picker, and its "Back" returns to page 1. Entries marked CLI-only configure the `ccc` terminal binary and have no effect in Claude Code Desktop or Cowork; show them anyway and say so. The menu definition used by the CLI is [references/settings.json](references/settings.json).
- **m) Launch mode (CLI-only)** — Simple or Advanced (split tmux)
- - Simple: standard single-pane launch
- - Advanced: tabbed tmux split mode (`ccc --split`)
+ For each setting, ask as below. Value pickers list the 🟢 option first; put the current value in its description.
- **r) Reset all state** — Start fresh (keeps skills, clears sessions/knowledge)
- - Confirm: "This will delete all sessions and knowledge base entries. Skills are preserved. Continue?"
- - If confirmed: `rm -rf ~/.claude/commander/sessions/ ~/.claude/commander/knowledge/`
+ | Setting | How to ask | Write |
+ |---|---|---|
+ | Display name | "What name should I use?" | `name` |
+ | Experience level | Picker: 🟢 intermediate (balanced detail) / beginner (more explanation, more confirmations) / expert (terse, fewer confirmations). Affects verbosity, auto-confirm thresholds, suggested skill complexity | `level` |
+ | Cost ceiling | "Max budget per dispatch (USD)?" Validate a positive number. Default 10. The night-mode hard ceiling is separate | `costCeiling` |
+ | Theme (CLI-only) | Picker: 🟢 Claude Anthropic (default) / OLED Black / Matrix / Surprise me. Apply with `ccc --theme <name>` when available, else it takes effect on the next `ccc` launch | `theme` |
+ | Animations (CLI-only) | Picker: 🟢 enable (default) / disable (for slow terminals, screen readers or CI). Disabling also means `CC_NO_ANIMATION=1` in the shell profile; print the line for the user to add | `animations` |
+ | Launch mode (CLI-only) | Picker: 🟢 simple (single pane, default) / advanced (tabbed tmux split, `ccc --split`) | `launchMode` |
- ### Config File Format
+ File shape (placeholders, not real values):
- `~/.claude/commander/config.json`:
```json
{
- "name": "Kevin",
+ "name": "<display name>",
"level": "expert",
"costCeiling": 10,
"theme": "claude-anthropic",
"animations": true,
"launchMode": "simple",
- "linear": {
- "teamId": "CC",
- "projectId": "commander"
- }
+ "linear": { "teamId": "<team key>", "projectId": "<project slug>" }
}
```
- Use Write to persist all changes. Never silently overwrite — show the proposed change and confirm.
+ Show the proposed change as `key: old → new` and confirm before writing. Then back up and write the whole object with Write, preserving every key you did not change:
- ## If Connectors Available
+ ```bash
+ cp ~/.claude/commander/config.json ~/.claude/commander/config.json.backup-$(date +%Y%m%d-%H%M%S) 2>/dev/null; mkdir -p ~/.claude/commander
+ ```
- If **~~project tracker** is connected:
- - The Linear setup option shows current connection status and allows switching teams/projects
- - On successful Linear setup, offer to import open issues immediately
+ Verify with `node -e "console.log(JSON.parse(require('fs').readFileSync(process.env.HOME+'/.claude/commander/config.json','utf8')).<key>)"` and report the value read back.
- ## Tips
+ **Linear setup** (opt-in, absent by default):
- 1. Pass a setting name directly as argument (e.g., `settings theme`) to jump to that setting.
- 2. The `linear` argument runs the Linear setup flow without opening the full settings menu.
- 3. Config is never auto-reset — the reset option requires explicit confirmation.
+ 1. Check whether `LINEAR_CC_CLIENT_ID` and `LINEAR_CC_CLIENT_SECRET` are set without printing them: `[ -n "$LINEAR_CC_CLIENT_ID" ] && [ -n "$LINEAR_CC_CLIENT_SECRET" ] && echo set || echo missing`.
+ 2. Missing: tell the user to export both in their shell profile or secrets manager (`export LINEAR_CC_CLIENT_ID=<your_client_id>`, `export LINEAR_CC_CLIENT_SECRET=<your_client_secret>`). Never ask them to paste a secret into the chat.
+ 3. Set: test the connection, show the linked team and project, and offer to change them (write `linear.teamId`, `linear.projectId`).
+ 4. If ~~project tracker is connected, show its connection status, allow switching teams or projects, and after a successful setup offer to import open issues.
+
+ **Reset all state:** ask the reset picker. Skills are preserved either way; "Cancel" changes nothing.
+
+ 1. "Archive, then reset": move whichever of `sessions/` and `knowledge/` exist into a UTC-stamped archive. A missing folder is skipped and reported; if neither exists, report that there is nothing to reset and stop.
+
+ ```bash
+ base="$HOME/.claude/commander"; stamp=$(date -u +%Y%m%dT%H%M%SZ); dest="$base/reset-archive/$stamp"
+ if [ ! -d "$base/sessions" ] && [ ! -d "$base/knowledge" ]; then echo "nothing to reset"; else
+ mkdir -p "$dest" || { echo "cannot create $dest"; exit 1; }
+ for d in sessions knowledge; do
+ if [ -d "$base/$d" ]; then mv "$base/$d" "$dest/$d" && echo "archived $d" || echo "FAILED to move $d"; else echo "skipped $d (missing)"; fi
+ done
+ echo "archive: $dest"; ls "$dest"; ls "$base"
+ fi
+ ```
+
+ Look for each existing folder listed under the archive path and absent from `ls "$base"`. On a failed move, stop and report it; nothing has been deleted.
+ 2. "Delete permanently": run `rm -rf ~/.claude/commander/sessions/ ~/.claude/commander/knowledge/` (a missing folder is not an error).
+ 3. Verify with `ls ~/.claude/commander/` and report what remains, plus the archive path when archived.
+
+ ### 4. Claude Code settings (user or project `settings.json`)
+
+ Ask the Claude Code picker in Decision points, then the value picker for the chosen setting. For permission mode and workflow size, then ask the settings-layer picker (🟢 user settings unless the user wants this repository only). Effort is always written to user settings. Values, layers and caveats for each are in [references/claude-code-settings.md](references/claude-code-settings.md).
+
+ - **Permission mode** → `permissions.defaultMode`. Offer 🟢 `auto` (the interactive default since Claude Code 2.1.284), `default` (ask before edits and commands), `acceptEdits`, `plan`. Mention Shift+Tab to switch for one session. Route `bypassPermissions` requests to `$ccc-yolo-setup`.
+ - **Effort** → `effortLevel`. Offer `low` / `medium` / 🟢 `high` / `xhigh`. Say that `max` is session-only (`/effort max`), that `/effort` opens the slider, and that `/effort ultracode on|off` is a separate toggle that does not change the effort level.
+ - **Model restrictions** → `availableModels`, `availableModelsMatch`, `deniedModels`. Show current values from Step 1. These are administrator controls: print a managed-settings snippet from the reference instead of writing them. Use aliases (`fable`, `opus`, `sonnet`, `haiku`) or full ids such as `claude-opus-5-5`.
+ - **Workflow size** → `workflowSizeGuideline`. Offer `small` / 🟢 `medium` / `large` / `unrestricted`. Mention `CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL` only if the user wants every workflow agent pinned to one model.
+
+ ### 5. Write a Claude Code setting
+
+ Show `key: old → new` and the target file, confirm, then run (set `F` for the chosen layer, replace the key and JSON value). For project settings, run from the repository root.
+
+ ```bash
+ F="$HOME/.claude/settings.json" # project layer: F=".claude/settings.json"
+ mkdir -p "$(dirname "$F")"
+ if [ -f "$F" ]; then B="$F.backup-$(date +%Y%m%d-%H%M%S)"; cp "$F" "$B" && echo "backup: $B"; else echo "no existing file; no backup"; fi
+ node -e '
+ const fs=require("fs");const [f,key,raw]=process.argv.slice(1);
+ const j=fs.existsSync(f)?JSON.parse(fs.readFileSync(f,"utf8")):{};
+ const ks=key.split(".");let o=j;for(const k of ks.slice(0,-1)){o[k]=o[k]&&typeof o[k]==="object"?o[k]:{};o=o[k];}
+ o[ks[ks.length-1]]=JSON.parse(raw);fs.writeFileSync(f,JSON.stringify(j,null,2)+"\n");
+ const back=ks.reduce((x,k)=>x&&x[k],JSON.parse(fs.readFileSync(f,"utf8")));console.log(key+" = "+JSON.stringify(back));' "$F" permissions.defaultMode '"auto"'
+ ```
+
+ The printed read-back must equal the chosen value. If the write or parse fails, restore with `cp "<backup path>" "$F"` using the printed backup path, and report the error. New sessions pick up the change; tell the user to restart or use the in-session command (`/effort`, Shift+Tab) for the current one.
+
+ ## Decision points
+
+ Top picker:
+
+ ```yaml
+ question: "What would you like to change?"
+ header: "Settings"
+ multiSelect: false
+ options:
+ - label: "🟢 Commander preferences"
+ description: "Recommended start: touches only Commander's own config.json. Currently: <name> · <level> · $<costCeiling>."
+ - label: "Claude Code settings"
+ description: "Permission mode, effort, model restrictions, workflow size."
+ - label: "Linear setup"
+ description: "Opt-in: check credentials, choose team and project."
+ - label: "Reset all state"
+ description: "Clears Commander sessions and knowledge; skills stay. Asks again before acting."
+ ```
+
+ Commander preferences, page 1:
+
+ ```yaml
+ question: "Which preference?"
+ header: "Preferences"
+ multiSelect: false
+ options:
+ - label: "🟢 Experience level"
+ description: "Currently: <level>; changes verbosity and suggestions everywhere."
+ - label: "Display name"
+ description: "Currently: <name>"
+ - label: "Cost ceiling"
+ description: "Currently: $<costCeiling> per dispatch."
+ - label: "More…"
+ description: "Theme, animations, launch mode (CLI-only)."
+ ```
+
+ Commander preferences, page 2 (after "More…"):
+
+ ```yaml
+ question: "Which CLI preference? These affect only the ccc terminal binary."
+ header: "Preferences"
+ multiSelect: false
+ options:
+ - label: "🟢 Theme"
+ description: "Currently: <theme>; applies with ccc --theme or on next launch."
+ - label: "Animations"
+ description: "Currently: <animations>; disabling also needs CC_NO_ANIMATION=1."
+ - label: "Launch mode"
+ description: "Currently: <launchMode>; simple single pane or tmux split."
+ - label: "Back"
+ description: "Return to page 1; no change."
+ ```
+
+ Claude Code settings:
+
+ ```yaml
+ question: "Which Claude Code setting?"
+ header: "Claude Code"
+ multiSelect: false
+ options:
+ - label: "🟢 Permission mode"
+ description: "Currently: <defaultMode or auto>. Auto is the interactive default."
+ - label: "Effort"
+ description: "Currently: <effortLevel or model default>. Higher means more thinking tokens."
+ - label: "Model restrictions"
+ description: "availableModels / deniedModels; shown, with an admin snippet."
+ - label: "Workflow size"
+ description: "Currently: <workflowSizeGuideline or unset>; caps dynamic workflow size."
+ ```
+
+ Settings layer (permission mode and workflow size only):
+
+ ```yaml
+ question: "Which settings file should hold this value?"
+ header: "Layer"
+ multiSelect: false
+ options:
+ - label: "🟢 User settings"
+ description: "~/.claude/settings.json; applies to every project on this machine."
+ - label: "Project settings"
+ description: ".claude/settings.json in this repository; overrides user settings and is shared if committed."
+ ```
+
+ Reset:
+
+ ```yaml
+ question: "Reset Commander sessions and knowledge? Skills are preserved."
+ header: "Reset"
+ multiSelect: false
+ options:
+ - label: "🟢 Archive, then reset"
+ description: "Moves both folders to ~/.claude/commander/reset-archive/<stamp>/; reversible."
+ - label: "Delete permanently"
+ description: "Removes both folders; cannot be undone."
+ - label: "Cancel"
+ description: "No change."
+ ```
+
+ ## Done when
+
+ - The chosen value was read back from the file it was written to and reported (`key = value`).
+ - Each write has a backup path reported, or the file did not exist before.
+ - For reset, `ls ~/.claude/commander/` shows the folders gone (and the archive path when archived).
+
+ ## Guardrails
+
+ - Never write without showing `old → new` and getting a confirmation; never silently overwrite.
+ - Back up `config.json` or `settings.json` before every write; write only the picked key and keep all others.
+ - Never write managed settings; print a snippet for the administrator.
+ - Never change the user's selected model; `/model` does that.
+ - Never print, store or ask for a secret value; check presence only.
+ - Reset requires its own picker answer; config is never reset automatically.
+
+ ## See also
+
+ - `$ccc-tuneup` — audit and add missing structural settings keys
+ - `$ccc-doctor` — read-only health report
+ - `$ccc-yolo-setup` — unattended permission setups and their trade-offs
+ - `$ccc-linear` — work with the opt-in Linear connection
---
> ⚙️ **Fable contract:** plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state — `rules/fable-method.md`
> (On Codex, present these options as a numbered list and ask the user to reply with a number — AskUserQuestion is Claude-only.)