claudegoodies
Command

diagnose

From rtk-ai

RTK environment diagnostics - Checks installation, hooks, version, command routing

Install

/diagnose

Facts

Repository
rtk-ai/rtk
Status
Actively maintained
Last commit
Model
haiku

Source preview

The instructions Claude Code reads when this command runs.

# /diagnose

Vérifie l'état de l'environnement RTK et suggère des corrections.

## Quand utiliser

- **Automatiquement suggéré** quand Claude détecte ces patterns d'erreur :
  - `rtk: command not found` → RTK non installé ou pas dans PATH
  - Hook errors in Claude Code → Hooks mal configurés ou non exécutables
  - `Unknown command` dans RTK → Version incompatible ou commande non supportée
  - Token savings reports missing → `rtk gain` not working
  - Command routing errors → Hook integration broken

- **Manuellement** après installation, mise à jour RTK, ou si comportement suspect

## Exécution

### 1. Vérifications parallèles

Lancer ces commandes en parallèle :

```bash
# RTK installation check
which rtk && rtk --version || echo "❌ RTK not found in PATH"
```

```bash
# Git status (verify working directory)
git status --short && git branch --show-current
```

```bash
# Hook configuration check
if [ -f ".claude/hooks/rtk-rewrite.sh" ]; then
    echo "✅ OK: rtk-rewrite.sh hook present"
    # Check if hook is executable
    if [ -x ".claude/hooks/rtk-rewrite.sh" ]; then
        echo "✅ OK: hook is executable"
    else
        echo "⚠️ WARNING: hook not executable (chmod +x needed)"
    fi
else
    echo "❌ MISSING: rtk-rewrite.sh hook"
fi
```

```bash
# Hook rtk-suggest.sh check
if [ -f ".claude/hooks/rtk-suggest.sh" ]; then
    echo "✅ OK: rtk-suggest.sh hook present"
    if [ -x
View full source on GitHub →

Other slash commands