Apply a Content Driven Development process to AEM Edge Delivery Services development...
Content Driven Development is a mandatory process for AEM Edge Delivery Services development that prioritizes content and author needs over developer convenience. This skill orchestrates the development workflow to ensure code is built against real content with author-friendly content models.
Author needs come before developer needs. When building for AEM Edge Delivery, authors are the primary users of the structures we create. Content models must be intuitive and easy to work with, even if that means more complex decoration code.
Efficiency through preparation. Creating or identifying test content before coding provides:
NEVER start writing or modifying code without first identifying or creating the content you will use to test your changes.
Apply Content Driven Development principles to ALL AEM development tasks:
Skip CDD only for:
When in doubt, follow the CDD process. The time invested pays dividends in quality and efficiency.
This skill orchestrates other skills at the appropriate stages:
Follow these phases in order. Do not skip steps.
The first phase establishes what content you're working with and ensures the content model is author-friendly.
For new blocks:
Skip to Step 1.2 (Content Model Design). Searching for content that doesn't exist is a waste of time.
For modifications to existing blocks:
Ask the user: "Does content using this block already exist that we can use for testing?"
YES ā Identify existing content to test against
scripts/find-block-content.js script to search for pages containing the blockNO existing content ā Proceed to Step 1.2
REQUIRED for:
Ask the user: "This requires a new content model. Would you like me to use the content-modeling skill to design an author-friendly content model now?"
YES ā Invoke the content-modeling skill
NO ā The user may want to define it themselves
Once the content model is defined (from Step 1.2), you need test content.
Ask the user: "We need test content for development and validation. This content will serve multiple purposes:
Would you like to:
Option 1: CMS Content (Recommended)
Option 2: Local HTML Files (Temporary)
drafts/ folder matching the content model structureaem up --html-folder drafts"Test content can often double as author-facing documentation, saving time and keeping documentation current. Consider this when creating test content:
When test content IS sufficient as author documentation:
When separate author documentation is needed:
Structuring test content to serve both purposes:
/tools/sidekick/library/ or appropriate library location/drafts/docs/ or /drafts/library/Ask the user about documentation approach:
"Should this test content also serve as author documentation? If so, we can structure it accordingly and place it in an appropriate location (e.g., /drafts/library/{block-name} or your project's library system)."
If yes, guide content creation with documentation in mind. If no, proceed with test-focused content and note that author documentation will be needed later.
CRITICAL: Do not begin Phase 2 until you have confirmed test content exists and is accessible.
Now that test content exists, proceed with implementation:
Invoke the building-blocks skill:
Follow standard development practices:
The final phase ensures the implementation works correctly with real content.
Mandatory testing:
Required before considering implementation complete:
npm run lint
If linting fails, fix issues with:
npm run lint:fix
The testing-blocks skill is automatically invoked by building-blocks for block development.
For other code changes, or for additional testing guidance, invoke the testing-blocks skill which provides:
Before raising a PR, ensure:
The test content URL will be used as the PR validation link.
Common mistakes:
Quick reference for the CDD process:
1. CONTENT DISCOVERY
āā Existing content? ā Use it
āā New block/structure? ā Design content model ā Create test content
2. IMPLEMENTATION
āā Build code against the real content model
āā Test continuously with actual content
3. VALIDATION
āā Comprehensive testing with test content
āā Quality checks (linting, accessibility)
āā PR preparation with test URL
KEY RULE: Never proceed to implementation without test content
Use the provided script to search for pages containing a specific block:
# Search on localhost (default)
node .claude/skills/content-driven-development/scripts/find-block-content.js <block-name>
# Search for specific variant
node .claude/skills/content-driven-development/scripts/find-block-content.js <block-name> localhost:3000 <variant>
# Search on live site
node .claude/skills/content-driven-development/scripts/find-block-content.js <block-name> main--repo--owner.aem.live
# Search on preview with variant
node .claude/skills/content-driven-development/scripts/find-block-content.js <block-name> main--repo--owner.aem.page <variant>
Examples:
node .claude/skills/content-driven-development/scripts/find-block-content.js hero
node .claude/skills/content-driven-development/scripts/find-block-content.js hero localhost:3000 dark
node .claude/skills/content-driven-development/scripts/find-block-content.js cards main--site--owner.aem.live three-up
This script queries the site's query-index to find all pages containing the specified block (and optional variant) and returns their URLs. The script uses proper DOM parsing to accurately identify blocks.
This skill acts as the orchestrator for AEM development workflows:
At Content Modeling stage: ā Invoke content-modeling skill for author-friendly design
At Implementation stage: ā Invoke building-blocks skill for block development ā Reference block-collection-and-party skill for patterns
At Validation stage: ā Reference testing-blocks skill for comprehensive testing
Following this orchestration ensures all development follows content-first principles.