Run PHPStan static analysis on a WordPress plugin or theme using szepeviktor/phpstan-wordpress. Covers the composer dev-dependencies and what is pulled transitively (phpstan/phpstan ^2.0, php-stubs/wordpress-stubs), the optional phpstan/extension-installer that auto-registers the extension, the phpstan.neon.dist config (level 0-10 / max, paths, the vendor/szepeviktor/phpstan-wordpress/extension.neon include when not using the installer), why WordPress needs stubs, adding WooCommerce stubs (php-stubs/woocommerce-stubs) for cross-plugin analysis, the --generate-baseline workflow for legacy code, common WP false positives the extension fixes (apply_filters arg counts, is_wp_error narrowing, hook callbacks, dynamic constants), and running with --level / --memory-limit. Use when adding static analysis, writing phpstan.neon, raising the level, or taming WP-specific PHPStan errors.
$npx -y skills add lonsdale201/wp-agent-skills --skill wp-phpstan-static-analysisInstalls into the current project.
Run `npx skills use "https://github.com/lonsdale201/wp-agent-skills" --skill "lonsdale201/wp-agent-skills/wp-phpstan-static-analysis"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/lonsdale201/wp-agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/lonsdale201/wp-agent-skills"` and select the relevant skills, then follow their instructions.