building-blocks
Audited by Runlayer on Feb 25, 2026
Malicious tool definition detected
Tool: SKILL.md [1/2] Description: --- name: building-blocks description: Guide for implementing code changes in AEM Edge Delivery Services.
Tool: SKILL.md [2/2] Description: custom properties - **lazy-styles.css** - Global styles (lazy loaded) - **delayed.js** - Marketing, analytics, third-party integrations **Key principles:** 1.
Malicious tool definition detected
Tool: resources/css-guidelines.md [1/2] Description: # CSS Guidelines for AEM Blocks ## Block Scoping **All CSS selectors must be scoped to the block.** This is critical to prevent style leakage between blocks.
Tool: resources/css-guidelines.md [2/2]
Malicious tool definition detected
Tool: resources/js-guidelines.md [1/2] Description: # JavaScript Guidelines for AEM Blocks ## Basic Block Structure Every block must export a default `decorate` function that receives the block element as a parameter.
Tool: resources/js-guidelines.md [2/2] Description: is visible loadYouTubeEmbed(block); } }); observer.observe(block); } ``` ## Helper Functions You can import helpful utilities from `scripts/aem.js`: ```javascript import { buildBlock, decorateBlock, loadBlock, loadCSS, loadScript, toClassName, getMetadata, createOptimizedPicture, } from '../../scripts/aem.js'; ``` Common helpers: - `toClassName(text)` - Converts text to a valid CSS class name - `getMetadata(name)` - Gets page metadata value - `