Authoring Commands
Commands are Markdown files in plugins/<plugin>/commands/<name>.md with YAML front-matter.
Required front-matter
Section titled “Required front-matter”---name: my-commanddescription: One-sentence description shown in /help and the marketplace.---Both name and description are required. The PostToolUse hook validates these on every save.
Command body
Section titled “Command body”The body tells Claude what to do when the command is invoked. It should:
- Parse any CLI arguments from the user’s input
- Validate the arguments
- Delegate to the appropriate skill
Parse the `<component>` argument(s) from the user's message.
Validate: each argument must match a name in the component catalogue.If any name is unrecognized, list the closest matches and stop.
Delegate to the `components` skill with the resolved component list.Delegate to skill, don’t duplicate logic
Section titled “Delegate to skill, don’t duplicate logic”Commands must not contain generation logic. All logic lives in the skill. The command is a routing layer only.
Front-matter validation
Section titled “Front-matter validation”The PostToolUse hook rejects saves to plugins/*/commands/*.md that are missing name: or description: in their YAML front-matter.