psalm/psalm-plugin-laravel/code-review
Claude Code and agent skill by psalm/psalm-plugin-laravel
- community
Checking that the SKILL.md file is still in the repository.
Review pull requests in psalm-plugin-laravel (the Psalm plugin for Laravel). Use when reviewing any PR or diff that touches stubs/ (.phpstub), src/Handlers/, src/Issues/, tests/Type/ (.phpt), taint annotations (@psalm-taint-*), or composer.json version constraints. Adds the review-only checks that the repository guide does not spell out, and the list of things not to flag.
Install
npx vskill@latest install psalm/psalm-plugin-laravel/code-reviewSKILL.md
Code review for psalm-plugin-laravel
The repository guide already loaded for this review holds the hard rules and code patterns; apply them as written. This file adds only what a reviewer needs on top.
This branch is 4.x: Psalm 7, Laravel 12 and 13 (exact constraints: composer.json). Fixes that also apply to Psalm 6 are backported to 3.x.
Procedure
- Classify every changed file: stub, handler, issue class, type test, unit test, taint annotation, docs, CI.
- Verify every claim about Laravel or Psalm behavior against
vendor/laravel/framework/orvendor/vimeo/psalm/source, never against memory or Laravel's own PHPDoc. - Report a finding only when you can name the concrete input that breaks and the smallest fix.
Stubs
- A method typed in
stubs/common/must exist with that signature on every supported Laravel major (12, 13). Newer-only behavior belongs instubs/<version>/. - A
@paramnarrower than what Laravel accepts causesArgumentTypeCoercionfalse positives. Compare against the Laravel source signature. - Never
@psalm-seal-methodson Model, Builder, Relation, or Collection: it blocks__callre-dispatch.
Handlers
- Handlers depend on Psalm APIs and Laravel knowledge, not on each other. Flag a handler importing another handler.
- Flag static state on
ClassLikeStorage::$custom_metadataholding non-scalar values: it does not survive forked workers.
Taint annotations
- Annotations added to an underlying class (for example
Connection) must also appear on the facade stub (DB), and vice versa. - Generated alias stubs (
aliases.phpstub, bareclass X extends Y {}) carry no taint annotations; a fix that relies on them is incomplete. - A full-class taint stub for a class reached only through a return-type-provider narrowing (
auth('web'),app('encrypter')) becomes the sole class definition and strips every non-stubbed method. That case needs a scan-phase handler on the realMethodStorage.
Type tests
@psalm-check-type-exactfires only as an inline statement-attached docblock. It is dead inside a method or class docblock.- Namespaced phpt code needs a leading backslash on class names, and every class used by
check-type-exactmust be imported. --EXPECTF--with%Ais a lower bound and cannot assert an exact count or absence. Negatives need a separate test with an empty--EXPECT--.- Reuse the model archetypes in
tests/Application/app/Models/before declaring inline models; inline models break scope calls aterrorLevel=1.
Error handling
- Failed stub generation, Laravel app boot, or model and facade discovery must produce a visible warning through
src/Internal/InternalErrorReporter.php, never silent degradation. - Flag
catch (\Throwable)orcatch (\Exception)broader than the failure mode it guards.
Do not flag
- Formatting, import order, spacing, and other output of
composer csorcomposer rector. - Unit test method names that are not camelCase.
@psalm-prefixed docblocks that duplicate a@var: Rector strips the plain form, the prefixed form is intentional.- Anything already reported by CI (Psalm self-analysis, PHPUnit, actionlint, spelling).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/code-review/SKILL.md
Popularity
- Repository stars
- 341
- Repository forks
- 80
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/psalm/psalm-plugin-laravel/code-review)