Skip to content

fix(settings): let role sessions read installed plugin and skill files - #16

Open
matthewtsmith wants to merge 1 commit into
mainfrom
fix/read-plugin-references
Open

matthewtsmith wants to merge 1 commit into
mainfrom
fix/read-plugin-references

Conversation

@matthewtsmith

Copy link
Copy Markdown
Member

Summary

The base deny list carried Read(~/.claude/**). Installed plugins and skills live under ~/.claude/plugins/cache, ~/.claude/plugins/marketplaces and ~/.claude/skills, and a skill a session loads tells it to read its own references/*.md. Every such Read, and every head/cat of the same path, was denied, so a role session could load a plugin skill but not follow it. This blocks running AppTree connector repos (the /connector plugin) under the foreman.

  • Replaces the blanket rule with denies for what must stay unreadable: top-level *.json, *.jsonl, *.sh and dotfiles (credentials, settings, history), and projects, sessions, session-env, shell-snapshots, file-history, paste-cache, debug, jobs, backups, daemon, downloads, todos, state, telemetry, feedback, cache, plus plugins/*.json, plugins/data, plugins/store, plugins/synced.
  • Read(~/.claude/*) is not an alternative: it matches the plugins directory itself, and a denied directory denies its contents (checked with claude -p).
  • Edit/Write of ~/.claude/** stay denied.
  • New test pins that plugin and skill paths stay readable; the tool-scoped deny test now names the narrower rules.

Trade-off: a new top-level directory Claude Code adds under ~/.claude later is readable until it is added here. The settings tests already document that the deny list is not a sandbox.

Test plan

  • pnpm lint && pnpm typecheck && pnpm test (800 passed)
  • claude -p --permission-mode dontAsk --setting-sources user,project --settings <these denies>: plugin reference OK, skill file OK; keybindings.json, .credentials.json, a shell snapshot and plugins/installed_plugins.json DENIED

Side finding, not changed here: Claude Code warns that Write(~/.claude/**) and Write(~/.foreman/**) "are not matched by file permission checks — only Edit(path) rules are". The matching Edit rules are present, so nothing is open, but the Write rules are dead weight.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JrFSqoqP4wWM257QRuPs6z

The base deny list carried Read(~/.claude/**). Installed plugins and
skills live under ~/.claude/plugins/cache, ~/.claude/plugins/marketplaces
and ~/.claude/skills, and a skill a session loads tells it to read its own
references/*.md. Every such Read, and every head/cat of the same path,
was denied, so a role session could load a plugin skill but not follow it.

Replace the blanket rule with denies for what must stay unreadable: the
top-level json/jsonl/sh files and dotfiles (credentials, settings,
history), transcripts, sessions, session env, shell snapshots, file
history, paste cache, debug, jobs, backups, daemon, downloads, todos,
state, telemetry, feedback, cache, and plugins' json, data, store and
synced. Read(~/.claude/*) is not an option: it matches the plugins
directory itself, and a denied directory denies its contents.

Verified with claude -p under these settings: a plugin reference and a
skill file read OK; keybindings.json, .credentials.json, a shell snapshot
and plugins/installed_plugins.json are denied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrFSqoqP4wWM257QRuPs6z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant