Phpstan Fixer

🌐Community
by marcelorodrigo · vlatest · Repository

Phpstan Fixer automatically applies suggested code fixes from PhpStan to your PHP files, boosting code quality and reducing manual effort.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add phpstan-fixer npx -- -y @trustedskills/phpstan-fixer
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "phpstan-fixer": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/phpstan-fixer"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The phpstan-fixer skill automatically fixes PHP code based on static analysis rules. It leverages PHPStan and its associated fixer tools to identify and correct potential errors, coding style violations, and security vulnerabilities within a codebase. This ensures cleaner, more maintainable, and reliable PHP applications.

When to use it

  • Automated Code Refactoring: When you need to quickly apply consistent code formatting and fixes across a large project.
  • Pre-Commit Hooks: Integrate with version control systems to automatically fix common issues before code is committed.
  • Continuous Integration (CI): Incorporate into CI/CD pipelines to enforce coding standards and prevent regressions.
  • Code Review Assistance: Help streamline the code review process by automatically addressing minor style and formatting concerns.

Key capabilities

  • PHPStan static analysis integration
  • Automated code fixing based on configured rulesets
  • Integration with version control systems (e.g., Git)
  • CI/CD pipeline compatibility

Example prompts

  • "Fix all PHPStan errors in the src/ directory."
  • "Apply PSR-12 coding style to this file: my_file.php."
  • "Run phpstan-fixer and report any changes made."

Tips & gotchas

  • Requires a working PHP environment with PHPStan and related dependencies installed.
  • Review the fixed code carefully, as automated fixes may not always be perfect or appropriate for all situations.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
marcelorodrigo
Installs
13

🌐 Community

Passed automated security scans.