/eds-content-ops:block-migrationfrom eds-content-ops
Port custom blocks between AEM Edge Delivery Services projects. Analyzes a block's dependencies including shared CSS variables, utility functions, and external libraries. Identifies project-specific assumptions, produces a migration package, and generates integration instructions for the target project. Use when reusing blocks across sites or consolidating blocks from multiple projects.
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.
Analyze a custom AEM Edge Delivery Services block's full dependency tree — JavaScript imports, CSS custom properties, shared utility functions, and external resources — and produce a migration package that can be cleanly integrated into a target EDS project. Identifies project-specific assumptions that will break in the new context and generates step-by-step integration instructions.
This skill fetches external web pages for analysis. When fetching:
block-scaffolder instead).block-testing instead).block-scaffolder — create new blocks when migration is not viable and a rewrite is better.block-testing — validate the migrated block works in the target project.block-accessibility — audit the migrated block's DOM for accessibility after integration.content-audit — verify pages using the migrated block render correctly end to end.Every EDS project follows a standard structure. The files relevant to block migration are:
blocks/{name}/{name}.js and blocks/{name}/{name}.css — the block itself.scripts/aem.js — EDS core library providing createOptimizedPicture, loadBlock, decorateBlocks, loadCSS, and other utilities. This file is identical across projects unless customized.scripts/scripts.js — project-specific orchestration including loadEager, loadLazy, loadDelayed, auto-blocking configuration, and custom decoration logic. This file varies significantly between projects.styles/styles.css — project-level CSS custom properties (colors, fonts, spacing), base typography, and default content styles. Every project has different values here.head.html — custom <head> content (favicons, third-party snippets, schema markup). Rarely affects blocks directly but can introduce global styles.A block that works in Project A may break in Project B for several reasons:
var(--color-primary), but Project B uses var(--brand-primary) or has different color values entirely.../../scripts/utils.js that does not exist in Project B.buildAutoBlocks() in scripts.js to wrap certain URLs, but Project B does not have this auto-blocking rule.columns block to exist with specific behavior).Not every block should be migrated. If the block has heavy project-specific logic (more than 30% of the code references project-specific utilities or patterns), a rewrite using block-scaffolder may be faster and cleaner than adapting the existing code.
Before starting, create a todo list to track progress through these steps:
Identify every file that belongs to the block in the source project:
blocks/{name}/{name}.js and blocks/{name}/{name}.css. Read both completely..svg), helper modules (.js), sub-stylesheets, or data files (.json). List all of them.import statements. For each import, determine if the target is: (a) the EDS core library (aem.js), (b) a project-specific utility, or (c) a third-party module.For each import statement in the block's JS file:
aem.js)createOptimizedPicture — standard, available in all projects. No action needed.loadCSS — standard. No action needed.decorateIcons — standard, but some projects override this. Note for verification.fetchPlaceholders — standard, but placeholder values differ per project. Note the specific placeholder keys the block uses.aem.js — some projects extend the core library. If the block imports a function that is not in the standard aem.js, flag it as a migration dependency.For each import from scripts/scripts.js, scripts/utils.js, or any non-standard path:
If the block loads scripts from CDNs or external URLs:
Extract every CSS custom property referenced in the block's CSS:
var(--...) references. For each one, identify whether it is defined in the source project's styles/styles.css or in the block's own CSS.--color-primary, --color-background, --color-text, etc.--font-family-body, --font-family-heading, --font-size-m, etc.--spacing-s, --spacing-m, --spacing-l, etc.--max-width, --section-width, --nav-height, etc.styles/styles.css, map each source variable to its target equivalent. If no equivalent exists, note the variable and its value so it can be added.Search the block code for assumptions that are specific to the source project:
example.com). These must be replaced or parameterized./content/, /fragments/, or specific page paths. These may not exist in the target project.scripts/scripts.js in the source project for buildAutoBlocks() rules that create this block. If so, the target project needs the same auto-blocking rule.cards block that relies on columns block CSS for its grid layout. Identify any cross-block dependencies.Based on the analysis in Steps 1-4, make a recommendation:
| Factor | Score | Notes |
|---|---|---|
| Number of external dependencies | 0-5 | 0 = self-contained, 5 = heavily dependent |
| CSS variable conflicts | 0-5 | 0 = all variables exist in target, 5 = complete mismatch |
| Project-specific code percentage | 0-100% | Above 30% suggests a rewrite |
| Complexity of adaptation | Low/Med/High | Based on the required changes |
Recommendation thresholds:
block-scaffolder to create a new block inspired by the source.State the recommendation clearly before proceeding to the next step.
Produce the complete set of files needed for migration:
styles/styles.css for any missing custom properties, with the values from the source project as defaults.scripts/scripts.js buildAutoBlocks() function.Format the migration manifest as:
{
"block": "{block-name}",
"sourceProject": "{source}",
"targetProject": "{target}",
"files": [
{
"source": "blocks/{name}/{name}.js",
"target": "blocks/{name}/{name}.js",
"changes": ["Updated import paths", "Replaced utility X with inline code"]
}
],
"cssVariables": {
"added": ["--variable-name: value"],
"mapped": {"--source-var": "--target-var"}
}
}
Produce step-by-step instructions for integrating the migration package into the target project:
blocks/{name}/ in the target project.styles/styles.css with missing CSS custom properties.scripts/scripts.js with auto-blocking rules (if any).block-testing to validate the migrated block against the testing checklist.Include specific commands or actions for each step. Do not use vague instructions like "update as needed."
Generate a checklist for the developer to verify after migration:
| Check | Status | Notes |
|---|---|---|
| Block JS file exists at correct path | ||
| Block CSS file exists at correct path | ||
| All imports resolve without errors | ||
| CSS custom properties all resolve (no fallback values triggering) | ||
| Block renders with source project's example content | ||
| Block renders with target project's content structure | ||
| CSS does not leak into surrounding content | ||
| Mobile layout works at 375px | ||
| Desktop layout works at 1200px | ||
| No console errors on page load | ||
| Lighthouse accessibility score unchanged | ||
| Lighthouse performance score unchanged | ||
| Block works in all variants (if applicable) | ||
| Auto-blocking rules work (if applicable) |
| Symptom | Cause | Fix |
|---|---|---|
| Block JS fails to load — 404 in console | File path mismatch between block name and directory | Ensure directory name, JS filename, and CSS filename all match exactly |
| CSS variables show fallback values | Variable names differ between source and target projects | Map variables in Step 3 and update the block CSS |
| Block renders unstyled | CSS file not loading because block name mismatch | Block directory name must match the authoring table header |
| Utility import fails | Helper function does not exist in target project | Copy the utility file or inline the logic per Step 6 |
| Block works but breaks other content | CSS leaking due to insufficiently scoped selectors | Audit CSS scoping — every rule must start with .{block-name} |
--color-primary in Project A may be --brand-main in Project B. Always map explicitly.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