Profile Loader
Switch the active plugin set to match a workflow profile, reducing per-spawn skill enumeration overhead (see #1041, #1080).
Usage
/profile list # Show all available profiles
/profile current # Show currently active profile
/profile load <name> # Activate a profile (requires session restart)
/profile reset # Remove active profile marker (restores full plugin set)
Implementation rules
.claude/ path handling (CC v2.1.121+)
Direct Write/Edit on
.claude/profiles/.activeand~/.claude/settings.jsonis permitted under thebypassPermissionspermission mode (CC v2.1.121+, #1101). The legacy/tmp/*.shbypass is deprecated. For CC < v2.1.121, see git history for the legacy pattern.
Profiles directory
Profiles live in .claude/profiles/*.json. Active profile marker: .claude/profiles/.active (plain text, contains profile name).
Global plugin state is stored in ~/.claude/settings.json under enabledPlugins (object: plugin-key → boolean).
Workflow: `/profile list`
Read .claude/profiles/— glob*.json- For each JSON file: read
nameanddescriptionfields - Check
.claude/profiles/.activefor currently active profile - Print table:
Available profiles:
web-app Web application development (frontend + auth + deploy)
data-eng Data engineering sessions (Airflow, Spark, Kafka, Snowflake, dbt)
harness-dev oh-my-customcode harness development (agent/skill/rule authoring)
minimal Minimal plugin set for low-overhead sessions (memory + core only)
Active: web-app (restart required to apply plugin changes)
Workflow: `/profile current`
- Read
.claude/profiles/.active - If exists: print
Active profile: <name> - If missing: print
No profile active (full plugin set in use)
Workflow: `/profile load <name>`
- Locate
.claude/profiles/<name>.json - Read profile JSON — extract
plugins.enabledandplugins.disabled - Read
~/.claude/settings.json— extract currentenabledPluginsobject - Compute diff:
- Plugins to enable: in
plugins.enabledbut currentlyfalseor absent - Plugins to disable: in
plugins.disabledbut currentlytrue
- Show diff to user:
Profile: web-app
Enable: context7, superpowers, vercel, ui-design, ...
Disable: codex, ralph-wiggum, agent-sdk-dev, ...
- Apply changes via direct Edit on
~/.claude/settings.json(underbypassPermissionspermission mode, CC v2.1.121+):
- Read
~/.claude/settings.json, merge the computed diff intoenabledPlugins(set enabled plugins totrue, disabled plugins tofalse), then Write the updated JSON back.
- Write active marker via direct Write on
.claude/profiles/.active(underbypassPermissionspermission mode):
- Write the profile
<name>as plain text content to.claude/profiles/.active.
- Confirm:
[Done] Profile 'web-app' applied to ~/.claude/settings.json
Active marker written to .claude/profiles/.active
IMPORTANT: Restart this Claude Code session for plugin changes to take effect.
Workflow: `/profile reset`
- Remove
.claude/profiles/.activemarker via directBash: [ -e .claude/profiles/.active ] && rm .claude/profiles/.active(no-f, no/bin/rm; anrmthat resolves to a safety wrapper is used as is) (underbypassPermissionspermission mode) - Print:
[Done] Profile marker removed. Full plugin set will be active after restart. - Note: does NOT revert
~/.claude/settings.json— user should re-run/profile load <other>or manually restore
Notes
- Profile changes to
~/.claude/settings.jsontake effect only after session restart - Profiles define a subset: plugins not listed in
enabledordisabledkeep their current state - Profile JSON
enabled/disabledlists use full plugin keys:<name>@<marketplace>format - All
.claude/writes use direct Write/Edit/Bash (CC v2.1.121+, no/tmpwrapping — see Implementation rules above)