best-practices
AEM as a Cloud Service — Best Practices
Platform guidance for AEM as a Cloud Service: Java/OSGi (what to use, what to avoid, how to refactor legacy patterns) and HTL (component .html templates, Cloud SDK HTL lint).
This skill holds the pattern transformation modules (references/*.md). They ship with the aem-cloud-service plugin; use this skill without the migration skill for greenfield or maintenance work that only needs these references. Use migration when you need BPA/CAM orchestration on top.
Quick pick: Open the Pattern Reference Modules table below → jump to the matching references/<file>.md → read it fully before editing. For Java: Felix SCR, resolvers, or logging, use Java / OSGi baseline links first when those appear in the same change set.
When to Use This Skill
Use this skill when you need to:
- Apply AEM as a Cloud Service constraints to Java/OSGi code (new or existing)
- Refactor legacy Java patterns into supported APIs (same modules migration uses)
- Follow consistent rules across schedulers, replication, JCR observation listeners (
eventListener), OSGi event handlers (eventHandler), and DAM assets - Fix HTL (Sightly) issues from the AEM Cloud SDK build, especially
data-sly-test: redundant constant value comparison - Read step-by-step transformation and validation checklists for a specific pattern
For BPA/CAM orchestration (collections, CSV, MCP project selection), use the migration skill (skills/aem/cloud-service/skills/migration/).
More from himanich/skills
migration
Orchestrates legacy AEM (6.x, AMS, on-prem) to AEM as a Cloud Service migration using BPA CSV or cache, CAM/MCP target discovery, and one-pattern-per-session workflow. Use for BPA/CAM findings, Cloud Service blockers, or fixes for scheduler, ResourceChangeListener, replication, EventListener, OSGi EventHandler, DAM AssetManager, HTL data-sly-test lint. OSGi configs → Cloud Manager — scan ui.config, .cfg.json, secrets, $[secret:]/$[env:] — agent follows references/osgi-cfg-json-cloud-manager.md when prompted. Transformation steps live in the best-practices skill—read it and the right references/ modules before editing code.
6ensure-agents-md
|
2dispatcher
|
2aem-workflow
|
2create-component
|
2