WP PHPStan
94TrustedShips scriptsStatic analysis configuration and error resolution for WordPress projects.
What it does
Wp Phpstan transforms how your assistant interacts with PHPStan in WordPress environments. It allows the assistant to audit your configuration, manage project baselines, and suggest precise PHPDoc annotations that align with WordPress patterns like REST requests, hooks, and database queries.
This skill provides the assistant with specific guidance on integrating WordPress-specific stubs and handling dependencies from third-party plugins. By interpreting the project structure, it helps maintain high code quality standards while minimizing noise in analysis results.
When it earns its place
Reach for it when…
Apply this when you need to introduce static analysis to a legacy plugin, resolve persistent class-not-found errors from external dependencies, or migrate existing code to stricter PHPStan analysis levels without drowning in hundreds of unaddressed legacy warnings.
Look elsewhere when…
Avoid this for non-WordPress PHP projects, as the logic is deeply coupled with WordPress core functions and common plugin stubs. It is also unnecessary for simple scripts that do not require complex dependency resolution or formal typing.
What to say to use it
You never invoke a skill directly — the assistant picks it up when your request matches what it covers. These are the kinds of things that do that.
- configure phpstan for my wordpress plugin
- how do i fix these wordpress hook type errors in phpstan
- create a phpstan baseline for this legacy theme
- add stubs for these missing plugin classes in my analysis
Install it
Install for all your projects
Copy the skill directory into your personal skills folder. Claude picks it up on its own the next time your request matches what it does — there is nothing to enable.
git clone --depth 1 --branch trunk https://github.com/WordPress/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/wp-phpstan ~/.claude/skills/wp-phpstanInstall for one project only
Put it in the project's own skills folder instead, so it can be committed and shared with everyone working on that repository.
cp -r /tmp/agent-skills/skills/wp-phpstan .claude/skills/wp-phpstanIf a skill of the same name exists in both places, the personal one wins.
Installing on Claude.ai or through the API instead? The full guide covers every surface.
Pair it with an MCP server
WP PHPStan changes how the work is done. These servers change what Claude can reach while doing it.
- GitHub MCP Server53The skill sets the conventions the code should follow; GitHub MCP Server is what lets Claude read the repository it is writing into.
- Context Forge MCP Server86Context Forge MCP Server gives the code somewhere to actually run, so the skill's guidance can be checked instead of assumed.
- Supabase MCP Server100Pair with Supabase MCP Server when the code being written has to match a real schema rather than a described one.