Skip to content
Skill

Wp phpstan

Guides PHPStan setup, level raising and baseline fixes in WordPress Acorn projects

Wp phpstan is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
14
Last commit
License
MIT
Listing updated

Similar skills

About Wp phpstan

This skill helps an agent configure and run PHPStan static analysis in WordPress projects built on Acorn, such as Sage themes, Acorn mu-plugins and Radicle apps. It covers phpstan.neon, the analysis paths limited to application code, WordPress stubs from szepeviktor/phpstan-wordpress and the extension installer, and how to raise the level one step at a time with a baseline that only shrinks.

The skill points to a longer upstream procedure bundled in the kivo-wise plugin and adds Roots-specific guidance. It includes an inspection script that reads the config, baseline and stub status without running PHPStan, then walks through installing dev dependencies, choosing paths, deciding whether Larastan can boot under Acorn, and running analysis through the project's Composer runner. Fixes are ordered by cause, covering stubs, PHPDoc, real bugs and targeted ignores, with a CI step that fails when the baseline grows.

The agent is expected to know Composer and PHP tooling, and to run commands in the project container. It also lists common failures such as missing WordPress functions, out-of-memory errors and differences between local and CI PHP versions.

When your agent uses it

Use when configuring, running or fixing PHPStan in a WordPress project that uses Acorn - phpstan.neon, baseline, szepeviktor/phpstan-wordpress stubs, larastan, level raising, "Cannot access property on mixed", get_field() types, paths for app/. For Pint or Mago formatting use testing-wp; for runtime errors use roots-debugging.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the kivo-wise plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add hekivo/kivo-wise
/plugin install kivo-wise@kivo-wise

Or copy only this skill to ~/.claude/skills/wp-phpstan:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/wp-phpstan &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-phpstan" ~/.claude/skills/wp-phpstan &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/wp-phpstan inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/wp-phpstan to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/wp-phpstan &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-phpstan" ~/.agents/skills/wp-phpstan &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/wp-phpstan inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/wp-phpstan to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/wp-phpstan &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-phpstan" ~/.cursor/skills/wp-phpstan &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/wp-phpstan inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/hekivo/kivo-wise.git --path plugins/kivo-wise/skills/wp-phpstan

Or copy the folder to ~/.gemini/skills/wp-phpstan yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/wp-phpstan:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/wp-phpstan &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-phpstan" ~/.copilot/skills/wp-phpstan &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/wp-phpstan inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/hekivo/kivo-wise.git

Then copy kivo-wise/plugins/kivo-wise/skills/wp-phpstan into your agent's skills folder as wp-phpstan. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

PHPStan configuration setup
Creates or fixes phpstan.neon with paths limited to the application code for each Acorn project profile.
WordPress stubs installation
Installs the WordPress stubs and extension installer so core functions and classes are recognised.
Level raising and baselines
Raises the analysis level step by step and generates baselines only for existing errors.
Larastan decision guidance
Explains when Larastan helps with facades and models under Acorn and when plain PHPDoc is enough.
Error fixing by cause
Orders fixes from missing stubs to PHPDoc, real bugs and narrow ignores, including get_field() typing.
CI integration checks
Describes running PHPStan in CI with GitHub annotations and failing when the baseline grows.

Good for

  • Set up PHPStan in an Acorn-based Sage theme
  • Fix 'Cannot access property on mixed' errors from get_field()
  • Raise the PHPStan level by one and regenerate the baseline
  • Stop PHPStan from scanning vendor and wp core folders
  • Wire PHPStan into a CI pipeline for a WordPress project

Wp phpstan FAQ

What does Wp phpstan need to run?

It needs the kivo-wise plugin's third-party procedure files and a project using Acorn with a Composer runner. Commands are run through the project's runner, such as Lando or Composer.

Does Wp phpstan install packages automatically?

No, it gives the agent a Composer command to install phpstan, szepeviktor/phpstan-wordpress and the extension installer as dev dependencies, which the agent runs in the project.

Which tool handles Pint or runtime errors?

The skill says formatting questions go to testing-wp and runtime errors go to roots-debugging.

How do I install Wp phpstan in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/wp-phpstan to use it in all your projects, or to .claude/skills/wp-phpstan in one project. Or install the kivo-wise plugin, which includes it: /plugin marketplace add hekivo/kivo-wise, then /plugin install kivo-wise@kivo-wise.

Does Wp phpstan run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Wp phpstan?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Wp phpstan?

The closest alternatives to Wp phpstan are Acorn stack, Testing wp, Acorn background, Acorn scaffolding and Roots debugging.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from hekivo/kivo-wise

  1. Writes approved design plans as WordPress block markup and scaffolds missing blocks

    • Open source
    • 14 GitHub stars
    • Developer tools
  2. Maps Figma components to project code blocks through Code Connect, with approval first

    • Open source
    • 14 GitHub stars
    • Design and media
  3. Turns a Figma frame, HTML file or URL into a WordPress page on the Roots stack

    • Open source
    • 14 GitHub stars
    • Developer tools
  4. Turns a Figma frame into neutral section specs for kivo-creator via the Figma MCP server

    • Open source
    • 14 GitHub stars
    • Design and media
  5. Turns an HTML file or URL into kivo-creator section specs with reference screenshots

    • Open source
    • 14 GitHub stars
    • Developer tools
  6. Maps design sections to a project's existing blocks before any code is generated

    • Open source
    • 14 GitHub stars
    • Developer tools