Files
magpie/docs
yetone bbac3b5a60 library: Claude Code's own plugins list their skills, hooks and subagents (#7266)
A plugin installed with `claude plugin install` showed nowhere in the
Library's Skills, Hooks or Subagents, and a project's whole-plugin choice
(Library > Projects, Claude Code plugins) named it with nothing of what it
brings (jinpwng, v0.1.4572). ReadNative had readers for Codex and Pi only.

- claudeNative reads Claude Code's installed_plugins.json (v2): every
  record whose installPath is there, user scope as the user's, project and
  local scope with their projectPath. Enabled comes from enabledPlugins in
  the scope's own settings (settings.json, the project's
  .claude/settings.json or settings.local.json); unknown stays unknown.
- Parts come from the plugin's .claude-plugin/plugin.json and Claude's
  default places (skills/, hooks/hooks.json, .mcp.json, agents/*.md), the
  manifest's own paths added; subagents are a new part kind, read with
  the library's subagent reader, a .md with no front matter skipped.
- The GUI lists them read-only on Skills, MCP, Hooks and Subagents with
  plugin id and scope (the project's folder for a project one), and a
  project card's Claude Code plugin row says what the plugin brings.
  magpie writes nothing: Claude Code keeps loading them.
- `magpie library native` names Claude Code too.

Run (mote): go test ./internal/library -run TestNative -count=1: ok.
node --test on 115 GUI files (every library-* and project-* file, plus
builtins, nav, sidebar, phone-no-sideways, i18n-keys and the other files
that reach these tabs), chromium and webkit: 2330 tests, 2320 ok, 10 red. library-open-again is red the same way alone on origin/main 7dc85f26e (#6751); project-pi, library-bili and billion-context were red only under the full run at load ~24 and pass alone.
Real Claude Code 2.1.327 in a sandbox HOME/CLAUDE_CONFIG_DIR: marketplace
add, plugin install at user and at project scope, plugin validate ok;
ReadNative on that record listed both, with their skill, hook and
subagent. Before this change the same record listed nothing for Claude.
Broken by hand: with claudeNative out of ReadNative,
TestNativeClaudePlugins is red; with nativeSection("subagent") and the
parts line out of client.js, library-native and project-claude-plugins
are red (28 fail).
Not tried: the reporter's own plugin.
2026-11-20 12:06:44 +08:00
..