Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

phpstan-resolver

verified

Résout automatiquement les erreurs PHPStan en analysant et corrigeant les problèmes de types. Boucle jusqu'à zéro erreur ou stagnation.

View on GitHub

Marketplace

atournayre-claude-plugin-marketplace

atournayre/claude-marketplace

Plugin

qa

Repository

atournayre/claude-marketplace
7stars

qa/skills/phpstan-resolver/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/atournayre/claude-marketplace/blob/main/qa/skills/phpstan-resolver/SKILL.md -a claude-code --skill phpstan-resolver

Installation paths:

Claude
.claude/skills/phpstan-resolver/
Powered by add-skill CLI

Instructions

# PHPStan Error Resolver Skill

## Instructions à Exécuter

**IMPORTANT : Exécute ce workflow étape par étape :**


## Usage
```
/qa:phpstan
```

## Configuration

```bash
PHPSTAN_BIN="./vendor/bin/phpstan"
PHPSTAN_CONFIG="phpstan.neon"  # ou phpstan.neon.dist
ERROR_BATCH_SIZE=5
MAX_ITERATIONS=10
```

## Workflow

### Initialisation

**Créer les tâches du workflow :**

Utiliser `TaskCreate` pour chaque phase :

```
TaskCreate #1: Vérifier environnement PHPStan
TaskCreate #2: Exécuter analyse initiale (--error-format=json)
TaskCreate #3: Grouper erreurs par fichier
TaskCreate #4: Boucle de résolution (max 10 itérations)
TaskCreate #5: Générer rapport final
```

**Important :**
- Utiliser `activeForm` (ex: "Vérifiant environnement PHPStan", "Résolvant erreurs")
- La tâche #4 peut prendre du temps (boucle jusqu'à 10 itérations)
- Chaque tâche doit être marquée `in_progress` puis `completed`

**Pattern d'exécution pour chaque étape :**
1. `TaskUpdate` → tâche en `in_progress`
2. Exécuter l'étape
3. `TaskUpdate` → tâche en `completed`

**Spécial pour la boucle de résolution (tâche #4) :**
- Marquer en `in_progress` au début de la boucle
- Ne marquer en `completed` qu'à la fin (0 erreur, stagnation, ou max itérations)
- Le statut reste `in_progress` pendant toutes les itérations

### Étapes

1. Vérifier environnement PHPStan
2. Exécuter analyse initiale (`--error-format=json`)
3. Grouper erreurs par fichier
4. Boucle de résolution :
   - Déléguer corrections à `@phpstan-error-resolver`
   - Re-exécuter PHPStan
   - Répéter jusqu'à 0 erreur ou stagnation
5. Générer rapport final

## Délégation

Utilise l'agent `@phpstan-error-resolver` pour les corrections :
- Batch de 5 erreurs par fichier par itération
- Maximum 10 itérations

## Rapport

```yaml
details:
  total_errors_initial: X
  total_errors_final: Y
  errors_fixed: Z
  success_rate: "X%"
  iterations: N
```

## Task Management

**Progression du workflow :**
- 5 tâches créées à l'initialisation
- La tâche #4 (boucle)

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2489 chars