.codex/skills/wp-phpstan/SKILL.md
Use when configuring, running, or fixing PHPStan static analysis in WordPress projects (plugins/themes/sites): phpstan.neon setup, baselines, WordPress-specific typing, and handling third-party plugin classes.
npx skillsauth add javiercasares/wpvulnerability wp-phpstanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when working on PHPStan in a WordPress codebase, for example:
phpstan.neon / phpstan.neon.distphpstan-baseline.neonwp-project-triage output (run first if you haven't)node skills/wp-phpstan/scripts/phpstan_inspect.mjsPrefer the repo’s existing composer script (e.g. composer run phpstan) when present.
szepeviktor/phpstan-wordpress or php-stubs/wordpress-stubs are effectively required for most WordPress plugin/theme repos. Without it, expect a high volume of errors about unknown WordPress core functions.
composer.dependencies in the inspect report).references/third-party-classes.md).phpstan.neon for WordPress projectspaths focused on first-party code (plugin/theme directories).vendor/, node_modules/, build artifacts, tests unless explicitly analyzed).ignoreErrors entries narrow and documented.See:
references/configuration.mdPrefer correcting types over ignoring errors. Common WP patterns that need help:
WP_REST_Request<...>@param types for callback args$args array shapes for job callbacksSee:
references/wordpress-annotations.mdWhen integrating with plugins/themes not present in the analysis environment:
php-stubs/woocommerce-stubs, php-stubs/acf-pro-stubs).ignoreErrors patterns for the specific vendor prefix.See:
references/third-party-classes.mdSee:
references/configuration.mdcomposer run ... or vendor/bin/phpstan analyse).ignoreErrors to ensure patterns are not masking unrelated issues.paths, add excludePaths, start at a lower level, then ratchet uptools
Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export/import, plugin/theme/user/content management, cron, cache flushing, multisite, and scripting/automation with wp-cli.yml.
tools
Use when you need a deterministic inspection of a WordPress repository (plugin/theme/block theme/WP core/Gutenberg/full site) including tooling/tests/version hints, and a structured JSON report to guide workflows and guardrails.
tools
Use when developing WordPress plugins: architecture and hooks, activation/deactivation/uninstall, admin UI and Settings API, data storage, cron/tasks, security (nonces/capabilities/sanitization/escaping), and release packaging.
tools
Use for WordPress Playground workflows: fast disposable WP instances in the browser or locally via @wp-playground/cli (server, run-blueprint, build-snapshot), auto-mounting plugins/themes, switching WP/PHP versions, blueprints, and debugging (Xdebug).