What it is
Example Command is a sample skill from the example-plugin that demonstrates the skills/<name>/SKILL.md layout for user-invoked slash commands. According to the source, it is functionally identical to the legacy commands/example-command.md format. Both are loaded the same way and only the file layout differs.
When invoked, the skill receives the user's input through the $ARGUMENTS placeholder. Its instructions are to parse the arguments provided by the user, perform the requested action using the allowed tools, and report the results back to the user. Its frontmatter declares an argument hint of <required-arg> [optional-arg] and pre-approves the Read, Glob, Grep, and Bash tools.
The skill also serves as a reference for the frontmatter fields supported in this layout:
- name: the skill identifier, which matches the directory name.
- description: a short description shown in /help.
- argument-hint: hints for command arguments shown to the user.
- allowed-tools: pre-approved tools for the skill, which reduces permission prompts.
- model: an optional field to override the model, for example "haiku", "sonnet", or "opus".
Who it's for
- Plugin authors learning how to structure user-invoked slash commands as skills
- Developers migrating from the legacy commands/<name>.md format to the skills/<name>/SKILL.md layout
- Anyone wanting a reference for skill frontmatter options
Requirements
Requirements
- Claude Code with the example-plugin from claude-plugins-official
- Allowed tools used by the skill: Read, Glob, Grep, Bash
هاد سكيل تجريبي بيوضّحلك كيف تكتب أمر سلاش بصيغة skills/<name>/SKILL.md وشو خيارات الـfrontmatter المتاحة. بياخد الـarguments من المستخدم، بينفّذ المطلوب بالأدوات المسموحة، وبيرجعلك النتيجة.
Examples
Invoke with a single argument
Prompt/example-command my-argumentExpected output: Runs the skill with one argument, which is passed in via $ARGUMENTS.
Invoke with two arguments
Prompt/example-command arg1 arg2Expected output: Runs the skill with both a required and an optional argument, matching the argument hint <required-arg> [optional-arg].