/eds-content-ops:cwv-optimizerfrom eds-content-ops
Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and INP issues with before/after projections.
Ships in eds-content-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages using EDS-specific domain knowledge — the 100KB LCP budget, the Eager-Lazy-Delayed loading phases, block architecture, the createOptimizedPicture() function, and the scripts/delayed.js pattern. Produces specific, implementable fixes with estimated impact projections, not generic performance advice.
This skill fetches external web pages for analysis. When fetching:
optel-interpreter first, then come here for fixes).optel-interpreter — Identifies CWV problems from real user data; use this skill to fix them.performance-budget — Provides detailed resource-level budget analysis for the LCP critical path.experiment-designer — Validate that experiment variant pages pass CWV before launching tests.EDS achieves near-100 Lighthouse scores out of the box through strict architectural constraints. A vanilla EDS page with no customization scores 100 on Performance. CWV issues are almost always caused by customizations that violate the built-in performance model: oversized images, blocks with heavy JavaScript, third-party scripts loaded in the wrong phase, or missing image dimensions. You are not fighting a slow framework — you are finding where customizations broke a fast baseline.
LCP — Almost always an image issue. The 100KB budget means total eager-phase transfer must stay under 100KB. Check: hero image size, number of eager blocks, font preloading, third-party scripts in the eager phase.
CLS — Almost always an image dimensions or font swap issue. createOptimizedPicture() historically omitted width/height attributes (aem-lib issue #201). Late consent banners and font-display: swap without size-adjust are the other common sources.
INP — Almost always block JavaScript. Carousels, accordions, tabs, and mega-menus that do heavy DOM manipulation on interaction cause long tasks. Forced reflows (read layout then write DOM) are the most common code-level cause.
Before starting, create a checklist of all steps to track progress:
Fetch the page and collect baseline scores:
curl -s -o /dev/null -w "HTTP %{http_code} — %{size_download} bytes — %{time_total}s" "https://<domain>/<path>"
Record the baseline CWV table:
| Metric | Value | Rating | Threshold |
|---|---|---|---|
| LCP | X.Xs | Good/Needs Improvement/Poor | < 2.5s |
| CLS | X.XX | Good/Needs Improvement/Poor | < 0.1 |
| INP | Xms | Good/Needs Improvement/Poor | < 200ms |
Also note total page weight, request count, and TTFB. A large FCP-to-LCP gap suggests render-blocking resources between first paint and largest paint.
Identify the LCP element — in EDS this is almost always the hero image, a large <h1>, or a CSS background image in the first section. Fetch the HTML and examine the first section (before the first --- divider).
Inventory every eager-phase resource and measure actual transfer sizes:
curl -s -o /dev/null -w "%{size_download}" "https://<domain>/styles/aem.css"
curl -s -o /dev/null -w "%{size_download}" "https://<domain>/scripts/aem.js"
Build the budget table: HTML document, aem.css, aem.js, scripts.js, first-section block CSS/JS, preloaded fonts, and LCP image. Grade the total: A (under 70KB), B (70-90KB), C (90-100KB), D (100-120KB), F (over 120KB).
Verify resources load in the correct phase:
Eager — Only first-section block CSS/JS. Check that below-fold blocks are not loading eagerly. Images in the first section must have loading="eager" with width and height; below-fold images must have loading="lazy".
Delayed — Fetch scripts/delayed.js and verify all third-party scripts load there. Common violations: Google Tag Manager in <head> (~70KB, blocks render), analytics loaded synchronously, chat widgets loaded eagerly, consent banners in the eager phase.
Fonts — Verify font-display: swap, maximum 2 preloaded fonts, all WOFF2 format, each under 30KB. Fonts used only below the fold should not be preloaded.
Check whether images have explicit width and height:
curl -s "https://<domain>/<path>" | grep -oP '<img[^>]*>' | head -10
Images without dimensions cause CLS. The createOptimizedPicture() function in older aem.js versions omitted these (aem-lib issue #201). Fix by updating aem-lib or adding attributes in the block's decorate() function.
Check image formats and sizes via headers. Recommended targets: hero/LCP image under 40KB (WebP or AVIF), below-fold images under 80KB, icons under 5KB (prefer SVG). EDS serves through the media pipeline which auto-optimizes, but oversized source images may still exceed the budget.
EDS CLS comes from a predictable set of sources:
width/height on <img> or <picture> elements from createOptimizedPicture().font-display: swap causes text reflow when the custom font replaces the fallback. Fix with size-adjust, ascent-override, descent-override, and line-gap-override on the fallback @font-face.decorate() shift layout if the initial HTML differs from the decorated structure. Fix by making initial HTML match the final layout or reserving space with CSS.Look for long tasks (> 50ms), forced reflows (read layout then write DOM), and slow event handlers (> 100ms). Common EDS offenders:
Key fixes: debounce expensive handlers (150ms timeout), batch DOM reads before writes to avoid forced reflows, use requestAnimationFrame for visual updates.
Inventory all external scripts from the HTML head and delayed.js:
curl -s "https://<domain>/<path>" | grep -oP '<script[^>]*src="[^"]*"' | head -20
curl -s "https://<domain>/scripts/delayed.js"
Classify each script by current phase vs. correct phase. All third-party scripts must load via delayed.js (3+ seconds after page load). Scripts in the eager phase add directly to the 100KB budget and block rendering.
If a tag manager (GTM) re-injects scripts dynamically, configure GTM triggers to fire only after a 3-second delay to match the EDS delayed phase.
For each issue, produce a specific fix with estimated impact:
| Issue | Metric | Current | Fix | Projected After | Savings |
|---|---|---|---|---|---|
| Hero image 180KB | LCP | 3.2s | Resize to 800px, convert to WebP | 2.1s | ~140KB |
| GTM in head | LCP | 3.2s | Move to delayed.js | 2.4s | ~70KB off critical path |
| Images missing dimensions | CLS | 0.18 | Add width/height to createOptimizedPicture | 0.03 | Eliminates image shifts |
| Font swap without size-adjust | CLS | 0.18 | Add size-adjust to fallback | 0.08 | Eliminates font shifts |
| Carousel forced reflow | INP | 310ms | Batch DOM reads/writes | 150ms | 50%+ reduction |
Projection benchmarks: JPEG-to-WebP saves 25-35%. Resizing 2000px to 1000px saves 60-75%. Adding image dimensions eliminates image CLS entirely. Font size-adjust reduces font CLS by 80-95%. Debouncing and reflow batching reduce INP by 40-60%.
| Metric | Before | Target | Projected After | Status |
|---|---|---|---|---|
| LCP | X.Xs | < 2.5s | X.Xs | Fix/Monitor/Pass |
| CLS | X.XX | < 0.1 | X.XX | Fix/Monitor/Pass |
| INP | Xms | < 200ms | Xms | Fix/Monitor/Pass |
Ranked list: highest-impact fix first, with metric affected, estimated improvement, and effort (low/medium/high).
loading="eager" with width and heightloading="lazy"delayed.jsfont-display: swap with size-adjust fallbacks| Symptom | Cause | Fix |
|---|---|---|
| Lighthouse good but OpTel poor | Lab vs. field: Lighthouse runs on fast hardware; real users are on slower devices | Trust OpTel — optimize for the p75 mobile user |
| LCP good on desktop, poor on mobile | Images not responsive or eager resources too heavy for mobile connections | Add mobile-appropriate srcset sizes; target under 60KB eager for mobile |
| CLS zero in Lighthouse, non-zero in OpTel | Lighthouse measures initial load only; OpTel captures lifetime CLS | Check lazy-loaded content, late ads, and scroll-triggered shifts |
| INP cannot be measured in Lighthouse | INP requires real interaction; Lighthouse uses Total Blocking Time as proxy | Use DevTools Performance panel with manual clicks, or rely on OpTel |
| Fixing one metric degrades another | Tradeoffs (e.g., deferring fonts improves LCP but worsens CLS) | Apply size-adjust fallback fonts when deferring font loading |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (focus-gts/eds-content-ops-skills) — no native marketplace selected
npx claudepluginhub p/focus-gts-eds-content-ops42 skills in this plugin
/accessibility-fixScan an AEM Edge Delivery Services page for WCAG 2.1 AA accessibility violations and generate specific fixes. Identifies missing alt text, heading hierarchy issues, link text problems, color contrast concerns, and EDS-specific accessibility patterns. Use when fixing accessibility issues, preparing for compliance audits, or remediating WCAG violations./aem-to-eds-migrationAssess and plan a migration from traditional AEM Sites to AEM Edge Delivery Services. Analyzes the source AEM site to inventory components, templates, content types, and integrations, then maps them to EDS equivalents and produces a migration feasibility report with effort estimates, risk areas, and a phased plan./Other plugins' skills for the same job