phpstan-runner

Executes PHPStan static analysis and iteratively applies fixes until clean.

1|Updated Nov 11, 2021
One-click install
npx skills add https://github.com/LongTermSupport/php-qa-ci --skill phpstan-runner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phpstan-runner
Source: https://github.com/LongTermSupport/php-qa-ci/tree/main/.claude/skills/phpstan-runner
Command: npx skills add https://github.com/LongTermSupport/php-qa-ci --skill phpstan-runner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, and includes scripts (resource) components.

What problem does it solve?

Iteratively running PHPStan, analyzing its output, manually applying fixes, and then re-running the analysis is a tedious and time-consuming process. This Skill automates the entire run-fix-run cycle for PHPStan, ensuring your PHP code meets static analysis standards efficiently.

Core Features & Use Cases

  • Automated Analysis Execution: Runs PHPStan static analysis using an optimized agent.
  • Intelligent Fix Cycle: Automatically detects errors, delegates to a fixer agent, applies fixes for common issues, and re-runs analysis until clean.
  • Use Case: When refactoring a large codebase, simply say "run PHPStan" and this Skill will execute the analysis, identify type errors and other issues, fix them, and confirm the code is clean, allowing you to maintain high code quality effortlessly.

Quick Start

Use the phpstan-runner skill to run PHPStan analysis and fix any errors.

Frequently Asked Questions about phpstan-runner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate PHPStan static analysis and fix type errors in PHP code?

PHPStan static analysis automates type checking and error detection in PHP projects. This Skill executes PHPStan, analyzes output, delegates fixes to specialized agents, and cycles between runs until your code passes analysis or escalation is needed.

Can PHPStan catch bugs and code quality issues across large PHP codebases?

Yes. PHPStan identifies type errors and quality issues across PHP projects by parsing configuration, grouping errors by file and pattern, and verifying fixes. It works iteratively to ensure comprehensive coverage during refactoring.

What's the best way to eliminate repetitive PHPStan runs and manual fix cycles?

Automating the run-fix-run cycle eliminates manual repetition. This Skill handles iterative execution, error analysis, and fix delegation automatically, allowing you to maintain code quality standards without tedious rerunning.

Does PHPStan work as part of CI/CD pipelines for code quality enforcement?

Yes. PHPStan integrates into CI/CD workflows for static analysis enforcement. This Skill automates analysis execution and fix cycles within pipeline contexts, ensuring type-safety standards are met before deployment.

What happens if PHPStan finds errors my fixer agent can't automatically resolve?

The Skill handles escalation when errors cannot be automatically fixed. It cycles through fixes, groups unresolved errors by pattern and file, and escalates issues requiring manual intervention for review.