List all custom slash commands with their descriptions
Lists all custom slash commands from the current repository with their descriptions.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install claude-code-observability@melodic-software(no arguments - lists all commands)opusList all custom slash commands from the current repository using efficient single-pass extraction.
Determine which command directories to search:
# Check for marketplace repo
if [ -f "marketplace.json" ] || [ -f ".claude-plugin/marketplace.json" ]; then
echo "REPO_TYPE=marketplace"
fi
# Check for plugin repo
if [ -f ".claude-plugin/plugin.json" ] && [ -d "./commands" ]; then
echo "REPO_TYPE=plugin"
fi
# Check for project commands
if [ -d ".claude/commands" ]; then
echo "HAS_PROJECT_COMMANDS=true"
fi
Based on repo type, search the correct directories:
For marketplace repos:
# Search all plugin command directories + project commands
grep -r "^description:" plugins/*/commands --include="*.md" 2>/dev/null | sort
grep -r "^description:" .claude/commands --include="*.md" 2>/dev/null | sort
For plugin repos:
# Search plugin commands + project commands
grep -r "^description:" ./commands --include="*.md" 2>/dev/null | sort
grep -r "^description:" .claude/commands --include="*.md" 2>/dev/null | sort
For standard repos:
# Search project commands only
grep -r "^description:" .claude/commands --include="*.md" 2>/dev/null | sort
Parse the grep output and format as:
### Plugin Commands ({plugin-name})
### **/command-name**
Description from frontmatter
---
### Project Commands
### **/command-name**
Description from frontmatter
---
For larger operations (50+ files, complex per-file analysis), consider:
This pattern adds ~2-3s overhead per subagent, so only use when per-item processing time justifies it.