--- topic: overview source_keys: - context7-websites-code-claude - context7-websites-github-en-copilot - claude-code-plugins-reference - copilot-comparing-cli-features --- ## What Plugin Components Are A plugin bundles multiple component types. Each has a distinct runtime role. Understanding which role a problem requires is the first decision. The two primary axes are: **Axis 1 — Who decides to invoke it?** | Claude reasons about invoking | Fires automatically / deterministically | |---|---| | Skills | Hooks | | Agents | Monitors (background watchers) | | MCP server tools (Claude picks when to call) | MCP server process (always running when plugin enabled) | **Axis 2 — What does it add?** | Adds instructions / workflow guidance | Adds callable capabilities | Delegates work | |---|---|---| | Skills | MCP servers (new tool verbs) | Agents (subagent sessions) | | Custom instructions | Hooks (side-effects, enforcement) | Subagents (parallel subtasks) | --- ## Component Roles ### Skills (`skills/`) Markdown instruction files. Claude reads them and reasons about whether and how to follow them. No background process. No automatic trigger. Claude loads a skill when it judges the task matches — or the user invokes via slash command. Skills are prompt guidance, not programs. They extend what Claude knows how to do. ### Agents (`agents/`) Specialized subagent sessions with their own system prompt, tool restrictions, model choice, and turn budget. Claude spawns them when it needs to delegate a task requiring extended reasoning or domain focus. They run in isolated context windows — they do not inherit the parent conversation. Agents extend what Claude can delegate to, not what it knows itself. ### MCP Servers (`.mcp.json`) External processes that expose callable tool functions via the Model Context Protocol. They start automatically when the plugin is enabled and run as background services. Claude calls their tools the same way it calls built-ins (Read, Bash, etc.) — but decides when to call them based on context. MCP servers extend the tool set Claude can call. ### Hooks (`hooks/hooks.json`) Shell commands or HTTP endpoints that fire deterministically at specific lifecycle events. No model reasoning involved — the hook runs every time its event fires, regardless of what Claude intends. Hooks can block tool calls, modify inputs/outputs, inject context, and enforce policies. Hooks enforce what happens automatically, outside of Claude's reasoning. ### `bin/` (plugin root) Executables placed here are added to the Bash tool's `PATH` for the duration of the session while the plugin is enabled. Claude — or any hook, skill script, or agent — can invoke them as bare commands without absolute paths. Scoped to all Bash calls session-wide. `bin/` is shared infrastructure for the plugin's other components. ### `scripts/` (inside a skill directory) Local support files for one skill. Not on PATH. Referenced by absolute path via `${CLAUDE_PLUGIN_ROOT}` in hook commands or skill content. Scoped to the single skill, not available to other components. ### Monitors (`monitors/monitors.json`) Background shell processes that run continuously and stream their stdout to Claude as notifications. Use for watching logs, polling external status, or reacting to filesystem changes in real time. ### `settings.json` (plugin root) Default settings applied when the plugin is enabled. Currently supports `agent` (activate a named agent as the main session thread) and `subagentStatusLine`. Project and user settings override plugin settings on collision. --- ## Cross-Provider Portability `SKILL.md` is portable — the same file works in Claude Code and Copilot CLI. All other component formats are provider-specific: | Component | Claude Code format | Copilot CLI format | |---|---|---| | Skills | `skills//SKILL.md` | `skills//SKILL.md` (identical) | | Agents | `.md` with YAML frontmatter | `.agent.md` with YAML frontmatter | | Hooks | `hooks/hooks.json` | `hooks.json` (same schema) | | MCP servers | `.mcp.json` | `.mcp.json` (same schema) | | Manifest | `.claude-plugin/plugin.json` | `plugin.json` at root |