Create slash command(s) following standardized structure - supports parallel creation for 3+ commands
Creates multiple slash commands in parallel for a plugin, following security best practices and proper command structure. Use when you need to quickly scaffold 3+ commands with standardized templates and validation.
/plugin marketplace add vanman2024/domain-plugin-builder/plugin install domain-plugin-builder@ai-dev-marketplace<command-name> "<description>" [--plugin=name] | <cmd-1> "<desc-1>" <cmd-2> "<desc-2>" ... [--plugin=name]šØ EXECUTION NOTICE FOR CLAUDE
When you invoke this command via SlashCommand(/domain-plugin-builder:slash-commands-create ...), the system returns THESE INSTRUCTIONS below.
YOU are the executor. This is NOT an autonomous subprocess.
Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.
See @CLAUDE.md section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
CRITICAL: All generated files must follow security rules:
@~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/docs/security/SECURITY-RULES.md
Key requirements:
your_service_key_here.env files with .gitignore.env.example with placeholders onlyArguments: $ARGUMENTS
Goal: Create properly structured slash command(s). For 3+ commands, creates them in parallel for faster execution.
CRITICAL EXECUTION INSTRUCTIONS:
!{tool command} syntax shows you WHAT to execute - use the real tool to DO ITPhase 0: Create Todo List
Create todo list for all phases below.
Phase 1: Load Architectural Framework
Actions:
Phase 2: Parse Arguments and Determine Plugin
Parse $ARGUMENTS to extract:
If plugin not specified:
!{bash basename $(pwd)}
Store plugin name for Phase 3.
Phase 3: Load Templates
Load command template for reference:
!{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/skills/build-assistant/templates/commands/template-command-patterns.md}
Phase 4: Parse Arguments & Determine Mode
Actions:
Use bash to parse $ARGUMENTS and count how many commands are being requested:
!{bash echo "$ARGUMENTS" | grep -oE '<[^>]+>' | wc -l}
Store the count. Then extract each command specification:
Phase 5: Create Commands
Actions:
Decision: 1-2 commands = build directly, 3+ commands = use Task() for parallel
For 1-2 Commands:
Build directly - execute these steps immediately:
List existing agents (to use correct names in Task() calls): !{ls plugins/$PLUGIN_NAME/agents/*.md 2>/dev/null}
Load template: !{Read ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/skills/build-assistant/templates/commands/template-command-patterns.md}
For each command, create the file: !{Write plugins/$PLUGIN_NAME/commands/$CMD_NAME.md}
Include:
No need for Task() overhead when building 1-2 commands
For 3+ Commands:
CRITICAL: Send ALL Task() calls in a SINGLE MESSAGE for parallel execution!
Example for 3 commands - send all at once:
Task(description="Create command 1", subagent_type="domain-plugin-builder:slash-commands-builder", prompt="You are the slash-commands-builder agent. Create a complete slash command.
Command name: $CMD_1_NAME
Description: $CMD_1_DESC
Plugin: $PLUGIN_NAME
**CRITICAL: Use ACTUAL Agent Names**
BEFORE creating the command, list existing agents:
!{ls plugins/$PLUGIN_NAME/agents/*.md 2>/dev/null}
If the command needs to invoke an agent via Task(), use the ACTUAL agent names from the list above!
- Format: subagent_type=\"$PLUGIN_NAME:agent-name\"
- Example: If agents/security-scanner.md exists, use subagent_type=\"$PLUGIN_NAME:security-scanner\"
- NEVER use placeholder names like \"agent1\" or \"scanner\" - use the REAL agent file names!
Load template: plugins/domain-plugin-builder/skills/build-assistant/templates/commands/template-command-patterns.md
Create command file at: plugins/$PLUGIN_NAME/commands/$CMD_1_NAME.md
Follow framework structure:
- Frontmatter with description, argument-hint, allowed-tools
- Goal ā Actions ā Phase pattern
- Keep under 150 lines
- Use $ARGUMENTS for all argument references
- Use ACTUAL agent names in Task() calls (subagent_type field)
- Validate with validation script
Deliverable: Complete validated command file with correct agent references")
Task(description="Create command 2", subagent_type="domain-plugin-builder:slash-commands-builder", prompt="[Same structure with $CMD_2_NAME, $CMD_2_DESC]")
Task(description="Create command 3", subagent_type="domain-plugin-builder:slash-commands-builder", prompt="[Same structure with $CMD_3_NAME, $CMD_3_DESC]")
[Continue for all N commands from $ARGUMENTS]
DO NOT wait between Task() calls - send them ALL together in one response!
The agents will run in parallel automatically. Only proceed to Phase 6 after all Task() calls complete.
Phase 6: Validation
For each created command:
!{bash ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/skills/build-assistant/scripts/validate-command.sh plugins/$PLUGIN_NAME/commands/$CMD_NAME.md}
If validation fails, read errors and fix issues.
Phase 7: Sync to Airtable
Use bulk sync script for efficiency:
Bash: python ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/scripts/bulk-sync-airtable.py --plugin={plugin-name} --marketplace={marketplace-name} --type=commands
This syncs ALL commands in parallel instead of one at a time.
Environment Requirement:
Phase 8: Register in Settings
CRITICAL: Commands must be registered to be usable!
Run registration script to add all created commands to ~/.claude/settings.json:
!{bash ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/skills/build-assistant/scripts/register-commands-in-settings.sh $PLUGIN_NAME}
This registers entries like:
Verify registration by checking settings.json contains the new commands.
Phase 9: Self-Validation
Run validation script to verify all work completed:
!{bash ~/.claude/plugins/marketplaces/domain-plugin-builder/plugins/domain-plugin-builder/skills/build-assistant/scripts/validate-command.sh plugins/$PLUGIN_NAME/commands/*.md}
Mark all todos complete if validation passes.
Phase 10: Summary
Display results:
Commands Created: <count> Plugin: $PLUGIN_NAME Location: plugins/$PLUGIN_NAME/commands/
Files:
Validation: All passed ā Registration: Complete ā Airtable Sync: Attempted ā
Next Steps: