Hello world plugin implementation
Prints a greeting message to the console, optionally with a provided name.
/plugin marketplace add openshift-eng/ai-helpers/plugin install hello-world@ai-helpers[name]hello-world:echo
/hello-world:echo [name]
The hello-world:echo command prints a greeting message to the console. By default, it prints "Hello world", but when provided with a name argument hello-world:echo $1, it prints "Hello ${1}". This command serves as a basic example of a Claude Code plugin implementation, demonstrating the minimal structure required for a functional plugin command.
It provides a reference implementation for plugin developers. It demonstrates:
The spec sections is inspired by https://man7.org/linux/man-pages/man7/man-pages.7.html#top_of_page
echo statement$1)$1 is provided, outputs "Hello $1"Implementation logic:
if [ -n "$1" ]; then
echo "Hello $1"
else
echo "Hello world"
fi
Basic usage (no arguments):
/hello-world:echo
Output:
Hello world
With a name argument:
/hello-world:echo Alice
Output:
Hello Alice
With multiple words as name:
/hello-world:echo "John Doe"
Output:
Hello John Doe