Merge pull request 'fix(claude-code): turn off built-in plugin skills that disableBundledSkills misses' (#288) from fix/286-builtin-plugin-skills into main
Reviewed-on: #288
This commit was merged in pull request #288.
This commit is contained in:
commit
b5bb0314d1
3 files changed
+51
-10
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Bundled Claude Code skills are turned off with one user-level switch
|
||||
# Bundled Claude Code skills are turned off at user level
|
||||
|
||||
**Status: accepted (2026-12-03).**
|
||||
**Status: accepted (2026-12-03), amended 2026-12-06 (#286).**
|
||||
|
||||
## Context
|
||||
|
||||
@@ -10,27 +10,40 @@ from `skillOverrides` is on, and `Skill(x)` allow rules do not restrict other sk
|
||||
wanted a setting that also covers bundled skills added later. A custom `/ship` is also not loaded
|
||||
where the built-in one is available.
|
||||
|
||||
On Claude Code 2.1.337 the switch does not cover built-in plugins (`cc-plugin-*@builtin`). Their
|
||||
skills `design`, `doctor` and `plugin-authoring` still load, and so do their tools (#286).
|
||||
|
||||
## Decision
|
||||
|
||||
**Bundled skills are turned off with one switch, not a per-name list.** The settings live at user
|
||||
level in `providers/claude-code/settings.json`, which `scripts/install.sh` deploys to
|
||||
**Bundled skills are turned off with one switch; built-in plugin skills need a per-name list.** The
|
||||
settings live at user level in `providers/claude-code/settings.json`, which `scripts/install.sh` deploys to
|
||||
`~/.claude/settings.json`:
|
||||
|
||||
- `disableBundledSkills: true`
|
||||
- `syncClaudeAiSkills: false`
|
||||
- `env.CLAUDE_CODE_DISABLE_SHIP: "1"`, the documented fix for the custom `/ship`.
|
||||
- `skillOverrides.init: "off"`
|
||||
- `skillOverrides` `design`, `doctor` and `plugin-authoring`: `"off"`, for the built-in plugin skills.
|
||||
- `enabledPlugins`: `cc-plugin-easel@builtin` and `cc-plugin-plugin-authoring@builtin` set to `false`.
|
||||
`cc-plugin-privacy`, `-agents-md`, `-telemetry` and `-verbs` stay on: they add no skills and their
|
||||
behaviour has not been checked.
|
||||
- `syncClaudeAiPlugins: false`, the plugin counterpart of `syncClaudeAiSkills`.
|
||||
|
||||
**A per-name `skillOverrides` blocklist is accepted for built-in plugin skills only**, because the
|
||||
single switch does not reach them. Bundled skills stay under the switch. `enabledPlugins` lives in
|
||||
this user-level file, so ADR-0018's ban on it in the project `.claude/settings.json` does not apply.
|
||||
|
||||
Holocron does not distribute these settings to consumer repos. User-level settings already apply to
|
||||
every repo on the machine, and another machine needs its own `install.sh` run.
|
||||
|
||||
**`install.sh` must merge into an existing `~/.claude/settings.json` before these settings are
|
||||
deployed.** Today it copies the file over, which would drop 11 of the operator's 13 top-level keys.
|
||||
The merge is a separate implementation ticket, not part of this ADR's PR.
|
||||
deployed.** It used to copy the file over, which would have dropped 11 of the operator's 13 top-level
|
||||
keys. Done since: `scripts/merge-json.py` merges the file, and `tests/test-install.sh` covers it.
|
||||
|
||||
## Considered options
|
||||
|
||||
**A `skillOverrides` blocklist (rejected).** It needs a new entry for each unwanted skill that ships.
|
||||
**A `skillOverrides` blocklist (rejected as the general mechanism).** It needs a new entry for each unwanted skill that ships.
|
||||
It is now used for built-in plugin skills (#286), but is still rejected as the general mechanism.
|
||||
|
||||
**`skillOverrides` in the committed `.claude/settings.json`, as #266 proposed (rejected).** apm owns
|
||||
that file and `apm audit --ci` fails on hand-added keys (AGENTS.md, ADR-0018, ADR-0019). apm 0.39.3
|
||||
@@ -49,6 +62,9 @@ operator chose to turn off all syncing.
|
||||
2. All synced `anthropic-skills:*` are lost, including `pdf`, `docx`, `xlsx` and
|
||||
`satisfactory-helper`. Claude Code moves the synced copies to `.trash`.
|
||||
3. New built-in commands, as opposed to bundled skills, are not covered.
|
||||
4. Each new built-in plugin skill needs its own `skillOverrides` entry.
|
||||
5. The `cc-plugin-easel` chart tool and the `cc-plugin-plugin-authoring` `scan_secrets` MCP server are
|
||||
lost.
|
||||
|
||||
## Evidence
|
||||
|
||||
@@ -57,6 +73,11 @@ operator chose to turn off all syncing.
|
||||
- **Documented, not tested:** that the custom `/ship` loads in an interactive session with
|
||||
`CLAUDE_CODE_DISABLE_SHIP=1`.
|
||||
- **From the docs only:** the `syncClaudeAiSkills` behaviour.
|
||||
- **Tested** in headless mode on Claude Code 2.1.337, from the `init` event of
|
||||
`claude -p … --output-format stream-json --verbose`: `skillOverrides` for `design`, `doctor` and
|
||||
`plugin-authoring`, and `enabledPlugins` for the two plugins. Confirmed after `scripts/install.sh`:
|
||||
the `init` event lists none of the three skills and only the four plugins kept on.
|
||||
- **From the setting's description in the binary only:** the `syncClaudeAiPlugins` behaviour.
|
||||
- Sources: code.claude.com/docs/en/settings-reference, `/skills` and `/ship-command-troubleshooting`.
|
||||
|
||||
Related: ADR-0018, ADR-0019; #266.
|
||||
Related: ADR-0018, ADR-0019; #266, #286.
|
||||
@@ -1,15 +1,23 @@
|
||||
{
|
||||
"disableBundledSkills": true,
|
||||
"enabledPlugins": {
|
||||
"cc-plugin-easel@builtin": false,
|
||||
"cc-plugin-plugin-authoring@builtin": false
|
||||
},
|
||||
"env": {
|
||||
"CLAUDE_CODE_DISABLE_SHIP": "1"
|
||||
},
|
||||
"skillOverrides": {
|
||||
"init": "off"
|
||||
"design": "off",
|
||||
"doctor": "off",
|
||||
"init": "off",
|
||||
"plugin-authoring": "off"
|
||||
},
|
||||
"statusLine": {
|
||||
"command": "bash ~/.claude/statusline-command.sh",
|
||||
"type": "command"
|
||||
},
|
||||
"syncClaudeAiPlugins": false,
|
||||
"syncClaudeAiSkills": false,
|
||||
"theme": "dark"
|
||||
}
|
||||
+13
-1
@@ -109,6 +109,9 @@ check_json() {
|
||||
check_json "$SETTINGS_SRC" \
|
||||
's["disableBundledSkills"] is True and s["syncClaudeAiSkills"] is False and s["env"]["CLAUDE_CODE_DISABLE_SHIP"] == "1" and s["skillOverrides"]["init"] == "off"' \
|
||||
"repo settings turn off bundled and synced skills"
|
||||
check_json "$SETTINGS_SRC" \
|
||||
'all(s["skillOverrides"][k] == "off" for k in ("design", "doctor", "plugin-authoring")) and s["enabledPlugins"]["cc-plugin-easel@builtin"] is False and s["enabledPlugins"]["cc-plugin-plugin-authoring@builtin"] is False and s["syncClaudeAiPlugins"] is False' \
|
||||
"repo settings turn off built-in plugin skills and synced plugins"
|
||||
|
||||
MERGE_HOME="$(new_home)"
|
||||
MERGED="$MERGE_HOME/.claude/settings.json"
|
||||
@@ -118,7 +121,8 @@ cat > "$MERGED" << 'EOF'
|
||||
"theme": "light",
|
||||
"permissions": {"allow": ["Bash(ls:*)"]},
|
||||
"env": {"MY_VAR": "kept", "CLAUDE_CODE_DISABLE_SHIP": "0"},
|
||||
"skillOverrides": {"other": "off", "init": "on"}
|
||||
"skillOverrides": {"other": "off", "init": "on"},
|
||||
"enabledPlugins": {"operator-plugin@x": true, "cc-plugin-easel@builtin": true}
|
||||
}
|
||||
EOF
|
||||
chmod 640 "$MERGED"
|
||||
@@ -132,6 +136,14 @@ check_json "$MERGED" 's["theme"] == "dark" and s["env"]["CLAUDE_CODE_DISABLE_SHI
|
||||
"the repo's value wins where both set one"
|
||||
check_json "$MERGED" 's["disableBundledSkills"] is True and s["syncClaudeAiSkills"] is False' \
|
||||
"settings only the repo has are added"
|
||||
check_json "$MERGED" 's["enabledPlugins"]["operator-plugin@x"] is True' \
|
||||
"the operator's own plugin entries are kept"
|
||||
check_json "$MERGED" 's["enabledPlugins"]["cc-plugin-easel@builtin"] is False and s["enabledPlugins"]["cc-plugin-plugin-authoring@builtin"] is False' \
|
||||
"the repo turns off built-in plugins the operator had enabled"
|
||||
check_json "$MERGED" 's["skillOverrides"]["other"] == "off" and all(s["skillOverrides"][k] == "off" for k in ("design", "doctor", "plugin-authoring"))' \
|
||||
"new skill overrides are added beside the operator's own"
|
||||
check_json "$MERGED" 's["syncClaudeAiPlugins"] is False' \
|
||||
"plugin sync is turned off in merged settings"
|
||||
|
||||
if [[ "$(find "$MERGED" -perm 640)" == "$MERGED" ]]; then
|
||||
pass "the existing file's permissions are kept"
|
||||
|
||||
Reference in new issue
Block a user