/eds-content-ops:environment-managementfrom eds-content-ops
Manage preview and live environments for AEM Edge Delivery Services projects. Automates the preview/publish workflow, cache invalidation, environment-specific configuration, and multi-environment strategies using branch-based development. Covers the Sidekick workflow, Admin API operations, and push invalidation configuration.
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.
Audit an AEM Edge Delivery Services project's current environment configuration, document preview and live URL patterns, automate Admin API operations, configure push invalidation, and establish branch-based multi-environment strategies. Produces an environment management runbook with automation scripts and monitoring checks.
This skill fetches external web pages for analysis. When fetching:
eds-cicd-pipeline — automates quality gates that run before code reaches each environmentgo-live-checklist — covers the production launch checklist including environment verificationpublish-readiness — validates content is ready to publish to the live environmentredirect-manager — manages redirects that differ between preview and live environmentsAEM Edge Delivery Services operates with two distinct environments per branch. The preview environment (*.hlx.page or *.aem.page) reflects the latest authored content after a user clicks "Preview" in the AEM Sidekick browser extension. The live environment (*.hlx.live or *.aem.live, or a custom domain) reflects the latest published content after a user clicks "Publish" in Sidekick. Preview is the staging area; live is production. Both environments are served by Adobe's CDN, but with different cache configurations — preview has short TTLs for rapid iteration, while live has longer TTLs optimized for performance.
The AEM Admin API at admin.hlx.page provides programmatic control over both environments. A POST to /preview/{owner}/{repo}/{branch}/{path} updates the preview cache for a specific page, pulling the latest content from the configured content source (SharePoint or Google Drive) and the latest code from the Git branch. A POST to /live/{owner}/{repo}/{branch}/{path} promotes the current preview version to live. A DELETE to either endpoint purges the cached version. The bulk endpoint (/* as the path) invalidates all pages, which is useful after significant code changes.
Branch-based environment management is a powerful EDS pattern. Each Git branch gets its own preview and live environments automatically. A branch named staging produces preview URLs at https://staging--{repo}--{owner}.aem.page/. This means teams can create isolated environments for feature development, QA testing, or client review simply by creating a Git branch — no infrastructure provisioning required. However, only the main branch is typically connected to the custom production domain.
Before starting, create a checklist to track progress:
tools.aem.liveExamine the project to understand the current environment landscape:
fstab.yaml — this file defines the content source (SharePoint or Google Drive mountpoint). The url field determines where content is fetched from. Different branches can have different fstab.yaml files pointing to different content sources (e.g., a staging SharePoint site vs. production).main (production), staging or stage (QA), develop or dev (development).main branch's live environment..hlx or helix- configuration files. Older EDS projects may have helix-config.yaml or .hlx/config.yaml with environment-specific settings.admin.hlx.page or admin.aem.page in scripts, workflows, or documentation.hlx.page/hlx.live) and current (aem.page/aem.live). Identify which the project uses.Report a summary of the environment landscape before proceeding.
Build a complete URL map for the project. For a project owned by {owner} with repo {repo}:
| Type | URL Pattern | Purpose |
|---|---|---|
| Preview | https://main--{repo}--{owner}.aem.page/ | Latest authored content, pre-publish |
| Live | https://main--{repo}--{owner}.aem.live/ | Published content via CDN |
| Custom Domain | https://www.example.com/ (if configured) | Production URL for end users |
| Admin API (preview) | https://admin.hlx.page/preview/{owner}/{repo}/main/{path} | Trigger preview programmatically |
| Admin API (live) | https://admin.hlx.page/live/{owner}/{repo}/main/{path} | Trigger publish programmatically |
| Admin API (status) | https://admin.hlx.page/status/{owner}/{repo}/main/{path} | Check page status |
For each active branch, document the same URL patterns. Emphasize that branch-based URLs are automatically available — no configuration needed.
preview.lastModified and live.lastModified timestamps — useful for debugging staleness.Design a branch-based multi-environment strategy based on the team's needs:
main — production. All content is authored, previewed, and published here.aem.page) serves as the staging environment.main — production. Protected branch, requires PR reviews.staging — QA and client review. Feature branches merge here first.feature/{description}.main — production.staging — pre-production QA with a separate content source.develop — integration branch for active development.develop via PR.For each branch in the chosen strategy, configure:
fstab.yaml content source (same source for all branches, or separate sources per environment).Important EDS constraint: The AEM Code Sync bot watches all branches. Any push to any branch updates that branch's preview environment. This is both powerful (instant previews for any branch) and risky (accidental pushes to main go live immediately). Branch protection on main is essential.
Create scripts for common Admin API operations:
curl -X POST "https://admin.hlx.page/preview/{owner}/{repo}/{branch}/{path}" \
-H "x-auth-token: $AEM_ADMIN_TOKEN"
curl -X POST "https://admin.hlx.page/live/{owner}/{repo}/{branch}/{path}" \
-H "x-auth-token: $AEM_ADMIN_TOKEN"
curl -X POST "https://admin.hlx.page/preview/{owner}/{repo}/{branch}/*" \
-H "x-auth-token: $AEM_ADMIN_TOKEN"
curl "https://admin.hlx.page/status/{owner}/{repo}/{branch}/{path}" \
-H "x-auth-token: $AEM_ADMIN_TOKEN"
Generate a shell script (scripts/admin-api.sh) that wraps these operations with error handling, logging, and retry logic. The script should accept commands like ./admin-api.sh preview /about or ./admin-api.sh publish-all.
Also generate a Node.js version (scripts/admin-api.mjs) for integration with GitHub Actions or programmatic use. The script should export functions: previewPage(path), publishPage(path), invalidateAll(), and getStatus(path).
Push invalidation ensures that when content is published, the CDN cache is updated immediately instead of waiting for TTL expiry.
tools.aem.live. This is Adobe's configuration dashboard for EDS sites.Document the push invalidation configuration:
DELETE on the live endpoint to manually purge, or wait for the 5-minute default TTL.Common issue: Custom CDN setups (e.g., Cloudflare in front of hlx.live) can interfere with push invalidation. If the site uses a custom CDN, document the additional cache purge step needed at the CDN layer.
Generate a health check script (scripts/env-health-check.mjs) that verifies each environment is functioning correctly:
last-modified header against expected value. Flag if content is more than 24 hours stale on preview or more than 7 days stale on live.code.status is 200.content.sourceLocation is accessible.aem.live URL).Generate a GitHub Actions workflow (.github/workflows/env-health.yaml) that runs these checks on a schedule (every 6 hours) and sends alerts via GitHub Issues if any check fails.
Produce a comprehensive docs/environment-runbook.md covering:
fstab.yaml per branch).| Operation | How | Who |
|---|---|---|
| Preview a page | Sidekick "Preview" button, or Admin API POST | Authors, Developers |
| Publish a page | Sidekick "Publish" button, or Admin API POST | Authors, Approvers |
| Bulk invalidate after code change | Admin API POST to /* | Developers (automated via CI) |
| Purge a specific page's cache | Admin API DELETE on live endpoint | Developers |
| Create a new environment | Create a Git branch | Developers |
| Tear down an environment | Delete the Git branch | Developers |
aem.live URL directly, confirm branch mapping.fstab.yaml on the specific branch.Produce a summary of the environment management setup:
| Deliverable | File | Purpose |
|---|---|---|
| Environment URL map | Inline in runbook | Complete reference of all preview/live URLs |
| Admin API scripts (shell) | scripts/admin-api.sh | CLI automation for preview, publish, invalidation |
| Admin API scripts (Node.js) | scripts/admin-api.mjs | Programmatic Admin API access |
| Health check script | scripts/env-health-check.mjs | Automated environment monitoring |
| Health check workflow | .github/workflows/env-health.yaml | Scheduled health verification |
| Environment runbook | docs/environment-runbook.md | Operations reference for the team |
| Branch strategy documentation | Inline in runbook | Branch-to-environment mapping and policies |
Include a "Current Status" section summarizing the health of each environment (preview reachable, live reachable, content fresh, Code Sync active).
| Symptom | Cause | Fix |
|---|---|---|
| Preview URL returns 404 | Branch does not exist, or path is incorrect | Verify branch name and path; EDS URLs are case-sensitive and use lowercase |
| Published content not appearing on live | Push invalidation not configured, or CDN cache not purged | Check push invalidation at tools.aem.live; manually purge via Admin API DELETE on /live/ |
| Admin API returns 401 | Authentication token missing or expired | Regenerate the token and update the AEM_ADMIN_TOKEN secret |
| Branch preview shows stale code | Code Sync bot has not processed the latest push | Check GitHub webhook delivery logs; verify the AEM Code Sync GitHub App is installed |
Custom domain shows different content than aem.live | CDN caching layer (e.g., Cloudflare) serving stale content | Purge the CDN cache independently of the AEM cache |
main like production. A push to main updates the production site via Code Sync. Always require PR reviews and CI checks before merging.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
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./