Guide for creating new AEM Edge Delivery blocks or modifying existing blocks. Use this skill whenever you are creating a new block from scratch or making significant changes to existing blocks that involve JavaScript decoration, CSS styling, or content model changes.
This skill guides you through creating new AEM Edge Delivery blocks or modifying existing ones, following Content Driven Development (CDD) principles. Blocks are the reusable building blocks of AEM sites - each transforms authored content into rich, interactive experiences through JavaScript decoration and CSS styling. This skill covers the complete development process: understanding content models, implementing decoration logic, applying styles, and maintaining code quality standards.
This skill should ONLY be invoked from the content-driven-development skill during Phase 2 (Implementation).
If you are not already following the CDD process:
This skill handles:
REQUIRED before using this skill:
Information needed:
Before proceeding, confirm with the user:
"Do you have:
If not, we need to use the content-driven-development skill first."
If prerequisites are not met, STOP and invoke the content-driven-development skill.
If prerequisites are met, get the test content URL from the user and proceed to step 2.
For new blocks or major modifications:
Review the implementation patterns in similar blocks to inform your approach.
For minor modifications to existing blocks: Skip to step 3.
For new blocks:
blocks/{block-name}/{block-name}.js and {block-name}.cssresources/ if helpful):
decorate(block) function (can be async if needed).{block-name} classFor existing blocks:
blocks/{block-name}/Follow patterns and conventions in resources/js-guidelines.md:
Read resources/js-guidelines.md for detailed examples, code standards, and best practices.
Follow patterns and conventions in resources/css-guidelines.md:
.{block-name})Read resources/css-guidelines.md for detailed examples, code standards, and best practices.
After implementation is complete, invoke the testing-blocks skill:
The testing-blocks skill will guide you through:
Provide the testing-blocks skill with:
Return to this skill after testing is complete to proceed to step 7.
Blocks require two types of documentation:
Author-facing documentation helps content authors understand how to use the block in the CMS. This documentation typically exists as draft/library content in the CMS itself, not in the codebase.
When author documentation is needed:
Almost all blocks should have author-facing documentation. The only exceptions are:
Maintaining author documentation:
Author documentation must be kept in sync with the block implementation:
Where author documentation lives:
Different projects use different approaches for author documentation:
Sidekick Library (Google Drive/SharePoint authoring):
/tools/sidekick/library.html in the codebaseDocument Authoring (DA) Library:
Universal Editor (UE) projects:
Simple documentation pages:
/drafts or /docsWhat to include in author documentation:
The specific content of author documentation varies by project. As an agent:
/tools/sidekick/library.html as a signal)resources/js-guidelines.mdresources/css-guidelines.mdSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer