test-routing
From rtk-ai
Test RTK command routing without execution (dry-run) - verifies which commands have filters
Install
/test-routingFacts
- Repository
- rtk-ai/rtk
- Status
- Actively maintained
- Last commit
- Model
- haiku
- Source file
- .claude/commands/test-routing.md
Source preview
The instructions Claude Code reads when this command runs.
# /test-routing
Vérifie le routing de commandes RTK sans exécution (dry-run). Utile pour tester si une commande a un filtre disponible avant de l'exécuter.
## Usage
```
/test-routing <command> [args...]
```
## Exemples
```bash
/test-routing git status
# Output: ✅ RTK filter available: git status → rtk git status
/test-routing npm install
# Output: ⚠️ No RTK filter, would execute raw: npm install
/test-routing cargo test
# Output: ✅ RTK filter available: cargo test → rtk cargo test
```
## Quand utiliser
- **Avant d'exécuter une commande**: Vérifier si RTK a un filtre
- **Debugging hook integration**: Tester le command routing sans side-effects
- **Documentation**: Identifier quelles commandes RTK supporte
- **Testing**: Valider routing logic sans exécuter de vraies commandes
## Implémentation
### Option 1: Check RTK Help Output
```bash
COMMAND="$1"
shift
ARGS="$@"
# Check if RTK has subcommand for this command
if rtk --help | grep -E "^ $COMMAND" >/dev/null 2>&1; then
echo "✅ RTK filter available: $COMMAND $ARGS → rtk $COMMAND $ARGS"
echo ""
echo "Expected behavior:"
echo " - Command will be filtered through RTK"
echo " - Output condensed for token efficiency"
echo " - Exit code preserved from original command"
else
echo "⚠️ No RTK filter available, would execute raw: $COMMAND $ARGS"
echo ""
echo "Expected behavior:"
echView full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 14d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 14d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 14d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 13d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 13d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 13d ago