ClaudeDetails
UpdatesGuidesModelsMCPToolsLearning PathsFAQ
UpdatesGuidesModelsMCPToolsLearning PathsFAQ

On this page

What plugins are forStep 1: Create the plugin directoryStep 2: Create the plugin manifestStep 3: Add a skillStep 4: Test the plugin locallyStep 5: Add skill argumentsBeyond local testingFAQ
Home/Guides/Claude Code
Claude CodeBEGINNER

How to Create Your First Claude Code Plugin: Manifest, Skills, and Local Testing

Needs reviewLast verified August 12, 2026·4 min read

This guide explains how to create a custom Claude Code plugin from scratch. It covers when to use a plugin versus standalone configuration in the .claude directory, how to structure a plugin directory with a .claude-plugin/plugin.json manifest, how to add a skill using a SKILL.md file, how to test the plugin locally with the --plugin-dir flag, and how to make skills accept user input with the $ARGUMENTS placeholder. It is based on Anthropic's documentation for Claude Code plugins.

What plugins are for

Plugins let you extend Claude Code with custom functionality that can be shared across projects and teams. A plugin can bundle skills, agents, hooks, and MCP servers into a self-contained directory that others can install.

According to the documentation, there are two ways to add custom skills, agents, and hooks:

  • Standalone (.claude/ directory): skill names look like /hello. Best for personal workflows, project-specific customizations, and quick experiments.
  • Plugins (self-contained directories with skills, agents, hooks, or a .claude-plugin/plugin.json manifest): skill names look like /plugin-name:hello. Best for sharing with teammates, distributing to the community, versioned releases, and reuse across projects.

The docs suggest starting with standalone configuration in .claude/ for quick iteration, then converting to a plugin when you're ready to share.

Step 1: Create the plugin directory

Every plugin lives in its own directory containing your skills, agents, or hooks, optionally alongside a .claude-plugin/plugin.json manifest. The location doesn't matter for local testing because you'll point Claude Code at the directory with --plugin-dir:

bash
mkdir my-first-plugin

The remaining steps run from the parent directory and reference paths like my-first-plugin/... relative to it.

Step 2: Create the plugin manifest

The manifest file at .claude-plugin/plugin.json defines your plugin's identity: its name, description, and version. Claude Code uses this metadata to display your plugin in the plugin manager.

bash
mkdir my-first-plugin/.claude-plugin

Then create my-first-plugin/.claude-plugin/plugin.json with this content:

json
{
  "name": "my-first-plugin",
  "description": "A greeting plugin to learn the basics",
  "version": "1.0.0",
  "author": {
    "name": "Your Name"
  }
}

What each field does:

  • name: unique identifier and skill namespace. Skills are prefixed with this (e.g., /my-first-plugin:hello).
  • description: shown in the plugin manager when browsing or installing plugins.
  • version: optional. If set, users only receive updates when you bump this field.
  • author: optional, helpful for attribution.

Additional fields like homepage, repository, and license are covered in the plugins reference documentation.

Step 3: Add a skill

Skills live in the skills/ directory. Each skill is a folder containing a SKILL.md file. The folder name becomes the skill name, prefixed with the plugin's namespace — a hello/ folder in a plugin named my-first-plugin creates /my-first-plugin:hello.

bash
mkdir -p my-first-plugin/skills/hello

Then create my-first-plugin/skills/hello/SKILL.md with this content:

markdown
---
description: Greet the user with a friendly message
disable-model-invocation: true
---

Greet the user warmly and ask how you can help them today.

Step 4: Test the plugin locally

Run Claude Code with the --plugin-dir flag to load your plugin:

bash
claude --plugin-dir ./my-first-plugin

Once Claude Code starts, try the skill:

shell
/my-first-plugin:hello

Claude responds with a greeting. You can also run /help and open the Custom commands tab to see your skill listed under the plugin namespace.

Plugin skills are always namespaced (like /my-first-plugin:hello) to prevent conflicts when multiple plugins have skills with the same name. To change the namespace prefix, update the name field in plugin.json.

Step 5: Add skill arguments

You can make a skill dynamic by accepting user input. The $ARGUMENTS placeholder captures any text the user provides after the skill name. Update SKILL.md:

