magento-php-specialist

Enforce PSR-12 and Magento coding standards in PHP code with strict types and modern features.

26|4|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/maxnorm/magento2-agent-skills --skill magento-php-specialist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: magento-php-specialist
Source: https://github.com/maxnorm/magento2-agent-skills/tree/main/skills/magento-php-specialist
Command: npx skills add https://github.com/maxnorm/magento2-agent-skills --skill magento-php-specialist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintains high-quality Magento 2 PHP code by enforcing PSR-12, strict types, and Magento coding standards across projects, reducing defects and improving maintainability.

Core Features & Use Cases

  • PSR-12 Compliance & Magento Standards: Ensure consistent structure, typing, and modern PHP features across codebases.
  • Enterprise-Ready Patterns: Promote use of SOLID principles, DI, repositories, and service contracts in Magento modules.
  • Guided Quick Starters: Provide ready-to-use skeletons and validation rules for new code, boosting velocity.

Quick Start

Implement a Magento 2 PHP class that adheres to PSR-12 and Magento coding standards.

Frequently Asked Questions about magento-php-specialist

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

FAQPage Schema
How do I enforce Magento 2 PHP coding standards and PSR-12 in my modules?

To enforce Magento 2 PHP coding standards and PSR-12, you need to apply strict typing, constructor property promotion, and SOLID principles. This ensures consistent structure and modern PHP practices across your enterprise modules.

What is the best way to structure Magento 2 business logic using modern PHP features?

The best way to structure Magento 2 business logic involves using service contracts, dependency injection, and repositories. Implementing modern PHP features like type hints and declare(strict_types=1) ensures high maintainability and reduces defects.

Does this approach require declare(strict_types=1) for Magento 2 development?

Yes, enforcing Magento 2 PHP standards requires declare(strict_types=1). It mandates strict type checking and pairs with constructor property promotion and type hints to guarantee enterprise-grade code quality and structural integrity.

Can I use service contracts and dependency injection for enterprise-ready Magento 2 patterns?

Yes, you can and should use service contracts and dependency injection for enterprise-ready Magento 2 patterns. Promoting SOLID principles alongside PSR-12 compliance ensures your module's business logic is scalable and maintainable.

How do I start implementing a Magento 2 PHP class that adheres to strict coding standards?

To start implementing a Magento 2 PHP class that adheres to strict coding standards, use ready-to-use skeletons and validation rules. Apply PSR-12 compliance, type hints, and Magento coding standards to boost development velocity.