1.0 KiB
1.0 KiB
description, argument-hint
| description | argument-hint | |
|---|---|---|
| Say hello to someone |
|
Name
example-plugin:hello
Synopsis
/example-plugin:hello [name]
Description
The example-plugin:hello command greets the specified person by name. If no name is provided, it greets "World".
This is a simple example demonstrating the basic structure of a Claude Code plugin command.
Implementation
-
Parse Arguments: Extract the name from the command arguments
- If no name is provided, default to "World"
-
Generate Greeting: Create a friendly greeting message
- Format: "Hello, {name}!"
-
Return Response: Output the greeting to the user
Return Value
- Format: Text greeting
- Example: "Hello, Alice!"
Examples
-
Greet a specific person:
/example-plugin:hello AliceOutput: "Hello, Alice!"
-
Default greeting:
/example-plugin:helloOutput: "Hello, World!"
Arguments
$1: (Optional) The name of the person to greet. Defaults to "World" if not provided.