Skip to content

Plugin

A plugin is a Git repository capable of sharing at once a bundle of components.

Plugins are usually bundled within marketplaces to be installed by agent runtimes, but they can also be installed directly through the Agent Package Manager or some agent runtimes (like goose).

Structure

A plugin is commonly (may change depending on the agent runtime) identified by a plugin.json file. Its place and content (with small variations) depend on the target agent runtime(s).

  • Format: Agent Plugins
  • Read by: Copilot, Cursor, Devin, Hermes
  • Environment variables:
    • PLUGIN_ROOT (plugin directory)
    • PLUGIN_DATA (plugin data directory)
repository/
├── plugin.json
├── skills/
│   └── skill-name/
│       └── SKILL.md
├── mcp.json
└── com.example.client/

The com.example.client directory is a client extension. It contains components in an agent-runtime-specific format (hooks, MCP servers, skills, etc.).

  • Copilot: com.github.copilot/

Limitations

LSP format

While LSPs can be defined in .lsp.json, a preferable way is to define them inline in plugin.json because its format varies between agent runtimes.

Hooks environment variables

In most cases, hooks call custom scripts (shell, powershell, bash, js, etc.) and use predefined environment variables to pinpoint those (e.g. PLUGIN_ROOT, CLAUDE_PLUGIN_ROOT, CLAUDE_PLUGIN_DATA, etc.).

However, with some agent runtimes (e.g. VSCode Chat), those variables are not correctly set on remote environments (e.g. WSL or SSH) when the host OS isn’t the same as the remote’s.

See microsoft/vscode#313201 and microsoft/vscode#326166 for more details.