magento2-linter

magento2-linter is a skill for Claude Code from ddtcorex/maestro-skills. It costs 126 tokens per session (8,890 once invoked), scanned A, original, MIT.

An automated checker for Magento 2 code quality and coding standards. It uses tools that inspect formatting, types, possible errors, and some unsafe code patterns.

In plain words
What is it for?
Use it to check modules and custom code, run PHP coding-standard checks, perform PHPStan static analysis, find code smells or unused code, and audit security-related issues.
Why use it?
It finds problems early and provides a repeatable quality check before code is released.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex; mentions OpenCode.

Part of the maestro-skills plugin — 31 skills shipped together

Good fit Use it to check modules and custom code, run PHP coding-standard checks, perform PHPStan static analysis, find code smells or unused code, and audit security-related issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ddtcorex/maestro-skills/magento2-linter
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 ddtcorex/maestro-skills --skill magento2-linter
Clone the repo
git clone --depth 1 https://github.com/ddtcorex/maestro-skills

Made for: Claude Code.

Or install maestro-skills, the plugin that ships this one along with the rest of its 31 skills.

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 magento2-linter

README.md
[![agentmods](https://agentmods.dev/badge/skills/ddtcorex/maestro-skills/magento2-linter/github.svg)](https://agentmods.dev/skills/ddtcorex/maestro-skills/magento2-linter)
Your own site
<a href="https://agentmods.dev/skills/ddtcorex/maestro-skills/magento2-linter"><img src="https://agentmods.dev/badge/skills/ddtcorex/maestro-skills/magento2-linter/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 magento2-linter

Your own site · 80×15
<a href="https://agentmods.dev/skills/ddtcorex/maestro-skills/magento2-linter"><img src="https://agentmods.dev/badge/skills/ddtcorex/maestro-skills/magento2-linter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,890 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.00126 $0.08890
Opus 5 $0.00063 $0.04445
Sonnet 5 $0.00025 $0.01778
Haiku 4.5 $0.00013 $0.00889

Measured today against content hash 4121d4fdb030, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

magento2-linter 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 today.

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/magento2-linter/SKILL.md · 696 lines

How it starts

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

Magento 2 Linter

This skill runs automated code quality checks to verify Magento 2 coding standards compliance.

REQUIRED BACKGROUND: Load magento2-dev-core first — this skill validates code against the coding/security standards that skill defines, and its patterns are what you fix findings with.

Part of the QA trio with magento2-security-scan (deeper vulnerability scanning) and magento2-performance-audit (runtime/infrastructure checks) — run all three before a release. Fix findings using the patterns in magento2-dev-core (or the relevant frontend/backend/Hyvä skill).

Govard-Native Lint Audit Is the Real Gate

govard audit run --checks lint is Govard's persistent, native lint gate for Magento 2 projects and modules, and running it for real is a required step before telling a user a branch is "verified" or "ready to push" — not an optional nice-to-have. Govard v1.64.0 implements two audit checks: lint (PHPCS + PHPStan + the pub/media PHP guard) and profiler (captures the Magento stock profiler CSV through the project's own web server — see "The lint run's pub/media PHP guard" below for the guard, and step 2 for the profiler command); any other --checks value is rejected. A bare local vendor/bin/phpcs/ phpstan invocation (see "Scoping" below) is a fast pre-check to catch obvious problems early — it is not proof the branch is clean, because it can diverge from the native toolchain run in either direction (see "Local Bare-Tool Runs Can Diverge from the Native Toolchain" below). Never substitute a bare-tool "0 errors" for a real govard audit run, and never present local-only results as if they were the real gate having passed.

Work through the audit in this order:

  1. Resolve target. --mode (auto, project, module_in_project, or standalone) picks what gets analyzed; auto (the default) classifies the current directory itself — no flag needed for the common case:
    • project: current directory is a Magento project root (bin/magento plus a Magento Composer requirement) with no enclosing module — the whole project is analyzed.
    • module_in_project: current directory is a module (etc/module.xml, or a Composer package of type magento2-module) inside a Magento project — only the module is analyzed, with the whole project mounted read only so its autoloader resolves correctly.
    • standalone: current directory is a module with no Magento project anywhere above it — only the module is analyzed, with its dependencies installed into a scratch worktree. --mode project / --mode module_in_project / --mode standalone all force that classification and fail outright when the directory doesn't support it — useful to catch a misresolved auto guess rather than silently linting the wrong scope.
  2. Run it: govard audit run --checks lint (lint is already the default --checks value, so plain govard audit run is equivalent). Add ,profiler plus a --url to also capture a page-profile artifact — govard audit run --checks lint,profiler --url https://<domain>/ — and note that a bare govard audit rerun --session <id> repeats the latest run's check selection, profiler URL included. In --format text (the default) Docker logs stream live (phase start/end, cache state, glint: php X.Y analyzed) and findings are colorized + uncapped on a TTY (piped stays plain + capped at 10); in --format json stdout is a single machine-clean object, diagnostics go to stderr -- keep json for agents, text for humans. A FAILED/CANCELLED run still prints the full summary before exiting non-zero.
  3. For standalone iteration only, optionally narrow the PHP matrix with --php 8.1,8.4. --php on project/module_in_project targets is only accepted when it repeats the project's own active stack.php_version — it can't widen or narrow those targets' single-version run.
  4. Treat these outcomes distinctly — none of them means "clean code" except the last:
    • unsupported_php — the requested PHP version isn't valid for this target (see "PHP versions" below); no container ran.
    • infra_error — a pull/build/Docker/dependency-resolution/report-schema failure. The run never produced a real lint result; never present this as "no findings." For a standalone target, a dependency-resolution failure while pulling a private Git/Composer dependency is a common cause — see "Standalone Composer Packages Need Isolated Verification" below for the --allow-lint-ssh-agent remedy.
    • cancelled — the run was stopped before completing; not a pass.
    • lint findings — PHPCS/PHPStan findings on an otherwise-completed run. This is the actual signal to act on. Only a completed run with zero findings is a clean result.
  5. If the team has configured an external provider (audit.lint.external_providers in the project config), run it explicitly as an additional policy gate, not a substitute for the native run: govard audit run --lint-provider team-citeam-ci here is just an example name; --lint-provider takes the provider's name directly, and that name and its definition come entirely from the project's own config (there's no bundled vendor-specific provider, and no separate flag for it). An external provider is never inferred and never a fallback for the native backend: an unknown --lint-provider name is an error, and a native failure stays a native failure. A standalone target has no project configuration to source audit.lint.external_providers from, so govard is the only provider available there.
  6. Never describe a host-project approximation as standalone matrix proof. Running bare vendor/bin/phpcs/phpstan against a module nested inside a large host project is a fast local pre-check, not evidence of what an isolated standalone matrix run would find — the host project's own vendor//generated/ can hide or fabricate results in either direction (see the isolation notes under "Standalone Composer Packages" below). If the module qualifies as standalone, govard audit run is the authoritative check; fall back to a manual isolated install only when Govard itself isn't available.

Read the full file on GitHub · 696 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. today Changed · +7 lines 4121d4fdb030
  2. 7d ago Changed 0e03955fdc9f
  3. 11d ago First seen · 689 lines · 126 tokens per session scan A bfc4140ebcd1

Subscribe to this mod's changes

magento2-linter is a skill published in the GitHub repository ddtcorex/maestro-skills (4 stars, last pushed today), licensed MIT. It adds 126 tokens to every session and 8,890 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

postmortem

Auto-generates a structured postmortem from a completed campaign. Reads the campaign file, telemetry logs, and feature ledger. Produces a documented analysis of what broke, what the safety systems caught, and what patterns emerged. Can also be invoked manually for any incident.

SethGammon/Citadel · 58 tokens

systematic-debugging

4-phase root cause analysis: observe, hypothesize, verify, fix. Enforces investigation before any code changes. Emergency stop after 2 failed fixes. Prevents shotgun debugging and fix cascades.

SethGammon/Citadel · 45 tokens

superloopy-doctor

Use when diagnosing Superloopy doctor, install, wrapper, plugin cache, hook bootstrap, bundled agents, marketplace, Codex, Claude Code, stale-version, evidence-floor, or host-wiring health problems.

beefiker/superloopy · 48 tokens

ambient-project

Quietly maintain a useful project view from meaningful work in the current Codex session. Use when work creates a task, bug, decision, idea, risk, milestone, plan, progress update, or explicit completion.

Bene-2020/plane-codex-mcp · 46 tokens

zapier-status

Check the health of your Zapier MCP setup. Three modes — health check (dashboard view), audit (find waste and duplicates), diagnose (systematic troubleshooting). Use when asking "is my MCP working?", "check my tools", "audit my setup", "what's broken?", or "zapier status".

zapier/zapier-mcp · 66 tokens

codex-slides-known-errors

Diagnose and recover from Codex Slides plugin, MCP, Browser handoff, local runtime, durable run, project resume, rendering, Design Files, export, and version-contract failures. Use when a tool fails, a run stalls, a project appears stale, or Codex and the Browser disagree.

nexu-io/codex-slides · 67 tokens