Skip to content
PHP Ecosystem
Explore

AI assistance

The package owns yii2-phpstan-analysis, a skill for configuring this extension, investigating inferred types and migrating an existing analysis setup.

Run the pinned installer from the application root using a source checkout that contains the skill:

Terminal window
npx skills@1.7.2 add /absolute/path/to/phpstan --list
npx skills@1.7.2 add /absolute/path/to/phpstan \
--skill yii2-phpstan-analysis --agent claude-code codex opencode

You can also use ./vendor/yii2-extensions/phpstan as the source. Composer installation alone does not expose its skill to a client at the application root. Copy or link the complete skill directory and refresh copied skills when upgrading the package. Omit --global for project scope.

ClientProject directoryExplicit activation
Claude Code.claude/skills/yii2-phpstan-analysis//yii2-phpstan-analysis
Codex.agents/skills/yii2-phpstan-analysis/$yii2-phpstan-analysis or the skill picker
OpenCode.agents/skills/yii2-phpstan-analysis/Ask it to load the named skill through its skill tool.

OpenCode also supports .opencode/skills/ and .claude/skills/. The pinned installer’s client definitions use .agents/skills/ for Codex and OpenCode, and .claude/skills/ for Claude Code. This checkout links both discovery paths to the canonical skills/ directory, without separate client copies.

Open a fresh session at the application root, check the client’s available skills and invoke the skill. The installer’s --list checks source discovery; native discovery and activation are checked in the client.

Ask the agent to configure separate Web/console analyses, resolve a typed factory or diagnose an unresolved service. Run the selected PHPStan configuration and check the inferred types. See testing.