Agent skill
phpstan-resolver
Résout automatiquement les erreurs PHPStan en analysant et corrigeant les problèmes de types. Boucle jusqu'à zéro erreur ou stagnation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/phpstan-resolver
SKILL.md
PHPStan Error Resolver Skill
Instructions à Exécuter
IMPORTANT : Exécute ce workflow étape par étape :
Usage
/qa:phpstan
Configuration
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_progresspuiscompleted
Pattern d'exécution pour chaque étape :
TaskUpdate→ tâche enin_progress- Exécuter l'étape
TaskUpdate→ tâche encompleted
Spécial pour la boucle de résolution (tâche #4) :
- Marquer en
in_progressau début de la boucle - Ne marquer en
completedqu'à la fin (0 erreur, stagnation, ou max itérations) - Le statut reste
in_progresspendant toutes les itérations
Étapes
- Vérifier environnement PHPStan
- Exécuter analyse initiale (
--error-format=json) - Grouper erreurs par fichier
- Boucle de résolution :
- Déléguer corrections à
@phpstan-error-resolver - Re-exécuter PHPStan
- Répéter jusqu'à 0 erreur ou stagnation
- Déléguer corrections à
- 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
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_progresspendant toutes les itérations - Chaque tâche suit le pattern :
in_progress→ exécution →completed - Utiliser
TaskListpour 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 - 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?