phpstan-fixer

Parse PHPStan error logs and apply fixes to modified files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually reviewing PHPStan error logs and implementing fixes for static analysis issues can be a slow and repetitive task. This Skill automates the analysis of existing PHPStan logs and applies intelligent fixes, significantly reducing the time spent on code quality maintenance.

Core Features & Use Cases

  • Log Analysis: Automatically parses PHPStan error logs to identify common static analysis issues and patterns.
  • Intelligent Fixes: Delegates to a specialized agent to implement fixes for identified PHPStan errors.
  • Use Case: After a CI pipeline fails due to PHPStan errors, simply provide the log file or ask the AI to "fix the PHPStan errors" and this Skill will analyze the output and apply necessary code changes, getting your build green faster.

Quick Start

Use the phpstan-fixer skill to fix the PHPStan errors in the latest log file.

Frequently Asked Questions about phpstan-fixer

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

FAQPage Schema
How do I fix PHPStan errors from my log file automatically?

PHPStan-fixer automatically parses your existing PHPStan error logs, identifies patterns, and applies intelligent fixes to your codebase. Provide the log file or ask the Skill to analyze the most recent log—it will auto-discover errors, group them by pattern, apply fixes, and report which files were modified.

Can I fix PHPStan errors without re-running the static analysis?

Yes. PHPStan-fixer works directly from existing PHPStan error logs without requiring re-analysis. It parses the log you provide or auto-discovers the latest one, groups errors by pattern, and applies fixes based on that output alone.

What types of PHPStan errors can this Skill fix?

PHPStan-fixer analyzes common static analysis issues identified in PHPStan logs and applies fixes for recognized error patterns. The Skill delegates to a specialized agent that handles identified patterns, reducing manual code review and helping your build pass faster.

How does PHPStan-fixer identify which errors to fix?

The Skill parses your PHPStan error log, groups errors by common patterns, and applies intelligent fixes to address those patterns. It automatically discovers the latest log file, analyzes the output, and implements code changes for identified issues.

Do I need to set up PHPStan separately before using this Skill?

No. PHPStan-fixer requires an existing PHPStan error log as input—either one you provide or the most recent log in your project. The Skill analyzes that log directly without needing to run PHPStan again.