Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 1.93 KB

plugins.md

File metadata and controls

10 lines (8 loc) · 1.93 KB

Claude plugins

Loads installed marketplace plugins. Source: extensions/internal/plugins.ts.

  • Reads the plugin cache at ~/.claude/plugins/cache, active per enabledPlugins in user settings only (the user file and the --settings flag; a --setting-sources list without user drops the user file's entries): a checked-out repo cannot flip which code-bearing plugins run, so project settings never toggle them. The version that loads is the one ~/.claude/plugins/installed_plugins.json records (a user-scope install first); with no usable record, the newest version directory not marked .orphaned_at. Cache directories can be named by commit sha, so the name alone does not say which is newest.
  • Contributes commands as /plugin:name, agents, hooks, MCP servers (tools aliased mcp__plugin_<plugin>_<server>__<tool>), and output styles.
  • Enablement follows Claude's precedence: a managed-settings enabledPlugins entry force-enables or blocks, then the user's enabledPlugins setting, then the manifest's defaultEnabled (default true: an installed plugin with no entry runs).
  • Substitutes ${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PLUGIN_DATA}, and ${user_config.KEY} (from pluginConfigs[id].options in user settings or the --settings flag). A shell-form hook command and an MCP headersHelper reject ${user_config.KEY}, as Claude does: a hook carrying one is dropped, and a server whose helper carries one is skipped. A plugin command body substitutes it like the rest of its content, ! spans included.
  • Skill directories contribute too, though pi's loader names them without the plugin prefix.
  • Skills: the plugin's skills/ directory is always scanned, and any directory the manifest's skills names is loaded alongside it rather than replacing it. Claude's single-skill layout (SKILL.md at the plugin root) is not supported: pi's loader owns the directory layout and looks for <dir>/<name>/SKILL.md.