phpstan-resolver

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

8 stars

Best use case

phpstan-resolver is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using phpstan-resolver should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/phpstan-resolver/SKILL.md --create-dirs "https://raw.githubusercontent.com/atournayre/claude-marketplace/main/qa/skills/phpstan-resolver/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/phpstan-resolver/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How phpstan-resolver Compares

Feature / Agentphpstan-resolverStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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) reste `in_progress` pendant toutes les itérations
- Chaque tâche suit le pattern : `in_progress` → exécution → `completed`
- Utiliser `TaskList` pour voir la progression (notamment pour la boucle longue)
- Les tâches permettent à l'utilisateur de suivre la résolution progressive des erreurs

## References

- [Scripts de workflow](references/workflow-scripts.md) - Scripts bash détaillés

## Error Handling

- PHPStan non trouvé → ARRÊT
- Config absente → ARRÊT
- Stagnation → ARRÊT avec rapport
- Max itérations → ARRÊT avec rapport

Related Skills

fix-grammar

8
from atournayre/claude-marketplace

Fix grammar and spelling errors in one or multiple files while preserving formatting

symfony-framework

8
from atournayre/claude-marketplace

Comprehensive Symfony 6.4 development skill for web applications, APIs, and microservices.

symfony:make

8
from atournayre/claude-marketplace

Cherche si il existe un maker Symfony pour faire la tache demandée et l'utilise si il existe. Si aucun maker n'existe alors utilise la slash command "/prepare"

elegant-objects

8
from atournayre/claude-marketplace

Vérifie la conformité du code PHP aux principes Elegant Objects de Yegor Bugayenko. Analyse un fichier spécifique ou tous les fichiers modifiés dans la branche.

prompt:validate

8
from atournayre/claude-marketplace

Vérifie la checklist avant exécution et liste les oublis

prompt:transform

8
from atournayre/claude-marketplace

Transforme un prompt en prompt exécutable compatible avec le Task Management System (TaskCreate/TaskUpdate/TaskList)

prompt:team

8
from atournayre/claude-marketplace

Orchestre une équipe d'agents spécialisés pour les tâches complexes. Auto-détecte le type, compose l'équipe, coordonne les phases analyse → challenge → implémentation → QA.

prompt:start

8
from atournayre/claude-marketplace

Démarre un développement avec un starter léger puis active le mode plan

apex

8
from atournayre/claude-marketplace

Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with parallel agents, self-validation, and optional adversarial review. Use when implementing features, fixing bugs, or making code changes that benefit from structured workflow.

fix-errors

8
from atournayre/claude-marketplace

Fix all ESLint and TypeScript errors with parallel processing using snipper agents

prompt-creator

8
from atournayre/claude-marketplace

Expert prompt engineering for creating effective prompts for Claude, GPT, and other LLMs. Use when writing system prompts, user prompts, few-shot examples, or optimizing existing prompts for better performance.

merge

8
from atournayre/claude-marketplace

Intelligently merge branches with context-aware conflict resolution