magento-php-specialist

magento-php-specialist is a skill for Claude Code, Codex from maxnorm/magento2-agent-skills. It costs 57 tokens per session (916 once invoked), scanned A, original, MIT.

A coding guide for writing PHP for Magento 2, following PSR-12 and Magento's coding standards. PHP is the server-side programming language used by Magento, while PSR-12 is a common set of PHP formatting rules.

In plain words
What is it for?
Use it to write Magento PHP modules and business logic, apply strict typing and type hints, follow formatting rules, and review code structure and comparisons.
Why use it?
It helps keep Magento code consistent, typed, and compatible with the project's conventions. It also guides business logic, object-oriented code, design patterns, and modern PHP features.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write Magento PHP modules and business logic, apply strict typing and type hints, follow formatting rules, and review code structure and comparisons.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maxnorm/magento2-agent-skills/magento-php-specialist
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maxnorm/magento2-agent-skills --skill magento-php-specialist
Clone the repo
git clone --depth 1 https://github.com/maxnorm/magento2-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for magento-php-specialist

README.md
[![agentmods](https://agentmods.dev/badge/skills/maxnorm/magento2-agent-skills/magento-php-specialist/github.svg)](https://agentmods.dev/skills/maxnorm/magento2-agent-skills/magento-php-specialist)
Your own site
<a href="https://agentmods.dev/skills/maxnorm/magento2-agent-skills/magento-php-specialist"><img src="https://agentmods.dev/badge/skills/maxnorm/magento2-agent-skills/magento-php-specialist/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for magento-php-specialist

Your own site · 80×15
<a href="https://agentmods.dev/skills/maxnorm/magento2-agent-skills/magento-php-specialist"><img src="https://agentmods.dev/badge/skills/maxnorm/magento2-agent-skills/magento-php-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.00916
Opus 5 $0.00028 $0.00458
Sonnet 5 $0.00011 $0.00183
Haiku 4.5 $0.00006 $0.00092

Measured 10d ago against content hash 55ed30354919, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

magento-php-specialist scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/magento-php-specialist/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Magento 2 PHP Specialist

Expert specialist in leveraging advanced PHP techniques and modern practices to create high-performance, maintainable Magento 2 applications following enterprise development standards.

When to Use

  • Writing PHP code for Magento 2
  • Implementing business logic
  • Ensuring code quality and standards
  • Working with modern PHP features
  • Implementing design patterns

PHP Standards (STRICT ENFORCEMENT)

PSR-12 Compliance

  • PSR-12: Strictly adhere to PSR-12 coding standards
  • Magento2 Coding Standard: Follow standards in vendor/magento/magento-coding-standard/Magento2
  • Strict Types: declare(strict_types=1); required
  • EditorConfig: Check project's .editorconfig for indentation (4 spaces), line endings (LF), encoding (UTF-8)

Code Structure Requirements

  • Opening Braces: Classes and methods must have opening braces on their own line (PSR-12)
  • Constructor Property Promotion: Use with readonly modifier where appropriate
  • Type Hinting: All parameters and return types must be type-hinted
  • Strict Comparisons: Always use === and !== (never == or !=)
  • Constructor PHPDoc: Must include @param annotation for each parameter

Modern PHP Features

  • Constructor Property Promotion: Use constructor property promotion
  • Readonly Properties: Use readonly modifier where appropriate
  • Union Types: Use union types for flexible type hints
  • Match Expressions: Use match expressions instead of switch when appropriate
  • Named Arguments: Use named arguments for clarity

Code Example

<?php

/**
 * Copyright © 2025 CompanyName. All rights reserved.
 */

declare(strict_types=1);

namespace CompanyName\ModuleName\Model;

use CompanyName\ModuleName\Api\ConfigInterface;
use CompanyName\ModuleName\Api\RepositoryInterface;

class Service
{
    /**
     * @param RepositoryInterface $repository
     * @param ConfigInterface $config
     */
    public function __construct(
        private readonly RepositoryInterface $repository,
        private readonly ConfigInterface $config
    ) {
    }

    /**
     * @param int $id
     * @return EntityInterface|null
     */
    public function getById(int $id): ?EntityInterface
    {
        if ($id <= 0) {
            return null;
        }

        return $this->repository->getById($id);
    }
}

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 112 lines · 57 tokens per session scan A 55ed30354919

Subscribe to this mod's changes

magento-php-specialist is a skill published in the GitHub repository maxnorm/magento2-agent-skills (29 stars, last pushed 7mo ago), licensed MIT. It adds 57 tokens to every session and 916 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

xml-config-migrating

Use this skill when a Shopware plugin or app-server extension needs its XML configuration migrated to PHP — phrases like "migrate services.xml", "convert my plugin config to PHP", "xml to php migration", "fix the XML deprecation", "prepare my plugin for Shopware 6.8 / Symfony 8", or when a deprecation like "The XML…

shopwareLabs/ai-coding-tools · 106 tokens

php-dev-core

This skill should be used when the user is writing generic PHP, creating a Composer package, working with PSR-4/PSR-12, running PHPStan/PHPCS, handling PHP security, or building framework-agnostic PHP logic. Foundation skill for PHP development. DEPENDENT on govard-toolbox for environment commands.

ddtcorex/maestro-skills · 74 tokens

govard-laravel

This skill should be used when the user asks to "run migrations", "run artisan commands", "clear Laravel cache", "config:cache", "run queue operations", "schedule:run", "tinker into app", "artisan tinker", "run Laravel Pint", "lint Laravel project", "audit Laravel", "govard audit", or "npm dev/prod". Provides…

ddtcorex/maestro-skills · 103 tokens

hyva-create-module

Create a new Magento 2 module in app/code/. This skill should be used when the user wants to create a module, scaffold a new module, generate module boilerplate, or set up a custom module. It handles registration.php, composer.json, module.xml generation with configurable dependencies. Trigger phrases include "create…

hyva-themes/hyva-ai-tools · 82 tokens

plugin-init

Create a new Sylius plugin from the official PluginSkeleton with Docker environment.

Guiziweb/guiziweb-plugins · 17 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens