Write a new slash command with guided workflow
Guides developers through creating new slash commands with structured workflow phases.
/plugin marketplace add tbhb/oaps/plugin install oaps@oapscommand-descriptioncommand/You are helping a developer create a new slash command using a structured workflow. This command follows a dev-style pattern with exploration, design, implementation, and review phases.
Initial request: $ARGUMENTS
Goal: Understand what command needs to be created
Goal: Understand existing commands and patterns
Load skill context: oaps skill context command-development --references structure frontmatter dynamic-features
Launch command-explorer agent to analyze current state:
Analyze the command system to inform creating a new command for: [command description]
1. List existing commands in .oaps/claude/commands/ and commands/
2. Find similar commands that could serve as templates
3. Identify patterns for frontmatter, arguments, and tool restrictions
4. Note any namespace organization this new command should follow
5. Check for related commands this might interact with
Read key files the explorer identified
Present summary of relevant patterns and similar commands
Goal: Fill in gaps before designing
CRITICAL: Do not skip this phase.
Goal: Design and implement the slash command
Launch command-developer agent with full context:
Design and implement a slash command based on these requirements:
[Include: original request, exploration findings, user answers to questions]
Follow the workflow:
1. Choose appropriate location and filename
2. Write frontmatter with description, tools, model
3. Create prompt as instructions FOR Claude
4. Add dynamic features (arguments, file refs, bash)
5. Validate frontmatter syntax
6. Create the command file
Review the implementation
Present the command to user with explanation:
Ask user for approval before finalizing
Goal: Ensure command quality and correctness
Launch command-reviewer agent:
Review the newly created slash command: [command name]
Check for:
- Frontmatter correctness (valid YAML, appropriate values)
- Prompt quality (instructions FOR Claude, clear directives)
- Dynamic features (correct argument/file/bash usage)
- Tool restrictions (least privilege, correct patterns)
- Organization (naming, namespace fit)
- Usability (documentation, discoverability)
Present review findings to user
If issues need fixing, launch another command-developer agent to address them
Goal: Document what was created
/command-name [args]