Manage multiple Claude Code settings.json configurations with fast context switching. Switch between work, personal, or project-specific Claude settings instantly.
A fast, secure, and intuitive tool for managing multiple Claude Code `settings.json` configurations. Switch between work, personal, or project-specific Claude settings instantly.
This skill helps you manage and switch between different Claude Code configuration contexts. A **context** is a saved Claude Code configuration stored as a JSON file. You can have separate contexts for work, personal projects, or specific project requirements, and switch between them instantly.
```
~/.claude/
├── settings.json # Current active context
└── settings/
├── work.json # Work context
├── personal.json # Personal context
├── project-alpha.json # Project-specific context
└── .cctx-state.json # Hidden state file
```
When helping users manage Claude Code contexts, follow these steps:
Use `cctx` to show all contexts. Default behavior uses user-level contexts for predictability.
**Basic listing:**
**Project/local contexts:**
**Switch to named context:**
```bash
cctx <context-name>
```
**Switch to previous context:**
```bash
cctx -
```
**Interactive mode:**
Run `cctx` without arguments and select from the list (uses fzf if available, built-in fuzzy finder as fallback)
**From current settings:**
```bash
cctx -n <new-context-name>
```
**Validate context names:**
**Show current context:**
```bash
cctx -c
```
**View context content:**
```bash
cctx -s [context-name]
```
**Edit context:**
```bash
cctx -e [context-name]
```
(Uses $EDITOR environment variable)
**Rename context:**
```bash
cctx -r <old-name> <new-name>
```
**Delete context:**
```bash
cctx -d <context-name>
```
(Cannot delete currently active context)
**Unset current context:**
```bash
cctx -u
```
**Export context:**
```bash
cctx --export <context-name> > backup.json
```
**Import context:**
```bash
cat backup.json | cctx --import <new-context-name>
```
Always check for and handle:
Provide clear, actionable error messages to users.
**Predictability over cleverness:**
**Progressive disclosure:**
**Speed and simplicity:**
```bash
cctx -n work
cctx -n personal
cctx work
cctx personal
cctx - # Back to previous
```
```bash
cctx --in-project -n staging
cctx --in-project -n production
cctx --in-project staging
cctx --in-project production
```
```bash
cctx --export work > ~/backups/claude-work.json
cctx --export team-standards | gh gist create
curl <gist-url> | cctx --import work
```
**Language:** Rust (edition 2021)
**Key Dependencies:**
**Design Decisions:**
1. Context names cannot contain `/`, `.`, `..`, or be empty
2. Cannot delete the currently active context
3. All contexts must be valid JSON
4. Requires appropriate file system permissions
5. Interactive mode requires terminal support
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/claude-code-context-manager/raw