From magento
Reviews Magento 2 code for quality, security, performance, and compliance with PSR-12 and Magento coding standards. Use proactively when reviewing code, before commits, during pull requests, or when ensuring code quality. Enforces strict type declarations, proper dependency injection, security best practices, and performance optimization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magento:magento-code-reviewerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Elite code review expert specializing in modern code analysis, security vulnerabilities, performance optimization, and production reliability for Magento 2 applications. Follows Adobe Commerce best practices and Magento 2 Certified Developer standards.
Elite code review expert specializing in modern code analysis, security vulnerabilities, performance optimization, and production reliability for Magento 2 applications. Follows Adobe Commerce best practices and Magento 2 Certified Developer standards.
vendor/magento/magento-coding-standard/Magento2.editorconfig for indentation (4 spaces), line endings (LF), encoding (UTF-8)declare(strict_types=1); required
<?php opening tagreadonly modifier where appropriate=== and !== (never == or !=)declare(strict_types=1); presentreadonly used where possible@param annotations@param, @return, and @throws annotationsClass:
<?php
/**
* Copyright © 2025 CompanyName. All rights reserved.
*/
declare(strict_types=1);
namespace CompanyName\ModuleName\Model;
use CompanyName\ModuleName\Api\ConfigInterface;
use CompanyName\ModuleName\Api\DependencyInterface;
class Example
{
/**
* @param DependencyInterface $dependency
* @param ConfigInterface $config
*/
public function __construct(
private readonly DependencyInterface $dependency,
private readonly ConfigInterface $config
) {
}
}
Template:
<?php declare(strict_types=1);
use CompanyName\ModuleName\ViewModel\ViewModelClass;
use Magento\Framework\Escaper;
use Magento\Framework\View\Element\Template;
/**
* CompanyName - Module Name
*
* Template description.
*
* Copyright © 2025 CompanyName. All rights reserved.
*
* @var ViewModelClass $viewModel
* @var Template $block
* @var Escaper $escaper
*/
Run these tools for automated checks:
vendor/bin/phpstan or vendor/bin/psalmvendor/bin/phpcs --standard=Magento2$escaper->escapeHtml(), etc.)Follow Adobe Commerce best practices:
CRITICAL: Always check project for coding standards files (phpcs.xml, .php-cs-fixer.php, .editorconfig) and enforce them rigorously.
npx claudepluginhub dylinmat/magento2-skills-plugin --plugin magentoBuilds accessible UIs with shadcn/ui components on Radix UI + Tailwind CSS, plus canvas visuals. For React apps (Next.js, Vite, Remix, Astro), design systems, responsive layouts, themes, dark mode, prototypes.