phpstan-fixer
Installation
SKILL.md
PHPStan Error Fixer
Fix PHPStan static analysis errors through proper type annotations, PHPDocs, and code improvements. This skill teaches agents how to resolve errors without suppressing them, respecting the project's configured strictness level.
Core Principles
- Never suppress errors as first resort — Fix the root cause with proper types and annotations
- Respect user configuration — Never modify
phpstan.neonsettings (level, paths, parameters) - No silent ignoring — Never add
ignoreErrorsto config without explicit user approval - Context-aware fixes — Understand the project type (Laravel, Symfony, vanilla PHP) before proposing solutions
- Ask before ignoring — If a legitimate ignore is needed, explain why and get user approval first
- Don't fix third-party code — Never modify files in
vendor/. Use stub files instead to override wrong types