ddtcorex/maestro-skills/magento2-performance-audit

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill should be used when the user asks to "audit performance", "check Core Web Vitals", "run Lighthouse", "check server configuration", "verify Redis/Varnish setup", "analyze database queries", "find N+1 query issues", "review indexer configuration", "check cron health", "debug cache flush", asks "why does full_page cache keep flushing", wants to "trace FPC invalidation", or reports "too many ajax requests", a "customer data section reload storm", or a "crawler overloading server". Performs a comprehensive performance and health audit for Magento 2 projects against Adobe Commerce Best Practices. DEPENDENT on magento2-dev-core for code-level performance patterns.

Install

npx vskill@latest install ddtcorex/maestro-skills/magento2-performance-audit

SKILL.md

Magento 2 Performance Audit

This skill performs a comprehensive audit of Magento 2 performance, infrastructure, and code-level patterns.

Govard-Native Audit Coverage

govard audit run executes PHPCS and PHPStan through Govard's pinned lint toolchain image — it covers coding-standard and static-analysis findings only. As of Govard v1.64.0 no performance audit check exists: govard audit run --checks performance fails with "audit check ... is not implemented". Govard v1.64.0 does add a native profiler check (--checks lint,profiler --url <url>) that machine-captures the stock profiler CSV for one URL — a quick complement to this skill's manual per-page audit, not a replacement: it ships no query log, no cross-page matrix, and no threshold analysis. The profiler requires a project target (not standalone), an absolute http(s) URL (the request carries Accept: text/html so stock Magento enables the CSV), and is guarded by a per-project diagnostics lease; the CSV lands as artifacts/profiler/profile.csv with its SHA in audit-result.json — open it as spreadsheet to read per-timer costs. Manual per-page captures (7 pages) cost ~2.5-3 min on their own (50k queries/page with call-stack, 16-26s each) — the full deep audit around them takes far longer, ~22m observed, see the observed floor above. Keep all 7, run with 300s timeout or background polling and trap restore, not by sampling fewer categories (that hides per-item N+1s). Keep running this checklist yourself and treat govard audit run --checks lint as the shared lint gate. Never present a lint-only pass as a performance verdict.

