Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Directory structure and conventions for building Claude Code plugins (from the official Anthropic claude-code repo).
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
examples/minimal-plugin.md
1# Minimal Plugin Example23A bare-bones plugin with a single command.45## Directory Structure67```8hello-world/9├── .claude-plugin/10│ └── plugin.json11└── commands/12└── hello.md13```1415## File Contents1617### .claude-plugin/plugin.json1819```json20{21"name": "hello-world"22}23```2425### commands/hello.md2627```markdown28---29name: hello30description: Prints a friendly greeting message31---3233# Hello Command3435Print a friendly greeting to the user.3637## Implementation3839Output the following message to the user:4041> Hello! This is a simple command from the hello-world plugin.42>43> Use this as a starting point for building more complex plugins.4445Include the current timestamp in the greeting to show the command executed successfully.46```4748## Usage4950After installing the plugin:5152```53$ claude54> /hello55Hello! This is a simple command from the hello-world plugin.5657Use this as a starting point for building more complex plugins.5859Executed at: 2025-01-15 14:30:22 UTC60```6162## Key Points63641. **Minimal manifest**: Only the required `name` field652. **Single command**: One markdown file in `commands/` directory663. **Auto-discovery**: Claude Code finds the command automatically674. **No dependencies**: No scripts, hooks, or external resources6869## When to Use This Pattern7071- Quick prototypes72- Single-purpose utilities73- Learning plugin development74- Internal team tools with one specific function7576## Extending This Plugin7778To add more functionality:79801. **Add commands**: Create more `.md` files in `commands/`812. **Add metadata**: Update `plugin.json` with version, description, author823. **Add agents**: Create `agents/` directory with agent definitions834. **Add hooks**: Create `hooks/hooks.json` for event handling84