/claude-profiles:set [branch | --new <branch> [--from <a>,<b>,...] | --adopt <branch> | --none]from claude-profiles
Pick, create, switch, adopt, or opt out of this workspace's .claude profile branch
Ships in claude-profiles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Configure this workspace's .claude folder from the user's profiles repo.
Profiles come from one or more sources in ~/.config/claude-profiles/config.json
(manage them with /claude-profiles:source). If no source is configured, tell
the user to run /claude-profiles:init first and stop. The bundled scripts
under ${CLAUDE_PLUGIN_ROOT}/scripts/ read this config; you don't need to pass
URLs around explicitly.
Source resolution. When the user names an existing branch, find which
source provides it by running
bash "${CLAUDE_PLUGIN_ROOT}/scripts/list-branches.sh" --by-source (it prints
<source>\t<branch>\t<description> lines):
Then export CLAUDE_PROFILES_SOURCE=<source> for the clone/adopt/marker scripts
below — they operate on that source's repo and record it in the marker. With a
single source you can skip this; everything defaults to it.
Arguments given: "$ARGUMENTS"
If a .claude-profiles marker already exists at the workspace root, the user is
asking to change the profile. Show the current profile (the marker's profile
field) and confirm before proceeding. On yes, delete the existing .claude/
folder (if any) and continue. The marker will be rewritten in step 5.
A bare branch name → existing-branch path (step 3a).
--new <branch> → new-from-template path (step 3b).
--new <branch> --from <a>,<b>,... → merge two-or-more existing profiles
into a new branch (step 3d). The first entry in --from is the base; each
remaining entry is merged into it in order.
--adopt <branch> → adopt path (step 3c).
--none → run bash "${CLAUDE_PLUGIN_ROOT}/scripts/write-marker.sh" none and stop.
No arguments → ask the user. Tailor the menu to the workspace state:
.claude exists, not a profile clone → offer adopt / replace-with-existing /
replace-with-template / opt-out..claude exists, already a profile clone → just write the marker matching
its current branch (git -C .claude branch --show-current) and stop..claude → offer existing / new-from-template / opt-out.To list available branches, run bash "${CLAUDE_PLUGIN_ROOT}/scripts/list-branches.sh"
(or --by-source to see each branch's source and cached description). Show the
descriptions to help the user choose; a profile's description is filled in once
it's been cloned/adopted (or set via /claude-profiles:describe).
Recommend a match first. Run
bash "${CLAUDE_PLUGIN_ROOT}/scripts/detect-project.sh" to infer the
workspace's stack (e.g. rust, node, tauri, claude-plugin). Match those
traits against the branch names and descriptions and surface the best-fitting
profile(s) at the top of the menu, before the full list.
Resolve the source first (see Source resolution above) and export
CLAUDE_PROFILES_SOURCE if more than one source exists. Then run the one-shot
setup (clone + .gitignore + marker + cache refresh, in one deterministic step):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-profile.sh" <branch>
Parse its state=/summary= output and report it. If .claude already exists,
ask before deleting it; the script refuses to overwrite. It already does steps
4 and 5 — skip them.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-profile.sh" --new <branch>
This branches the template branch into a new <branch>, pushes it, ignores
.claude/, writes the marker, and refreshes the cache. (Add --from <base> to
branch from a different base.) Tell the user to customize .claude/ — subsequent
edits push from .claude as normal. Steps 4 and 5 are handled — skip them.
Parse --from as a comma-separated list. The first entry is the base; the
rest are merged in order.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/merge-profile.sh" <branch> <base> <others-csv>
Exit codes:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/refresh-branches-cache.sh" and continue
to step 4..claude/, then commit and push manually. The .claude clone is already on
<branch>, so do not tell them to re-run /claude-profiles:set <branch>
(a bare branch name re-enters the clone path, which refuses because .claude
exists). Once they've pushed, finish setup in place by doing steps 4–5
directly: bash "${CLAUDE_PLUGIN_ROOT}/scripts/ensure-gitignore.sh", then
bash "${CLAUDE_PLUGIN_ROOT}/scripts/write-marker.sh" <branch>, then
bash "${CLAUDE_PLUGIN_ROOT}/scripts/refresh-branches-cache.sh". (Equivalently,
re-run /claude-profiles:set with no argument — step 2 detects the existing
clone and just writes the marker.).claudebash "${CLAUDE_PLUGIN_ROOT}/scripts/adopt-profile.sh" <branch>
The script handles three cases (no git, our remote already, different remote)
and exits non-zero with an explanation if it can't proceed. After a successful
adopt, run bash "${CLAUDE_PLUGIN_ROOT}/scripts/refresh-branches-cache.sh".
(3a and 3b already did steps 4 and 5 via setup-profile.sh. Do steps 4–5 only
for the adopt (3c) and merge (3d) paths.)
Run bash "${CLAUDE_PLUGIN_ROOT}/scripts/ensure-gitignore.sh" and parse the
state= line:
not_git or already_ignored → nothing to do.added → tell the user .claude/ was appended to .gitignore.If the user explicitly wants to track .claude/ in the project repo instead,
skip the script and warn them that committing .claude/ while it's a git clone
will embed it as a gitlink unless they take further steps.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/write-marker.sh" <branch>
This records the chosen profile so the SessionStart hook knows the workspace's
intended state. Tell the user to commit the .claude-profiles file to the
project repo so collaborators see which profile this project expects.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jhughes-dev/claude-profiles --plugin claude-profiles8 skills in this plugin
/configureConfigure/onboard this workspace's profile by promoting config from user space (~/.claude) into it — enable plugins, copy skills/agents/commands/hooks, add CLAUDE.md guidance, and copy settings, tailored to the repo./describeSet this workspace profile's one-line self-description, shown when picking profiles/initFirst-time setup for the claude-profiles system (configure profiles repo and capture current ~/.claude)/maintain-profileUse when installing/enabling Claude Code plugins, adding skills/hooks/agents, editing settings.json or CLAUDE.md, or merging template forward into scenario branches. Explains user-vs-profile placement and how to keep profile branches healthy./sourceManage profile sources (the git repos that provide profile branches)/statusCheck this workspace's .claude profile sync status against the claude-profiles repo