find-test-content

Searches AEM Edge Delivery pages to locate existing content containing a specific block and its variants.

1|Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aemgdc/aemdev --skill find-test-content-aemgdc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: find-test-content
Source: https://github.com/aemgdc/aemdev/tree/main/.agents/skills/find-test-content
Command: npx skills add https://github.com/aemgdc/aemdev --skill find-test-content-aemgdc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jsdom, and includes scripts (resource) components.

What problem does it solve? When modifying or extending an existing block in an AEM Edge Delivery Services project, developers need real pages that already use that block for testing. Manually hunting through a site for block usage is slow and error-prone; this Skill automates the search across the entire indexed site. ## Core Features & Use Cases - Site-wide block search: Queries the site's query-index and scans every page for a specified block by CSS class. - Variant detection: Reports all block variants (e.g., dark, featured, three-up) found on each matching page, plus instance counts. - Flexible hosts: Works against a local dev server (localhost:3000) or live/preview URLs such as main--mysite--owner.aem.live. - Use Case: Before refactoring the cards block, run the search to find that /services uses the three-up and dark variants while /team uses two-up, giving you concrete URLs to validate your changes against. ## Quick Start Ask the assistant to find all pages on the local dev server that contain the hero block so you can use them as test content.

Frequently Asked Questions about find-test-content

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find pages that use a specific AEM block?▼

Run the find-block-content.js script with the block name, for example: node find-block-content.js hero. It queries the site's query-index, scans each page's HTML for the block's CSS class, and lists all matching URLs with their variants.

How do I find test content for an existing AEM Edge Delivery block?▼

Use this search against your local dev server (localhost:3000) or a live/preview host. It reports every indexed page containing the block, including variant classes like dark or featured, so you can pick representative URLs for testing.

Can I search for blocks on a live or preview AEM site?▼

Yes. Pass the host as the second argument, such as main--mysite--owner.aem.live or main--mysite--owner.aem.page. The script uses https for non-localhost hosts and http for localhost automatically.

Why does the block search return no pages found?▼

Common causes: the dev server is not running, the query-index has not been generated, the block name is misspelled, or the content exists but has not been published. Verify the server responds and the block name matches its CSS class.

What are the limitations of searching blocks via query-index?▼

Only indexed pages are searched, so new or unpublished content will not appear. It detects block presence and CSS-class variants only; it cannot search for specific content inside blocks or validate content quality.