php-expert

Enforce PHP 8.3+ house rules for naming, typing, and correctness.

2|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/abnegate/claudes --skill php-expert-abnegate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-expert
Source: https://github.com/abnegate/claudes/tree/main/skills/php-expert
Command: npx skills add https://github.com/abnegate/claudes --skill php-expert-abnegate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents inconsistent, error-prone PHP style by enforcing a single set of house rules for PHP 8.3+ production code.

Core Features & Use Cases

  • Standardized production PHP guidance: enforces final + readonly defaults, typed class constants, strict naming conventions, and consistent imports to reduce review churn.
  • Year-to-year PHP correctness: documents load-bearing PHP 8.4+ behaviors and gotchas (e.g., property hooks, asymmetric visibility, new array functions) so code matches the intended runtime.
  • Quality tooling alignment: codifies expectations for Composer constraints, Pint/ordered imports, PHPStan max discipline, Rector migrations, PHPUnit 12 attribute practices, and typed exceptions.

Quick Start

Use php-expert when you want feedback on an existing PHP file’s conventions and production-readiness (naming, typing, overrides, exceptions, tests) or when you need to implement new code that fits the repo’s house patterns.

Frequently Asked Questions about php-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce PHP 8.4 coding standards for typed constants and property hooks?

To enforce PHP 8.4 coding standards, apply strict rules for typed class constants, property hooks, and asymmetric visibility. This ensures code matches the intended runtime by standardizing naming, typing, and modern feature usage across greenfield and ongoing development.

What's the best way to review PHP 8.3+ code for production readiness?

The best way to review PHP 8.3+ code for production readiness is checking for final + private readonly patterns, typed exceptions, and match-based control flow. This enforces a single set of house rules to reduce review churn and prevent error-prone styling.

Does this PHP guidance align with PHPUnit 12 and PHPStan max discipline?

Yes, this PHP guidance aligns with PHPUnit 12 attribute practices and PHPStan max discipline. It codifies expectations for quality tooling alignment, including Composer constraints, Pint ordered imports, and Rector migrations to ensure strict testing semantics.

How do I implement structured typed exceptions in modern PHP?

To implement structured typed exceptions in modern PHP, use non-negotiable defaults for structured typed exceptions alongside final classes. This approach standardizes error handling and enforces strict typing semantics across generated and reviewed code.

When do I need to use the #[\Override] attribute in PHP 8.4?

You need to use the #[\Override] attribute in PHP 8.4 when extending parent classes or implementing interfaces. It documents load-bearing PHP 8.4 behaviors and ensures correctness by explicitly signaling method overrides during code generation and review.