Skip to content

samhvw8/claude-code-profile

Repository files navigation

ccp - Claude Code Profile Manager

A CLI tool for managing multiple Claude Code configuration profiles via a central hub of reusable components.

What This Project Does

ccp solves the configuration management problem for Claude Code power users:

  • Central Hub: Store all your skills, agents, hooks, rules, and commands in one place (~/.ccp/hub/)
  • Multiple Profiles: Create purpose-specific configurations (quickfix, full-stack-dev, documentation)
  • Settings Templates: Complete settings.json templates referenced by name — what you see is what you get
  • Project Setup: Copy hub items into any project's .claude/ for team-shareable, git-committable config
  • Concurrent Profiles: Run different profiles simultaneously in different projects via mise/direnv
  • Symlink Architecture: Profiles link to hub items, ensuring single-source-of-truth maintenance
  • Instant Switching: Switch between profiles globally or per-project via CLAUDE_CONFIG_DIR

Problem

Claude Code's 20 skill limit forces manual reconfiguration for different work modes. There's no mechanism to save, switch, or share configurations. Duplicating skills across setups creates maintenance burden and configuration drift.

Installation

go install github.com/samhvw8/ccp@latest

Or build from source:

git clone https://github.com/samhvw8/ccp
cd ccp
go build -o ccp .

Quick Start

# Initialize from existing ~/.claude
ccp init

# Search and install packages
ccp find debugging
ccp install owner/repo

# Create a new profile
ccp profile create quickfix --skills=debugging-core,git-basics

# Or use interactive mode
ccp profile create dev -i

# Switch active profile
ccp use quickfix

# Copy hub items into a project's .claude/
ccp project add skills/coding agents/reviewer

Architecture

~/.ccp/
├── hub/                              # Single source of truth
│   ├── skills/
│   ├── agents/
│   ├── hooks/
│   ├── rules/
│   ├── commands/
│   └── settings-templates/           # Complete settings.json templates
│
├── store/                            # Shared downloadable resources
│   └── plugins/
│       ├── marketplaces/
│       └── cache/
│
├── sources/                          # Cloned source repositories
│
├── profiles/
│   ├── default/                      # Migrated from original ~/.claude
│   │   ├── CLAUDE.md
│   │   ├── settings.json
│   │   ├── skills/                   # Symlinks → hub/skills/*
│   │   ├── agents/                   # Symlinks → hub/agents/*
│   │   ├── hooks/
│   │   ├── rules/
│   │   ├── profile.toml              # Manifest
│   │   └── ...
│   │
│   └── shared/                       # Shared data (tasks, todos, etc.)
│       ├── tasks/
│       ├── todos/
│       └── ...
│
└── ccp.toml                          # Config + installed sources

~/.claude → ~/.ccp/profiles/default   # Symlink to active profile

Commands

Core

Command Description
ccp init Migrate existing ~/.claude to ~/.ccp structure
ccp migrate Run migrations from older ccp versions
ccp use <profile> [-g] Switch profile (project or global)
ccp which Show current active profile
ccp status Show ccp status and health
ccp doctor [--fix] Diagnose and fix common issues

Profile Management

Command Description
ccp profile create <name> Create new profile (flags or -i interactive)
ccp profile list List all profiles
ccp profile edit <name> Add/remove hub items
ccp profile sync [--all] Regenerate symlinks and settings
ccp profile fix <name> Reconcile profile to match manifest
ccp profile delete <name> Delete a profile

Hub Management

Command Description
ccp hub list [type] List hub contents
ccp hub add <type> <path> Add item to hub
ccp hub show <type/name> Show hub item details
ccp hub remove <type/name> Remove item from hub
ccp link [profile] [item] Link hub item to profile
ccp unlink <profile> <item> Unlink hub item from profile

Project Setup

Command Description
ccp project add [items...] [-i] Copy hub items into project's .claude/
ccp project list List items in project's .claude/
ccp project remove [items...] Remove items from project's .claude/

Package Management

Command Description
ccp find <query> Search skills.sh for packages
ccp install [owner/repo] Install from package or sync all
ccp source list List installed sources
ccp source update Update installed sources
ccp source remove <name> Remove a source

Settings Templates

Command Description
ccp template list List settings templates
ccp template show <name> Display template JSON
ccp template create <name> Create new template
ccp template edit <name> Edit in $EDITOR
ccp template extract <name> Extract from profile's settings

Profile Activation

Global (symlink)

ccp use quickfix -g
# ~/.claude → ~/.ccp/profiles/quickfix

Per-Project (mise)

# .mise.toml
[env]
CLAUDE_CONFIG_DIR = "~/.ccp/profiles/dev"

Per-Project (direnv)

# .envrc
export CLAUDE_CONFIG_DIR="$HOME/.ccp/profiles/dev"

Profile Manifest

Each profile has a profile.toml manifest:

version = 3
name = "quickfix"
description = "Minimal bug-fixing configuration"
settings-template = "opus-full"   # Optional settings template

[hub]
skills = ["debugging-core", "git-basics"]
hooks = ["pre-commit-lint"]
rules = ["minimal-change"]
commands = ["quick-test"]

Data directories (tasks, todos, history) are always shared across profiles.

Shell Completion

# Bash
source <(ccp completion bash)

# Zsh
ccp completion zsh > "${fpath[1]}/_ccp"

# Fish
ccp completion fish | source

Machine Migration

# Sync with chezmoi
chezmoi add ~/.ccp/ccp.toml ~/.ccp/hub

# On new machine
chezmoi apply
ccp install  # Syncs all sources from ccp.toml

Development

go test ./...      # Run tests
go build -o ccp .  # Build
go install .       # Install locally

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages