|
Download plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md
- Command line
-
hf download hf://SaylorTwift/claude-code/plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md
-
curl -L -o minimal-plugin.md https://huggingface.co/SaylorTwift/claude-code/resolve/main/plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md
1.73 kB
Minimal Plugin Example
A bare-bones plugin with a single command.
Directory Structure
hello-world/
βββ .claude-plugin/
β βββ plugin.json
βββ commands/
βββ hello.md
File Contents
.claude-plugin/plugin.json
{
"name": "hello-world"
}
commands/hello.md
---
name: hello
description: Prints a friendly greeting message
---
# Hello Command
Print a friendly greeting to the user.
## Implementation
Output the following message to the user:
> Hello! This is a simple command from the hello-world plugin.
>
> Use this as a starting point for building more complex plugins.
Include the current timestamp in the greeting to show the command executed successfully.
Usage
After installing the plugin:
$ claude
> /hello
Hello! This is a simple command from the hello-world plugin.
Use this as a starting point for building more complex plugins.
Executed at: 2025-01-15 14:30:22 UTC
Key Points
- Minimal manifest: Only the required
namefield - Single command: One markdown file in
commands/directory - Auto-discovery: Claude Code finds the command automatically
- No dependencies: No scripts, hooks, or external resources
When to Use This Pattern
- Quick prototypes
- Single-purpose utilities
- Learning plugin development
- Internal team tools with one specific function
Extending This Plugin
To add more functionality:
- Add commands: Create more
.mdfiles incommands/ - Add metadata: Update
plugin.jsonwith version, description, author - Add agents: Create
agents/directory with agent definitions - Add hooks: Create
hooks/hooks.jsonfor event handling