Goal: Create or update custom commands following template standards
IMPORTANT: Keep command content high-level and concise. Do not dive into implementation details.
Context
- $0 =
- $1 = or
- $2 = (conditionally required)
Instructions
If Action to be performed is create
If
command-nameorinstructionsare not provided, then you should exit and ask the user to provide a command name and instructions.
- Create a new command in the
.claude/commands/directory with the name of thecommand-name - Configure the command with the
instructionsprovided by the user. - Validate the
command.mdfile against the acceptance criteria and the template from.claude/skills/claude-command/templates/command.md. - Save the
command.mdfile to the.claude/commands/command.mdfile.
If Action to be performed is update
If
command-nameorinstructionsare not provided, then you should exit and ask the user to provide a command name and instructions.
- Update the existing command in the
.claude/commands/directory with the name of thecommand-name - Configure the command with the
instructionsprovided by the user. - Re-validate the
command.mdfile against the acceptance criteria and the template from.claude/skills/claude-command/templates/command.md.
If Action to be performed is delete
If
command-nameis not provided, then you should exit and ask the user to provide a command name.
- Delete the existing command in the
.claude/commands/directory with the name of thecommand-name - Delete the
command.mdfile from the.claude/commands/command.mdfile.
If Action to be performed is list
- List all existing commands in the
.claude/commands/directory.
Note: Supporting files should be store within the command folder. E.g.
.claude/commands/Note: The folder name and the command name should be the same.
Workflow
- Read the template from
.claude/skills/claude-command/templates/command.md - Read skills-docs.md from
.claude/skills/claude-command/references/skills-docs.md - Analyze user requirements and determine command location
- Implement the task based on the instructions above.
- Report completion with command details and location
Rules
- DO NOT deviate from template structure (YAML frontmatter + all sections)
- NEVER save commands outside
.claude/commands/directory - DO NOT grant excessive tool permissions - apply least-privilege
- DO NOT skip validation step.
Acceptance Criteria
- Command saved to correct location with complete YAML frontmatter
- All template sections populated
- Command saved to correct location with correct YAML frontmatter
- Report delivered with command details and location