This is a checklist, not a menu. All 9 steps under Workflow (bottom of this file) run on every invocation — infra, indexer/cron, per-page-type capture, Slow Query Analysis, Cache Invalidation Efficiency, Client-Side AJAX Load, Core Web Vitals, code-level grep, report. Picking the steps that feel highest-signal for the effort and quietly dropping the rest (no admin creds, no Chrome DevTools MCP, "I already found a good bug") is the single most common failure mode of this skill — it produces a confident, well-formatted report that silently covers less than half the checklist. If a step genuinely can't run, say so in the report, under that step's own heading — Skipped: <reason> — never by omission. See the self-verification gate at the end of Workflow: the report is not done until it's been checked against the Audit Report Template line by line.
Distinguish a scoped ask from an unscoped one — this rule governs dropping steps quietly, not answering a narrower question. A general ask — "audit performance", "review this project before launch" — is unscoped: all 9 steps apply, none optional, exactly as above. When the user's own words name one specific category instead ("just check the MySQL query count", "audit N+1s only", "how many queries does the homepage run"), scope the work to that category and its reference file(s) — running the other 8 steps anyway would be answering a different question than the one asked. The obligation that carries over unchanged: state the scope explicitly (a "Scope" line/heading in the report) so the result is never mistaken for a full audit, and don't let scope creep run in either direction — no silently expanding a scoped ask back to all 9 steps, and no silently narrowing an unscoped one down to whichever step already found something.
Read the step's reference file before the first attempt at that step — not after improvising fails. Each "Full detail:" link owns its supported commands and environment traps: BusyBox grep inside govard sh, host/container DNS, Laminas renames, and DB privilege walls. If two attempts at a step fail, read that reference end to end before attempt 3. Never hand-edit app/etc/env.php to enable a diagnostic: it is deployment configuration, not an audit control surface; a syntax error takes every Magento CLI command down and cannot be reverted with git checkout when the file is gitignored.
Shared query-log captures require ownership. Before step 3, acquire the .performance-audit.lock session token described in references/database-query-profiling.md. A busy or foreign lock must fail-fast; do not remove a lock you do not own or treat its log as evidence.
Common ways this gets shortcut (don't)
RationalizationReality
"Infra/cache/indexer checks already give strong signal, that's enough"Slow Query Analysis, Cache Invalidation Efficiency, and Client-Side AJAX Load each catch bug classes the others structurally cannot see — one being clean says nothing about the others
"I already found a solid N+1, that's enough for a report"A real finding proves the audit found something; it doesn't prove the mandatory steps ran. Finding a bug early is not a reason to stop the checklist
"One category and one product page is representative enough"Only 3 differently-sized samples per type can surface the size-scaling N+1 signal (references/per-page-type-audit.md) — a single sample is provably unable to show it, however clean the one page looks
"This step needs admin credentials / a Chrome DevTools MCP I don't have"Mark that section unverified with the reason, in the report — don't drop it from the conversation as if it were never in scope
"The draft report already has good findings, ship it"Diff the draft against every checkbox in the Audit Report Template before presenting it as done — an unchecked box with no skip reason means the audit isn't finished, not that it's fine to omit
"This query shape (or profiler timer) repeats/is slow but I don't think it's a real bug"Not your call to make silently — list it in the Repeated Query Shapes or Slowest Blocks/Templates table (references/report-template.md) with your assessment anyway. A borderline case left out of the report is indistinguishable from one that was never checked
"The user only asked about query counts, so I only ran that"Correct if their own words named that one category — say so under a Scope heading. If their ask was general ("audit performance", "review this project"), this is the same shortcut as the rows above, just dressed up as scoping
"There's no dev:profiler:enable / dev:query-log:enable flag, so I'll add one to env.php / patch a bootstrap script"These are CLI diagnostics, not config flags. Use the exact commands in references/database-query-profiling.md and references/per-page-type-audit.md; never edit env.php or add a one-off bootstrap script
"The reference's grep recipes don't work in govard sh, so I'll write my own"The container's grep is BusyBox — no --include. find app/code -name '*.php' -exec grep -Hn ... {} + is the supported equivalent (recipes in references/code-level-patterns.md are already BusyBox-safe)

Related Skills

REQUIRED BACKGROUND: Load magento2-dev-core first — code-level fixes for N+1 queries and heavy constructors follow the patterns it defines.

Part of the QA trio with magento2-linter and magento2-security-scan — together with magento2-dev-core, these form the "QA quartet" that magento2-code-review orchestrates at PR/module/theme/project scope. Findings use the shared M2-PERF-xxx codes cataloged in magento2-dev-core/references/severity-and-codes.md. Async/queue findings often point back to magento2-backend-dev.

Audit Categories

Nine categories, each with full commands/thresholds/edge-cases in its own reference file — read the relevant file when executing that step of the Workflow below, not all up front:

CategoryReference
Infrastructure, cache, indexer, async consumers, asset optimization, cron, security probesreferences/infrastructure-checks.md
Core Web Vitals (LCP/INP/CLS, Chrome DevTools MCP trace, Lighthouse fallback)references/core-web-vitals.md
Database query profiling: query-count tiers, query log setup, common issues, Slow Query Analysisreferences/database-query-profiling.md
HTML profiler: block/template timing, tracing custom-code cost, cross-page-type signalsreferences/html-profiler-audit.md
Per-page-type audit (homepage + 3 category + 3 product samples, uncached)references/per-page-type-audit.md
Cache invalidation efficiency (built-in FPC debug log + Varnish BAN tracing)references/cache-invalidation-audit.md
Client-side AJAX/Customer Data load (sections.xml, reload storms)references/ajax-load-audit.md
Code-level performance patterns (N+1, collection counting, heavy constructors, cache invalidation code)references/code-level-patterns.md
Audit report template + self-verification checklistreferences/report-template.md

Quick / Deep — scope param (quick vs deep, quick 5–10m vs deep 20–30m)

This skill accepts a scope param: quick (PR check, cap 5–10m) or deep (release audit, 20–30m). The value quick.*deep on one line is intentional for tooling checks — keep the param name scope with those two literal values. Default to deep when the caller does not specify; callers that need a fast PR signal pass scope=quick.

Observed floor (reference large-project audit, verified 2026-09-21, deep scope): ~22m / 144 tool calls / ~332k tokens for the whole audit — setup, 7 captures, both passes, analysis, and report writing. Captures alone are only ~2.5–3 min of that (see references/per-page-type-audit.md); the rest is reading, cross-page analysis and the report. Use the total for the foreground/background + budget decision; it is an observation, not a commitment.

Report header (mandatory): every report starts with Scope: quick or Scope: deep on its first line (see references/report-template.md). Quick uses Scope: quick — 3 pages (1 home + 1 category + 1 product), Deep uses Scope: deep — 7 pages (1 home + 3 category small/medium/large + 3 product). Do not start a report without that line — it is how a reader tells PR vs release coverage at a glance.
ModePagesQuery-log call-stackQuery-time thresholdFiles scopegrid_per_pageTime capTransport & restore
quick3 pages small/medium/large (1 home + 1 category + 1 product) — call-stack false — threshold 1 — quick files — grid_per_page 48 — cap 5–10m--include-call-stack=false--query-time-threshold=1quick files (app/code + app/design + app/etc sampled, batch govard sh)485–10mgrep -c '## QUERY' recipes; batch govard sh single setup cmd; trap single
deep7 pages double-pass (1 home + 3 category small/medium/large + 3 product) — call-stack true — threshold 0 — deep files — 20–30m--include-call-stack=true (two-pass: pass 1 false for counts, pass 2 true for 1–2 traces)--query-time-threshold=0deep files (full app/code + vendor/dev/lib/m2-hotfixes to the ignore boundary)prod grid_per_page/list_per_page20–30mSame native-or-grep split; batch govard sh where possible; trap single (one trap ... EXIT for the whole session)

Key verbatim mapping for quick 3 pages small/medium/large call-stack false threshold 1 quick files grid_per_page 48 cap 5–10m vs deep 7 pages double-pass call-stack true threshold 0 deep files 20–30m — keep these values in sync with references/per-page-type-audit.md and references/database-query-profiling.md.

Use the recipes, not hand-reading: do not open 50k lines of var/debug/db.log as a spreadsheet. Use the grep -c '## QUERY' / mysqldumpslow / pt-query-digest recipes in references/database-query-profiling.md. For lint use govard audit run --checks lint --format json on the host.
No stats tool exists for the query log. Do not hand-grep 16–50k lines; use the grep -c '## QUERY' / mysqldumpslow recipes below.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
Repository forks
2
Repository npm downloads, 7 days
314
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 10 Oct 2026, 13 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ddtcorex/maestro-skills/magento2-performance-audit/badge)](https://verified-skill.com/skills/ddtcorex/maestro-skills/magento2-performance-audit)

Something wrong with this skill or its page? Tell us.