Complete guide to 2025 Claude Code plugin features: Agent Skills, Hooks, MCP integration, and repository-level configuration. PROACTIVELY activate for: (1) Agent Skills implementation, (2) Hook automation setup, (3) MCP server integration, (4) Team plugin distribution, (5) Advanced plugin architecture. Provides: Agent Skills patterns, hook event types, MCP configuration, repository setup, context optimization strategies. Ensures production-ready 2025 plugin capabilities.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Examples:
D:/repos/project/file.tsxD:\repos\project\file.tsxThis applies to:
NEVER create new documentation files unless explicitly requested by the user.
Comprehensive guide to cutting-edge Claude Code plugin capabilities introduced in 2025.
What are Agent Skills? Skills that Claude autonomously invokes based on task context, enabling dynamic knowledge loading and context-efficient workflows through progressive disclosure architecture.
skills/ directory upon plugin installationDirectory Structure:
plugin-root/
āāā skills/
āāā skill-name-1/
ā āāā SKILL.md
āāā skill-name-2/
āāā SKILL.md
āāā examples/
āāā resources/
SKILL.md Format:
---
name: skill-name
description: "Complete [domain] system. PROACTIVELY activate for: (1) [use cases]. Provides: [capabilities]."
license: MIT
---
# Skill Title
## Overview
High-level summary always loaded
## Core Concepts
Key information organized for quick scanning
## Examples
Concrete usage patterns
## Best Practices
Proven approaches and patterns
Evaluation-Driven Development:
Structural Scalability:
Iterative Refinement:
DO:
DON'T:
Agent Skills achieve unbounded capacity through:
Example Activation Pattern:
User task: "Deploy to production"
ā Claude scans skill metadata (frontmatter only)
ā Identifies deployment-workflows skill as relevant
ā Loads SKILL.md body to confirm match
ā Retrieves only needed sections/files
ā Unloads when task complete
Result: Effectively unlimited bundled content without context window constraints.
What are Hooks? Automatic triggers that execute actions at specific events during Claude Code's workflow.
Tool Lifecycle:
PreToolUse: Before any tool execution (validation, preparation)PostToolUse: After tool execution (testing, cleanup, notifications)Session Lifecycle:
SessionStart: When Claude Code session beginsSessionEnd: When session terminatesPreCompact: Before context compaction (cleanup, state save)User Interaction:
UserPromptSubmit: After user submits prompt (logging, preprocessing)Notification: When notifications are displayedStop: When user stops executionSubagentStop: When subagent terminatesInline in plugin.json:
{
"name": "my-plugin",
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/lint.sh"
}
]
}
]
}
}
Separate hooks.json:
{
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "./scripts/format.sh",
"env": {
"FILE_PATH": "${TOOL_INPUT_FILE_PATH}"
}
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "echo 'Session started at $(date)' >> session.log"
}
]
}
]
}
Tool Matchers: Match specific tools using regex patterns:
Write - File write operationsEdit - File edit operationsWrite|Edit - Either write or editBash - Shell command execution.* - Any tool (use sparingly)Matcher Best Practices:
| for multiple toolsAutomated Testing:
{
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/run-tests.sh",
"description": "Run tests after code changes"
}
]
}
]
}
Code Formatting:
{
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "prettier --write ${TOOL_INPUT_FILE_PATH}"
}
]
}
]
}
Session Logging:
{
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/log-session.sh"
}
]
}
]
}
Validation:
{
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate-bash.sh"
}
]
}
]
}
What is MCP? Model Context Protocol enables Claude to interact with external tools, APIs, and services through standardized server interfaces.
Inline in plugin.json (Recommended for Distribution):
{
"name": "my-plugin",
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@company/mcp-server"],
"env": {
"API_KEY": "${API_KEY}",
"SERVER_URL": "https://api.example.com"
}
},
"local-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/bin/server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
}
}
}
Separate .mcp.json:
{
"mcpServers": {
"database-server": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/mcp/db-server.js"],
"env": {
"DB_CONNECTION": "${DATABASE_URL}"
}
}
}
}
DO:
${CLAUDE_PLUGIN_ROOT} for plugin-relative pathsDON'T:
API Integration:
{
"mcpServers": {
"stripe-api": {
"command": "npx",
"args": ["-y", "@stripe/mcp-server"],
"env": {
"STRIPE_API_KEY": "${STRIPE_API_KEY}"
}
}
}
}
Database Access:
{
"mcpServers": {
"postgres": {
"command": "${CLAUDE_PLUGIN_ROOT}/bin/pg-server",
"args": ["--connection", "${DATABASE_URL}"]
}
}
}
Custom Tooling:
{
"mcpServers": {
"internal-tools": {
"command": "python",
"args": ["${CLAUDE_PLUGIN_ROOT}/mcp/tools_server.py"],
"env": {
"TOOLS_CONFIG": "${CLAUDE_PLUGIN_ROOT}/config/tools.json"
}
}
}
}
What is it? Automatic marketplace and plugin installation for team members when they trust a repository folder.
Create .claude/settings.json at repository root:
repo-root/
āāā .claude/
ā āāā settings.json
āāā src/
āāā README.md
{
"extraKnownMarketplaces": [
"company-org/internal-plugins",
"JosiahSiegel/claude-plugin-marketplace"
],
"plugins": {
"enabled": [
"deployment-helper@company-org",
"test-master@JosiahSiegel",
"code-review-helper"
]
}
}
Repository Maintainer:
.claude/settings.jsonTeam Member:
Updates:
Start Minimal:
{
"extraKnownMarketplaces": ["company/tools"],
"plugins": {
"enabled": ["essential-plugin@company"]
}
}
Document Requirements: Add to README:
## Claude Code Setup
This repository uses Claude Code plugins for standardized workflows.
### First Time Setup
1. Install Claude Code
2. Clone this repository
3. Open in Claude Code
4. Trust this repository folder when prompted
Plugins will be installed automatically.
Security Considerations:
${CLAUDE_PLUGIN_ROOT}: Resolves to plugin's absolute installation path.
Usage:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format.sh"
}
]
}
]
},
"mcpServers": {
"local-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/bin/server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
}
}
}
Why Use It:
In Hooks:
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/deploy.sh",
"env": {
"ENVIRONMENT": "${DEPLOY_ENV}",
"API_KEY": "${API_KEY}",
"CUSTOM_VAR": "value"
}
}
]
}
In MCP Servers:
{
"mcpServers": {
"api-server": {
"command": "npx",
"args": ["-y", "@company/mcp-server"],
"env": {
"API_URL": "${COMPANY_API_URL}",
"AUTH_TOKEN": "${COMPANY_AUTH_TOKEN}"
}
}
}
}
Best Practices:
deployment-automation/
āāā .claude-plugin/
ā āāā plugin.json
āāā commands/
ā āāā deploy-staging.md
ā āāā deploy-production.md
āāā agents/
ā āāā deployment-expert.md
āāā skills/
ā āāā deployment-workflows/
ā ā āāā SKILL.md
ā āāā kubernetes-patterns/
ā āāā SKILL.md
āāā hooks/
ā āāā hooks.json
āāā scripts/
ā āāā validate-deployment.sh
ā āāā run-tests.sh
āāā .claude/
ā āāā settings.json
āāā README.md
plugin.json:
{
"name": "deployment-automation",
"version": "2.0.0",
"description": "Complete deployment automation system. PROACTIVELY activate for: (1) ANY deployment task, (2) Production releases, (3) Rollback operations, (4) Deployment validation, (5) Kubernetes workflows. Provides: automated deployment, rollback safety, validation hooks, multi-environment support. Ensures safe, reliable deployments.",
"author": {
"name": "Your Company",
"email": "[email protected]"
},
"keywords": ["deployment", "kubernetes", "production", "automation", "cicd"],
"license": "MIT",
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate-deployment.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/run-tests.sh"
}
]
}
]
},
"mcpServers": {
"kubernetes": {
"command": "kubectl",
"args": ["proxy"],
"env": {
"KUBECONFIG": "${KUBECONFIG}"
}
}
}
}
hooks/hooks.json:
{
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "echo 'Deployment session started' >> deployment.log"
}
]
}
]
}
.claude/settings.json:
{
"extraKnownMarketplaces": ["company/internal-tools"],
"plugins": {
"enabled": ["deployment-automation@company"]
}
}
1. Component Discovery:
2. Skills ā Agent Skills:
3. Hooks:
4. MCP Integration:
5. Repository Configuration:
claude --debug
Shows:
Agent Skills not loading:
Hooks not executing:
MCP server not starting:
Repository settings not applying:
2025 plugin features enable:
Apply these patterns to create production-ready, scalable plugins that leverage the full power of Claude Code's 2025 capabilities.