## Why The existing kyberforge research covered skills vs agents (ADR-0010), Copilot track selection, and agent scope hierarchy — but had no documented basis for three practical decisions: when to use MCP servers vs skills vs agents, when hooks are the right tool vs skills, and when bin/ is appropriate vs scripts/ inside a skill directory. Without this, the plugin-author and agent-author skills have no research backing for those choices. ## Implementation Notes Sourced from official Claude Code plugin docs (code.claude.com), official GitHub Copilot CLI docs (docs.github.com), and the Copilot customization-cheat-sheet and comparing-cli-features pages — the latter containing the only official "putting it together" decision table across components. Context7 MCP was the primary retrieval mechanism; web reads deepened the hooks and bin/ content. Three files produced: - overview.md — mental model, component roles, cross-provider portability - decision-guide.md — explicit decision tables for all three gaps, including anti-patterns and Copilot surface support matrix - hooks.md — full lifecycle event reference, stdin/stdout schema, hookSpecificOutput per event, plugin scope restriction Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_0147vXtL5sP6vorDdqXGJJU9
4.1 KiB
topic, source_keys
| topic | source_keys | ||||
|---|---|---|---|---|---|
| overview |
|
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/<name>/SKILL.md |
skills/<name>/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 |