Skills for building AEM Edge Delivery Services sites — block development, content modeling, code review, testing, and page import.
82
76%
Does it follow best practices?
Impact
88%
1.04xAverage score across 6 eval scenarios
Advisory
Suggest reviewing before use
{
"context": "Tests whether the agent follows AEM EDS JavaScript guidelines when implementing block decoration. Covers the required function signature and export pattern, DOM manipulation best practices (re-use elements, scoped queries, no innerHTML, no orphan elements), import syntax, code style, and JSDoc documentation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Default export decorate",
"description": "The block JS file uses `export default function decorate(block)` or `export default async function decorate(block)` as the function declaration",
"max_score": 10
},
{
"name": "JSDoc comment on decorate",
"description": "The decorate function has a JSDoc comment with at minimum `@param {Element} block` documented",
"max_score": 8
},
{
"name": "Scoped DOM queries",
"description": "All DOM queries inside decorate use `block.querySelector()` or `block.querySelectorAll()`, NOT `document.querySelector()` or `document.querySelectorAll()`",
"max_score": 10
},
{
"name": "No innerHTML for structures",
"description": "The JS file does NOT use `innerHTML` assignment to build multi-element DOM structures (simple text-only innerHTML may be acceptable, but complex structures must use DOM APIs)",
"max_score": 10
},
{
"name": "Element reuse not recreation",
"description": "Existing DOM elements from authored content (images, headings, paragraphs) are moved/reused rather than having their content extracted and placed into freshly created duplicate elements",
"max_score": 10
},
{
"name": "No orphaned elements",
"description": "When elements are transformed (e.g., a `<p>` converted to a `<div>`), the original element is removed from the DOM (via replaceWith, remove, or replaceChildren) rather than left as an empty orphan alongside the new element",
"max_score": 8
},
{
"name": "Import .js extensions",
"description": "Any import statements include the `.js` file extension (e.g., `import { foo } from '../../scripts/aem.js'`)",
"max_score": 8
},
{
"name": "Single quotes for strings",
"description": "String literals in the JS file use single quotes (not double quotes or template literals for simple strings)",
"max_score": 6
},
{
"name": "camelCase identifiers",
"description": "Variable and function names use camelCase (e.g., `blockItems`, `handleClick`), not snake_case or PascalCase for non-class identifiers",
"max_score": 6
},
{
"name": "No global DOM mutation",
"description": "The block JS does NOT select or modify DOM elements outside of its block scope (e.g., does NOT call `document.querySelector('header')` to modify the page header)",
"max_score": 10
},
{
"name": "variant check via classList",
"description": "If variant handling is present, it uses `block.classList.contains('variant-name')` to check for variants",
"max_score": 7
},
{
"name": "ES6+ syntax",
"description": "Code uses ES6+ syntax: uses `const`/`let` (not `var`), uses arrow functions where appropriate, and uses template literals for string interpolation instead of concatenation",
"max_score": 7
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
skills
analyze-and-plan
block-collection-and-party
block-inventory
building-blocks
code-review
content-driven-development
content-modeling
docs-search
find-test-content
generate-import-html
identify-page-structure
page-decomposition
page-import
preview-import
scrape-webpage
testing-blocks