markdown
---
description: Greet the user with a personalized message
---

# Hello Skill

Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.

Run /reload-plugins to pick up the changes. Note a quirk called out in the docs: the skills count in the reload summary covers only commands/ directories, so it can report 0 skills even though the skill you just edited reloaded. Then try it with a name:

shell
/my-first-plugin:hello Alex

Claude will greet you by name.

Beyond local testing

The --plugin-dir flag is intended for development and testing. When you're ready to share a plugin with others, the documentation points to creating and distributing a plugin marketplace. The docs also mention that instead of passing --plugin-dir on every launch, you can keep a plugin in your skills directory and have Claude Code load it automatically, with claude plugin init available to scaffold one.


claudedetails.com is an independent publication and is not affiliated with, endorsed by, or sponsored by Anthropic. "Claude" is a trademark of Anthropic, PBC, used here for identification purposes only. Product details can change — always confirm specifics on Anthropic's own site before making decisions based on this post.

FAQ

What's the difference between a plugin and putting skills in the .claude directory?

Standalone configuration in the .claude/ directory gives you skill names like /hello and is best for personal workflows, project-specific customizations, and quick experiments. Plugins are self-contained directories (optionally with a .claude-plugin/plugin.json manifest) that namespace skills like /plugin-name:hello, and are better for sharing with teammates, distributing to the community, versioned releases, and reuse across projects.

How do I test a Claude Code plugin locally before publishing it?

Run Claude Code with the --plugin-dir flag pointing at your plugin directory, for example: claude --plugin-dir ./my-first-plugin. Then invoke the skill with its namespaced name, like /my-first-plugin:hello. You can also run /help and check the Custom commands tab to see the skill listed.

Why are plugin skill names prefixed like /my-plugin:hello?

Plugin skills are always namespaced to prevent conflicts when multiple plugins have skills with the same name. The prefix comes from the name field in plugin.json, so you can change the namespace by updating that field.

Why does /reload-plugins report 0 skills after I edit a skill?

The skills count in the reload summary only covers commands/ directories, so it can report 0 skills even though the skill you edited actually reloaded. Your updated skill will still work when you invoke it.

More in Claude Code

Claude CodeBEGINNER
Aug 12, 2026

Common Claude Code Workflows: Exploring Code, Fixing Bugs, Testing, and PRs

This guide walks through the everyday prompt patterns Anthropic documents for Claude Code: getting an overview of an unfamiliar codebase, locating relevant files, fixing bugs from error messages, refactoring legacy code safely, adding tests for uncovered code, creating pull requests, and generating documentation. It also notes related workflows the docs cover, such as resuming sessions, running parallel sessions with worktrees, planning before edits, delegating research to subagents, and piping Claude into scripts.

Read guide →
Claude CodeINTERMEDIATE
Aug 11, 2026

Using Claude Code on a React Project: CLAUDE.md, Permissions, and Workflow Tips

Claude Code has no React-specific mode — what actually makes it effective on a React codebase is the same CLAUDE.md and permissions setup that works on any project, applied deliberately. This guide walks through what to put in CLAUDE.md for a React app, which commands to allow, and how to structure a component or test-fixing session.

Read guide →
Claude CodeINTERMEDIATE
Aug 10, 2026

Connecting Claude Code to External Tools with MCP: Servers, Transports, and Configuration

This guide explains how to connect Claude Code to external tools and data sources using the Model Context Protocol (MCP). It covers what MCP connections enable, such as working with issue trackers, databases, and monitoring tools; where to find reviewed connectors; how to scaffold your own server with the official mcp-server-dev plugin; and how to install remote HTTP, remote SSE, and local stdio servers, including transport-specific flags, JSON configuration pitfalls, and environment variables like CLAUDE_PROJECT_DIR.

Read guide →
ClaudeDetails
UpdatesGuidesModelsMCPToolsLearning PathsFAQRSS
Get new guides and Claude updates by email

Occasional, no spam. Unsubscribe anytime.

claudedetails.com is an independent publication and is not affiliated with, endorsed by, or sponsored by Anthropic. "Claude" is a trademark of Anthropic, PBC, used here for identification purposes only. Product details can change — always confirm specifics on Anthropic's own site before making decisions based on this post.