superpowers-sage:wp-phpstan

Run PHPStan static analysis on Sage/Acorn WordPress projects.

13|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-wp-phpstan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: superpowers-sage:wp-phpstan
Source: https://github.com/codigodoleo/superpowers-sage/tree/main/skills/wp-phpstan
Command: npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-wp-phpstan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHPStan-based static analysis tailored for Sage/Acorn WordPress projects, guiding you to catch type errors early and maintain code quality with proper WordPress stubs and baseline workflows.

Core Features & Use Cases

  • Install and configure PHPStan, Larastan, and WordPress stubs for Sage/Acorn themes and plugins.
  • Generate and manage baselines to progressively fix issues in local, CI, and staging environments.
  • Integrate with CI pipelines to enforce static analysis and maintain code quality across the WordPress project.

Quick Start

Initialize PHPStan in your Sage/Acorn project and run an initial analysis to detect type issues.

Frequently Asked Questions about superpowers-sage:wp-phpstan

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

FAQPage Schema
How do I set up PHPStan static analysis for a Sage WordPress theme?

To set up PHPStan static analysis for Sage WordPress themes, install composer packages like phpstan, larastan, and szepeviktor/phpstan-wordpress, then configure a phpstan.neon file with WordPress stubs to detect type errors.

Do I need Larastan to run static analysis on Acorn WordPress projects?

Larastan is required to run PHPStan static analysis on Acorn WordPress projects, as it provides the necessary framework-specific rules and type definitions alongside szepeviktor/phpstan-wordpress stubs.

What is the best way to manage existing PHPStan errors in a legacy Sage theme?

The best way to manage existing PHPStan errors in a legacy Sage theme is generating a baseline file, which records current errors so static analysis only reports new issues, allowing progressive fixes in local and CI environments.

Can I integrate PHPStan into CI pipelines for WordPress plugin development?

You can integrate PHPStan into CI pipelines for WordPress plugin development by running static analysis checks during builds, enforcing code quality by catching type errors before deployment using the configured baseline.

Why does PHPStan fail to recognize WordPress core functions in my Acorn project?

PHPStan fails to recognize WordPress core functions in Acorn projects because WordPress stubs are missing, requiring the szepeviktor/phpstan-wordpress package and a properly configured phpstan.neon file to resolve type definitions.

Does superpowers-sage:wp-phpstan support baseline generation for staging environments?

The superpowers-sage:wp-phpstan Skill supports baseline generation for staging environments, allowing you to manage and progressively fix static analysis issues across local, CI, and staging workflows.