skills.vishalvoidskills/vishalvoid
Office & DocumentsAdvanced

wp-phpstan

PHPStan static analysis for WordPress projects

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/WordPress/agent-skills --skill wp-phpstan

Overview

What This Skill Does

PHPStan static analysis for WordPress projects

Application

When to use this Skill

Documentation

Show Skills.md file

WP PHPStan

When to use

Use this skill when working on PHPStan in a WordPress codebase, for example:

  • setting up or updating phpstan.neon / phpstan.neon.dist
  • generating or updating phpstan-baseline.neon
  • fixing PHPStan errors via WordPress-friendly PHPDoc (REST requests, hooks, query results)
  • handling third-party plugin/theme classes safely (stubs/autoload/targeted ignores)

Inputs required

  • wp-project-triage output (run first if you haven't)
  • Whether adding/updating Composer dev dependencies is allowed (stubs).
  • Whether changing the baseline is allowed for this task.

Procedure

0) Discover PHPStan entrypoints (deterministic)

  1. Inspect PHPStan setup (config, baseline, scripts):
    • node skills/wp-phpstan/scripts/phpstan_inspect.mjs

Prefer the repo’s existing composer script (e.g. composer run phpstan) when present.

Lines 1 - 25 of 91

Recommendations

Explore other random skills

All skillsMy patterns