Claude Code24 March 2026· 7 min read

Claude Code Plugins: What They Are and How to Use Them

Guide covering Claude Code plugin structure, commands, hooks, and how to build or install plugins that extend Claude Code with domain-specific capabilities.

Claude Code plugins extend the base Claude Code experience with domain-specific tools, slash commands, and hooks. A plugin can add new slash commands for your workflow, configure MCP servers, define reusable prompt templates, or run lifecycle hooks on specific events. For the CCA-F exam, plugins fall within Domain 3 (Claude Code Configuration & Workflows).

Plugin Structure

Every plugin is a directory with a plugin.json manifest at its root:

{
  "name": "my-plugin",
  "version": "1.0.0",
  "description": "What this plugin does",
  "commands": [...],
  "hooks": [...],
  "mcpServers": {...}
}

The manifest declares everything the plugin contributes. Claude Code reads it at startup and registers the plugin's capabilities into the active session.

Slash Commands

Commands are the most visible part of a plugin. Each command defines a trigger (the /command-name), a description (shown in the UI), and either a prompt template or a script to execute.

Command prompts can include variables like {{selection}} (currently selected text) or {{file}} (current file path). This makes them context-aware without requiring the user to copy-paste context manually.

Hooks

Hooks let plugins react to lifecycle events in the Claude Code session. Available hook points include:

  • PreToolUse — runs before any tool call. Useful for logging or pre-validation.
  • PostToolUse — runs after a tool call completes. Useful for side effects like updating dashboards.
  • Stop — runs when Claude produces a final response. Useful for formatting output or triggering downstream workflows.

Hooks are shell scripts or Node.js scripts. They receive the event payload via stdin as JSON and can write to stdout to inject content back into the session.

Bundled MCP Servers

Plugins can bundle MCP server configurations, automatically making those servers available when the plugin is active. This is how you distribute a tool server alongside its plugin UI — the consumer installs one plugin and gets both the slash commands and the underlying tooling.

Installing Plugins

Plugins can be installed from local directories (useful during development), from the Claude Code marketplace, or from a GitHub URL. Once installed, they appear in the plugin list and are activated automatically for all sessions in the configured scope (user-level or project-level).

Prepare for the CCA-F Exam

Test your knowledge with 160 practice questions

5 full-length timed mock exams, weighted domain scoring, and detailed explanations for every answer.

Get Lifetime Access — $19