with one click
php-quality
PHP code quality: PSR standards, strict types, framework idioms.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
PHP code quality: PSR standards, strict types, framework idioms.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Planning lifecycle: specs, requirements, pre-plan ambiguity resolution, file-backed plans, plan validation, pause/resume, session handoff.
Fresh-subagent-per-task execution with two-stage review gates.
Comprehensive 3-wave review of all repo source files, producing a prioritized issue backlog.
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Customer support workflows — ticket triage, response drafting, knowledge base articles, escalation handling, customer research. Use when triaging support tickets, drafting customer responses, creating KB articles, managing escalations, or researching customer context.
Finance and accounting: journal entries, reconciliation, variance analysis, financial statements, audit support, month-end close, SOX testing.
| name | php-quality |
| promoted_to | php |
| description | PHP code quality: PSR standards, strict types, framework idioms. |
| user-invocable | false |
| context | fork |
| agent | php-general-engineer |
| routing | {"triggers":["php quality","php code review","PSR standards","phpstan","php-cs-fixer"],"category":"php","pairs_with":["php-testing","code-linting"]} |
PHP code quality enforcement: strict types, PSR-12 compliance, modern language features, framework idioms, and static analysis tooling.
| Signal | Reference | Size |
|---|---|---|
| union types, intersection types, DNF, enums, readonly, named arguments, match expression, null-safe operator, PHP 8.0, PHP 8.1, PHP 8.2 | references/modern-php-features.md | ~160 lines |
| Laravel, Eloquent, Collections, Service Container, Symfony, DI attributes, Event Dispatcher, framework | references/framework-idioms.md | ~70 lines |
| PHP-CS-Fixer, PHPStan, Psalm, Rector, static analysis, CI, linting, code style, taint analysis | references/quality-tools.md | ~60 lines |
Load greedily. If the user's question touches any signal keyword, load the matching reference before responding. Multiple signals matching = load all matching references.
Every PHP file must begin with declare(strict_types=1). This enforces scalar type coercion rules, catching type errors at call time instead of silently converting values.
<?php
declare(strict_types=1);
// Without strict_types: strlen(123) silently returns 3
// With strict_types: strlen(123) throws TypeError
This is non-negotiable. Omitting it is a code quality defect.
PSR-12 extends PSR-1 and PSR-2 as the accepted PHP coding style. Key rules:
use statements after namespace with a blank line before and afterDetermine what kind of PHP quality review is needed:
| Request type | Load references | Action |
|---|---|---|
| Code review | All three | Full quality pass |
| Type system question | modern-php-features.md | Feature-specific guidance |
| Framework patterns | framework-idioms.md | Idiomatic pattern review |
| Tooling setup | quality-tools.md | Config and CI guidance |
Gate: Request classified and relevant references loaded.
Apply loaded reference knowledge to the user's code or question. Every review checks:
declare(strict_types=1) presentGate: Specific, reference-backed feedback provided.