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-phpstannpx skills add https://github.com/WordPress/agent-skills --skill wp-phpstanOr paste this URL into your assistant to install:
Overview
What This Skill Does
PHPStan static analysis for WordPress projects
Application
When to use this Skill
- Integrating wp phpstan into your development workflow.
- Following best practices for phpstan static analysis for wordpress projects.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
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-triageoutput (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)
- 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