Guide

Package a Skill as a Plugin

Turn a working local skill into a shareable Claude Code plugin with manifest, versioning, and marketplace support.

~9 min read

You built a skill that solves a real bottleneck in your repository. It triggers consistently, follows your team's guidelines, and saves thirty minutes of manual work every morning. But when a teammate on another project asks for it, how do you share it? If your answer is "copy the folder from my .claude/skills directory into yours," you have hit the limits of local skills.

Copying folders by hand creates maintenance debt. The moment you patch a bug or improve a prompt description, your teammate's copy is instantly out of date. This is why Claude Code introduces plugins: a versioned, distributable packaging standard that lets you bundle skills, subagents, lifecycle hooks, and MCP servers into an installable package.

Why move from a standalone skill to a plugin

A local skill is a single folder. A plugin is a cohesive system. Consider packaging your skills into a plugin when:

  • You have multiple related skills that belong together (for example, a database migration suite containing creation, testing, and rollback skills).
  • Your workflow needs custom subagents or hooks to enforce pre-commit rules alongside the skill prompt.
  • You want to distribute capabilities across multiple repositories without manually syncing git commits.
  • You need version pinning so production teams can upgrade deliberately rather than having changes applied silently.

The plugin directory layout

A Claude Code plugin requires a structured layout. At the root of the repository sits the `.claude-plugin/` directory containing the required `plugin.json` manifest. Skills, agents, and hooks live in dedicated subdirectories.

File: dev-ops-toolkit/
File: .claude-plugin/
File: plugin.json # Required manifest and metadata
File: skills/
File: deploy-staging/
File: SKILL.md # First bundled skill
File: rollback-service/
File: SKILL.md # Second bundled skill
File: agents/
File: deploy-monitor.md # Custom subagent definition
File: hooks/
File: hooks.json # Pre/post tool execution hooks
File: README.md # Installation and usage instructions
Directory architecture of a production-ready Claude Code plugin.

Writing the plugin manifest: plugin.json

The manifest file at `.claude-plugin/plugin.json` tells Claude Code how to register your plugin and what capabilities it contains.

{
  "name": "dev-ops-toolkit",
  "version": "1.0.0",
  "description": "Automated deployment, health verification, and rollback workflows for microservices.",
  "author": {
    "name": "Platform Engineering",
    "email": "ops@example.com"
  },
  "homepage": "https://github.com/example/dev-ops-toolkit",
  "license": "MIT"
}

Use lowercase kebab-case for the plugin name. When Claude Code installs a plugin, all bundled skills are namespaced with the plugin name (`dev-ops-toolkit:deploy-staging`). This namespaces your skills automatically so they never collide with local project skills.

Testing your plugin from a local marketplace

You do not need to publish to a public registry to test a plugin. You can register any local folder on your disk as a private marketplace.

You type: /plugin marketplace add ./my-plugins
Output: Added local marketplace "my-plugins" (path: ./my-plugins)
You type: /plugin install dev-ops-toolkit@my-plugins
Output: Installed plugin "dev-ops-toolkit" version 1.0.0
Output: Active skills registered:
Output: - dev-ops-toolkit:deploy-staging
Output: - dev-ops-toolkit:rollback-service
Note: The skills are immediately accessible using their namespaced slash commands.
Register a local directory as a marketplace and install your plugin.

Choosing the right installation scope

When you install a plugin, Claude Code allows you to specify its scope:

  • project: Saved to `.claude/settings.json`. Team members who clone the repo automatically get the plugin enabled.
  • user: Saved to `~/.claude/settings.json`. Available across all projects on your local machine.
  • local: Saved to `.claude/settings.local.json`. Active only in your current workspace and kept out of version control.

Reloading plugins during active development

When you edit a skill or agent inside a plugin, you do not need to restart your terminal session. Type `/reload-plugins` to clear cached manifests and reload all definitions from disk.

You type: /reload-plugins
Output: Flushing plugin cache...
Output: Reloaded 1 plugin (dev-ops-toolkit v1.0.0). All skill manifests re-indexed.
You type: /dev-ops-toolkit:deploy-staging
Output: Starting deployment pre-check workflow...
Reload plugins to apply prompt or code edits.
Stay updated

Get new guides in your inbox

One task, one guide, done fast. Practical Claude Code skills, zero noise.