Generate new Navigator slash commands following project conventions. Use when user says "add slash command", "create command", "new /nav command", or "add /nav:[name] command".
Generate new slash commands for the Navigator plugin following established conventions and patterns.
Auto-invoke when user says:
Ask user:
Use Task agent to find similar commands:
"Find existing Navigator commands similar to [purpose]:
- Commands in commands/*.md
- Similar complexity level
- Common structure patterns
- Return 2-3 best examples"
What to extract from examples:
Based on complexity level:
Simple commands:
- YAML frontmatter (description)
- Title
- What This Does (2-3 sentences)
- Usage (basic syntax + examples)
- When to Use (2-3 scenarios)
- Expected Output
- Troubleshooting (2-3 common issues)
- Closing statement
Medium commands:
- YAML frontmatter
- Title + overview
- What This Does (detailed explanation)
- When to Use (5-6 scenarios with examples)
- Usage / Execution Steps
- Output Format
- Integration notes (if applicable)
- Troubleshooting (4-5 issues)
- Best Practices
- Closing statement
Complex commands:
- YAML frontmatter
- Title + comprehensive overview
- What This Does (with comparisons)
- Execution Plan (multi-step)
- Pre-flight checks
- Step-by-step implementation
- Validation steps
- Integration with PM tools (if applicable)
- Success criteria
- Troubleshooting (comprehensive)
- Edge cases
- Performance notes
- Closing statement
Use predefined function: functions/command_generator.py
# Generates command markdown following Navigator conventions
generate_command(
name="[command-name]",
description="[one-line purpose]",
complexity="simple|medium|complex",
sections={
"what_this_does": "...",
"when_to_use": [...],
"usage": "...",
"execution_steps": [...],
"troubleshooting": [...]
}
)
File location: commands/[command-name].md
Structure:
Use predefined function: functions/command_validator.py
Checks:
Display:
ā
Slash Command Created: /nav:[command-name]
File: commands/[command-name].md
Lines: [count]
Complexity: [simple/medium/complex]
Try it:
/nav:[command-name]
What it does:
[brief description]
Next steps:
1. Test the command manually
2. Update plugin documentation if public-facing
3. Add to CLAUDE.md command list if needed
User: "Add a slash command for showing Navigator version"
Execution:
Gather requirements:
Name: version
Purpose: Display current Navigator plugin version
Complexity: Simple
Type: User-facing
Analyze similar (via Task agent):
Found similar: marker.md (simple, informational)
Pattern: Short description ā Usage ā When to use ā Output
Design structure:
- Frontmatter
- Title: "Navigator Version Info"
- What This Does: 1 paragraph
- Usage: Basic syntax
- When to Use: 2-3 scenarios
- Output Format: Example
- Closing statement
Generate: commands/version.md
---
description: Display Navigator plugin version and system info
---
# Navigator Version Info
Check which version of Navigator you're running.
## What This Does
Displays the current Navigator plugin version, Claude Code version, and system configuration.
## Usage
```bash
/nav:version
Reporting issues:
Checking updates:
System diagnostics:
Navigator Plugin
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Version: 2.2.0
Installed: /Users/you/.claude/plugins/navigator
Config: .agent/.nav-config.json
System:
- Claude Code: 1.5.0
- Project: /Users/you/project
- Platform: darwin
Keep your Navigator up to date for latest features š
Validate: ā All checks pass
Show usage:
ā
Slash Command Created: /nav:version
File: commands/version.md
Lines: 45
Complexity: Simple
Try it: /nav:version
User: "Create a command for archiving old task documentation"
Execution:
Gather requirements:
Name: archive-tasks
Purpose: Move completed tasks to archive directory
Complexity: Medium (file operations, validation)
Type: User-facing
Analyze similar:
Found: markers.md (file management, user selection)
Found: compact.md (multi-step process)
Pattern: Overview ā Execution Plan ā Steps ā Validation
Design structure:
- Frontmatter
- Title + overview
- What This Does (comparison with manual approach)
- When to Use (5 scenarios)
- Execution Plan (Step 1-4)
- Output Format
- Troubleshooting (4 issues)
- Best Practices
- Closing
Generate: commands/archive-tasks.md (full content)
Validate: ā All checks pass
Show usage: Command ready to use
After generating command, show:
ā
Slash Command Created: /nav:[name]
Structure:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š commands/[name].md
Sections:
ā
YAML frontmatter
ā
Title and overview
ā
What This Does
ā
When to Use ([N] scenarios)
ā
Usage / Execution Plan
ā
[Additional sections based on complexity]
ā
Troubleshooting
ā
Closing statement
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Command: /nav:[name]
Purpose: [brief description]
Lines: [count]
Test it:
/nav:[name]
Documentation:
- Add to README.md if user-facing
- Update CLAUDE.md command list
- Add to plugin.json if needed
Pattern: Simple structure, quick output Examples: version, status, list Sections: Description ā Usage ā Output
Pattern: Execute something, show result Examples: marker, compact, archive Sections: Description ā Execution ā Validation ā Result
Pattern: Multi-step process, checks Examples: init, migrate, setup Sections: Pre-flight ā Steps ā Validation ā Troubleshooting
Pattern: User selection, operations, feedback Examples: markers (list/load), tasks (list/select) Sections: Overview ā Modes ā Operations ā Results
Problem: Command content is sparse, missing sections
Solutions:
Problem: Tone or structure feels off
Solutions:
Problem: Invalid frontmatter
Solutions:
description field existspython -c "import yaml; yaml.safe_load(open('commands/[name].md').read().split('---')[1])"Problem: Examples don't feel realistic
Solutions:
This skill succeeds when:
The plugin-slash-command skill automates Navigator command creation, ensuring consistency and saving development time š§