npx skills add ...
npx skills add adobe/skills --skill building-blocks
Use this when implementing code changes in AEM Edge Delivery Services (EDS, Franklin, Helix), whether new or modified blocks, core functionality (scripts.js, styles, delayed.js, etc.), or both. Creates and modifies block folders and decorate functions, updates core scripts, scopes CSS, and wires up delayed loading. For the overall development process use content-driven-development.
npx skills add adobe/skills --skill building-blocks
This skill guides you through implementing AEM Edge Delivery blocks following established patterns and best practices. Blocks transform authored content into rich, interactive experiences through JavaScript decoration and CSS styling.
IMPORTANT: This skill should ONLY be invoked from the content-driven-development skill during Step 5 (Implementation).
If you are not already following the CDD process, STOP and invoke the content-driven-development skill first.
This skill is invoked automatically by content-driven-development during Step 5 (Implementation). It handles:
Block Development:
Core Functionality:
Combined:
Prerequisites (verified by CDD):
Track your progress:
Note: If your changes require core modifications (utilities in scripts.js, global styles, etc.), make those changes first, test them, then return to this workflow. See "When Modifying Core Files" below.
When to use: Creating new blocks or making major structural modifications
Skip this step when: Making minor modifications to existing blocks (CSS tweaks, small decoration changes)
Quick start:
Search the codebase for similar blocks:
Use the block-collection-and-party skill to find reference implementations
Review patterns from similar blocks:
Create the block directory and files:
Basic JavaScript structure:
Basic CSS structure:
blocks/{block-name}/Essential pattern - re-use existing DOM elements:
For complete JavaScript guidelines including:
Read references/js-guidelines.md
Essential patterns - scoped, responsive, using custom properties:
For complete CSS guidelines including:
Read references/css-guidelines.md
Note on iterative validation: While building, you can test changes in your browser as you go (load test content URL, check console, verify layout and functionality). For comprehensive testing guidance including browser testing techniques, responsive testing, and validation approaches, see the testing-blocks skill invoked in Step 5.
After implementation is complete, invoke the testing-blocks skill.
The testing-blocks skill will guide you through:
Provide the testing-blocks skill with:
After testing is complete, return to CDD workflow.
If your changes require modifying core files (scripts.js, styles.css, delayed.js), follow these principles:
Common core files:
Key principles:
Testing core changes:
For detailed patterns: