claudegoodies
Command

codereview

From rtk-ai

RTK Code Review — Review locale pre-PR avec auto-fix

Install

/codereview

Facts

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

Source preview

The instructions Claude Code reads when this command runs.

# RTK Code Review

Review locale de la branche courante avant création de PR. Applique les critères de qualité RTK.

**Principe**: Preview local → corriger → puis créer PR propre.

## Usage

```bash
/tech:codereview              # 🔴 + 🟡 uniquement (compact)
/tech:codereview --verbose    # + points positifs + 🟢 détaillées
/tech:codereview main         # Review vs main (défaut: master)
/tech:codereview --staged     # Seulement fichiers staged
/tech:codereview --auto       # Review + fix loop
/tech:codereview --auto --max 5
```

Arguments: $ARGUMENTS

## Étape 1: Récupérer le contexte

```bash
# Parse arguments
VERBOSE=false
AUTO_MODE=false
MAX_ITERATIONS=3
STAGED=false
BASE_BRANCH="master"

set -- "$ARGUMENTS"
while [[ $# -gt 0 ]]; do
  case "$1" in
    --verbose) VERBOSE=true; shift ;;
    --auto) AUTO_MODE=true; shift ;;
    --max) MAX_ITERATIONS="$2"; shift 2 ;;
    --staged) STAGED=true; shift ;;
    *) BASE_BRANCH="$1"; shift ;;
  esac
done

# Fichiers modifiés
git diff "$BASE_BRANCH"...HEAD --name-only

# Diff complet
git diff "$BASE_BRANCH"...HEAD

# Stats
git diff "$BASE_BRANCH"...HEAD --stat
```

## Étape 2: Charger les guides pertinents (CONDITIONNEL)

| Si le diff contient...         | Vérifier                                   |
| ------------------------------ | ------------------------------------------ |
| `src/**/*.rs`                  | CLAUDE.md sections Erro
View full source on GitHub →

Other slash commands