Lesson 10: Customization & Extensions
- Understanding the Extension Hierarchy: Skills, Plugins, and MCP—what each does and when to use it
- Creating Skills: Building user-invocable commands for your workflow
- Installing and using Plugins from the registry
- Connecting MCP Servers to integrate external tools and data sources
- Building your first custom skill step-by-step
You've learned Claude Code fundamentals and worked with autonomous agents. Now it's time to make Claude Code truly yours. The platform offers three extension mechanisms, each serving different needs: Skills for personal commands, Plugins for shareable packages, and MCP for external integrations. Understanding when to use each unlocks a personalized development environment that fits your exact workflow.
The Extension Hierarchy
Claude Code offers three ways to extend functionality, arranged by scope and complexity.
Skills are the simplest option—user-invocable commands like /commit, /review-pr, or /analyze-deps. You create them with simple markdown files that live in your local .claude/skills/ directory. They're personal tools, not designed for sharing (though you could manually copy them).
Plugins take it further. These are packaged extensions distributed via npm, installed from the Claude plugin registry. A single plugin can bundle multiple skills, tools, hooks, and resources. They're perfect for teams and community sharing.
MCP Servers are the most powerful option. These are external processes that provide tools and resources using the Model Context Protocol. They work across all Claude apps—not just Claude Code—and connect to databases, APIs, filesystems, and documentation services.
Each extension type solves a different problem. Skills handle personal automation. Plugins enable team standardization. MCP servers connect Claude to the broader world of external systems. You'll often use all three together.
Choosing the Right Extension Type
Start with Skills if you want a personal command for your workflow, the functionality is simple (under 50 lines), you don't need to share it, or you're doing something like "analyze package.json for outdated dependencies."
Use Plugins if you want to package and share functionality, multiple people or projects would benefit, you need version control and distribution, or you're building something like "a tool that adds /generate-api-client for your company's API patterns."
Choose MCP if you need to connect to external systems (databases, APIs, services), the tool should work across multiple Claude apps, you're integrating existing tools or protocols, or you're doing something like "connect Claude to your PostgreSQL database for schema queries."
Skills: Personal Commands
Skills are user-invocable commands. When you type /skill-name, Claude reads the skill definition and follows its instructions.
The process is straightforward: create a directory in .claude/skills/my-skill/, add a SKILL.md file with instructions, then type /my-skill to invoke it. Claude reads the skill file and executes the instructions you've defined.
Here's a practical example—a skill that analyzes dependencies:
# Dependency Analyzer Skill
When invoked, analyze the project's package.json for:
1. Outdated dependencies (compare to latest versions)
2. Security vulnerabilities (known CVEs)
3. Bundle size impact (identify large deps)
4. Unused dependencies (cross-reference with imports)
## Steps
1. Read package.json
2. For each dependency, check npm for latest version
3. Search for known security issues
4. Analyze import usage in src/
5. Report findings in a table:
| Package | Current | Latest | Status | Size | Used |
|---------|---------|--------|--------|------|------|
## Output Format
Provide actionable recommendations:
- "Update X from 1.0 to 2.0 (breaking changes: ...)"
- "Remove Y - not imported anywhere"
- "Security: Z has CVE-2024-1234, upgrade urgently"
Once created, you invoke it simply: type /analyze-deps and Claude reads the skill, follows the instructions, and produces your dependency report.
Be specific with your instructions. Instead of "analyze dependencies," write "Read package.json, then for each dependency, check npm for the latest version, then search for known security issues..." Include output format examples and error handling guidance like "If package.json not found, suggest creating one."
Built-in Skills
Claude Code comes with several built-in skills you can use immediately. The /commit skill creates git commits with well-formatted messages. The /review-pr [number] skill reviews GitHub pull requests. The /docs skill generates documentation from code. The /design skill generates polished UI components.
These built-in skills demonstrate what's possible. You can create similar ones tailored to your exact workflow—whether that's deployment checklists, code quality analysis, or custom testing commands.
Plugins: Shareable Extensions
Plugins are packaged extensions distributed via npm. They're more structured than skills and designed for sharing across teams and projects.
A typical plugin structure includes a package.json file, a plugin.json manifest, a skills/ directory for bundled skills, a tools/ directory for custom tools, and a hooks/ directory for event hooks.
Installing a plugin is straightforward:
claude plugin install @company/api-generator
This adds the plugin to your Claude Code environment. All skills and tools in the plugin become immediately available.
Popular plugins include @anthropic/frontend-design for generating production-quality UI components, company-specific plugins like @company/api-patterns for custom API scaffolding, and specialized tools like @testing/snapshot for advanced testing workflows.
Creating your own plugin requires two key files. First, the plugin manifest:
{
"name": "@mycompany/api-generator",
"version": "1.0.0",
"description": "Generate API clients from OpenAPI specs",
"skills": [
{
"name": "generate-api-client",
"path": "./skills/generate-client/SKILL.md"
}
],
"tools": [],
"hooks": []
}
Second, the package.json:
{
"name": "@mycompany/api-generator",
"version": "1.0.0",
"main": "plugin.json",
"keywords": ["claude-plugin", "api", "generator"]
}
Publish to npm, and anyone can install with claude plugin install @mycompany/api-generator.
Use Skills when it's personal to your workflow, you don't need version control, a simple markdown file is enough, and you won't share beyond manual copying. Use Plugins when multiple people or projects need it, you want versioning and updates, it bundles multiple skills or tools, and you're distributing via npm or the registry.
MCP Servers: External Integrations
MCP (Model Context Protocol) is an open standard that lets Claude connect to external tools and data sources. MCP servers run as separate processes and provide tools and resources Claude can use during conversations.
The power of MCP becomes clear when you consider the alternative. Without it, you copy-paste documentation or API responses. You run database queries manually and share results. You fetch data from external services and feed it to Claude piece by piece. With MCP, Claude does all of this directly.
Common MCP servers include Context7 for library documentation, GitHub for repository access, Filesystem for file access outside the project, PostgreSQL for database queries, Sentry for error tracking, and Slack for team communication.
Here's a concrete example. Without Context7, you might ask "How do I use React 19's new use() hook?" and Claude responds based on training data that might be outdated or incorrect. With Context7, you ask the same question and specify "Check the latest docs." Claude queries the Context7 MCP server, which fetches current React documentation, and Claude provides an accurate, up-to-date answer with code examples.
MCP servers are configured in your Claude settings file:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp-server"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/mydb"
}
}
}
}
Once configured, Claude uses these servers automatically. Ask "What's the schema for the users table?" and Claude uses the PostgreSQL MCP server to query the schema. Ask "Show me the latest error from production" and Claude uses the Sentry MCP server to fetch error details.
Never hardcode credentials in your settings file. Use environment variables or secure credential management systems. MCP servers often need access to sensitive systems—treat their configuration with the same care you'd give production credentials.
How They Work Together
The three extension mechanisms complement each other beautifully. Consider an API development workflow.
First, you need current documentation. You ask "Check the FastAPI docs for the new dependency injection syntax." The Context7 MCP server fetches the latest documentation and Claude provides current syntax examples.
Next, you need to scaffold an API client. You type /generate-api-client and the company plugin generates code following your organization's patterns—error handling conventions, authentication setup, logging standards.
Finally, you validate the result. You type /validate-api-spec and your custom skill runs checks for org-specific API conventions—ensuring endpoint naming follows standards, checking for required headers, validating response schemas.
Each extension type handles what it's best at: MCP for external data, Plugins for shared team patterns, Skills for personal workflows.
Exercise 10: Create a Type Checking Skill
You'll build a practical skill that runs TypeScript type checking and formats the output in a developer-friendly way.
1. Create the Skill Directory
First, create the directory structure for your new skill:
mkdir -p ~/.claude/skills/check-types
2. Write the Skill Definition
Create the skill definition file with clear instructions:
# TypeScript Type Checker Skill
When invoked, run TypeScript type checking and report errors in a developer-friendly format.
## Steps
1. Run `npm run type-check` (or `tsc --noEmit` if no script exists)
2. Parse the output for errors
3. Group errors by file
4. For each error, show:
- File path (clickable)
- Line number
- Error message
- Suggested fix (if obvious)
## Output Format
Type Checking Results
✓ No errors found!
OR
❌ Found 3 errors:
src/components/Button.tsx:15 Error: Type 'string' is not assignable to type 'number' Fix: Change prop type to accept string | number
src/utils/api.ts:42 Error: Property 'id' does not exist on type 'User' Fix: Add 'id' to User interface
## Error Handling
- If TypeScript is not installed: "TypeScript not found. Run `npm install -D typescript`"
- If tsconfig.json missing: "No tsconfig.json found. Run `npx tsc --init`"
3. Test Your Skill
Navigate to a TypeScript project and invoke your new skill:
You: /check-types
Claude will read your skill definition, execute the type checking process, and format the output according to your specifications. You now have a reusable command that works across all your TypeScript projects.
4. Refine and Expand
Try enhancing the skill with additional features:
- Add support for watching mode (
--watchflag) - Include suggestions for common error fixes
- Integrate with your editor's quickfix list
- Add filtering options to show only errors in specific directories
Run the skill again after making changes. You should see the improved formatting and functionality. The skill is now part of your personal Claude Code toolkit.
Summary
Claude Code offers three extension mechanisms that work together to create a personalized development environment. Skills provide personal commands through simple markdown files—perfect for automating repetitive tasks in your workflow. Plugins package and distribute extensions via npm, enabling team standardization and community sharing. MCP servers connect Claude to external systems using an open protocol, working across all Claude applications.
The key is choosing the right tool for each need. Start with skills for personal automation, create plugins when multiple people benefit from the same patterns, and use MCP servers to integrate external data sources and tools. These mechanisms complement each other—in a typical workflow, you might use an MCP server to fetch documentation, a plugin to apply team patterns, and a skill to run custom validation.
You've now built your first skill and understand how to extend Claude Code for your specific needs. The exercises you create today become reusable tools tomorrow, gradually building a development environment that fits your exact workflow.
Next: In Lesson 11, you'll learn production workflows—monitoring usage, managing costs, setting up team conventions, and deploying Claude Code across your organization.