Agents see operator-side skills (update-config, fewer-permission-prompts, loop, schedule, …) in skill_listing — strip the marketplace mirror from agent env #882
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#882
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
When an agent boots, the SDK injects a system reminder listing every available skill. Code-lead's last session contained the full Anthropic-official marketplace catalog, including:
update-config— "configure the Claude Code harness via settings.json"fewer-permission-prompts— "add allowlist to project .claude/settings.json"keybindings-helploop,schedulepeon-ping-*,chrome-devtools-mcp:*,caveman:*None of these apply in container context:
update-configandfewer-permission-promptsmutate~/.claude/settings.jsonon the host, but the agent's permission policy comes fromallowedToolspassed to the SDK at boot — settings.json edits are no-ops mid-session. Worse, when the agent hits a real or perceived problem (see #881 / sdk-adapter Zod bug), it reaches for these skills as escape hatches and burns the dispatch.Root cause
~/.config/claude-hooks/agent-env/<agent>/settings.jsoncarries:At SDK boot the marketplace is cloned into
agent-env/<agent>/plugins/marketplaces/claude-plugins-official/and everySKILL.mdunder it gets enumerated into theskill_listingattachment regardless ofenabledPlugins(the install-list is consulted for plugin activation but the skill enumeration scans the marketplace tree).The 3 plugins we actually want enabled (
security-guidance,typescript-lsp,claude-md-management) are unrelated to those skills.Decision
No marketplace. Vendor the 3 plugins we use directly into the repo, seed them into agent env-dirs from there, and remove
extraKnownMarketplacesentirely. Cherry-picked or self-made plugins only — never a full upstream catalog.Acceptance criteria
Vendor the plugins
apps/server/src/infrastructure/agent-env-sync/plugin-fixtures/with three sub-folders, each containing the plugin's source tree copied verbatim from upstream:security-guidance/(fromclaude-plugins-official/plugins/security-guidance/)typescript-lsp/(fromclaude-plugins-official/plugins/typescript-lsp/)claude-md-management/(fromclaude-plugins-official/plugins/claude-md-management/)plugin-fixtures/SOURCES.mdfile (path → upstream repo + commit). Refresh policy: operator manually re-vendors when an upgrade is needed; no auto-update.plugin.json/plugin.yamlso the SDK identifies it as a valid plugin.Strip the marketplace from agent env
apps/server/src/infrastructure/agent-env-sync/render-for-instance.tsno longer writesextraKnownMarketplacesintoagent-env/<agent>/settings.json.agent-env/<agent>/plugins/cache/<plugin-name>/<version>/soinstalled_plugins.jsonresolves locally without any marketplace lookup.installed_plugins.jsonkeeps the same three entries (security-guidance,typescript-lsp,claude-md-management) but theirinstallPathpoints at the locally-seeded folder instead ofclaude-plugins-officialcache.agent-env/*/plugins/marketplaces/claude-plugins-official/directories are deleted on the next render (renderer's existing wipe-and-rebuild semantics handle this).Verification
update-config,fewer-permission-prompts,loop,schedule— these names must not appear in theskill_listingattachment.anthropics/claude-plugins-officialhappens at agent boot (verifiable by booting a container with no outbound DNS and confirming plugin activation still succeeds).Skill-body safety rail (companion change)
skills/*.md—implement.md,review.md,rebase.md,fix-ci.md,breakdown.md,address-review.md, plus thedesign-*siblings — append a short paragraph:Out of scope
canUseToolZod error that triggers the spiral in the first place — covered in #881.claude-plugins-official— explicitly rejected. We only ship plugins we have read end-to-end and decided we want.plugin-fixtures/tree.References
~/.config/claude-hooks/agent-env/code-lead/.apps/server/src/infrastructure/agent-env-sync/render-for-instance.ts.~/.config/claude-hooks/agent-env/code-lead/projects/-state-worktrees-boss-default-charles--claude-hooks--boss-2F671/9bacbc0f-12ad-428c-b06f-629ea0a6c211.jsonland 4 siblings.https://github.com/anthropics/claude-plugins-official.