From dx-aem
Find all source files, AEM pages, and dialog fields for an AEM component. Use when a developer asks "where is component X?", "what files for hero?", or any component lookup question.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dx-aem:aem-componentThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You receive a component name and produce a complete developer reference — every source file, AEM page, and dialog field for that component.
You receive a component name and produce a complete developer reference — every source file, AEM page, and dialog field for that component.
Performance target: ~10-15 tool calls total. No unnecessary agents or MCP calls.
The argument is a component name. Accept any format and generate all search variations.
Strip resource type prefixes:
project/components/content/hero → heromyapp/base/components/myapp-banner → myapp-bannerRead .ai/config.yaml for aem.component-prefix to know the project's naming prefix.
From the base name, generate a regex pattern for grep that covers all naming conventions:
Given input {name}:
{name}my-component → mycomponentmycomponent → my-component<prefix>-{name} (from aem.component-prefix)prefix-hero → also search heroIf .ai/project/project.yaml exists: Read platforms[].component-prefixes for additional prefix variations. For each prefix, generate {prefix}{name} as an additional variation. Example: prefixes [mycomp-, mycomp-bff-, canada-, corp-] → also search mycomp-{name}, mycomp-bff-{name}, canada-{name}, corp-{name}.
Build a single grep regex covering all variations.
If no argument provided, ask the user for the component name.
Do NOT spawn an agent for this. Use direct Grep/Read calls — it's just 2-4 files.
Run these Grep calls in parallel (all variations in one regex pattern):
.ai/project/component-index.md for all variations — the local repo component index (generated by /aem-init).ai/project/component-index-project.md for all variations — the cross-repo enriched component catalog (if it exists).ai/config.yaml for project structure details — repos, component paths, SCM URLsFrom component-index-project.md extract (if found):
Legacy, DXN, or both (determines which file patterns to use)B, C, B C, Yes, N/A (determines which FE repos/paths to search)If Component Details section exists for this component in component-index-project.md: extract dialog fields, Java models, clientlib info. These serve as fallback when AEM MCP is unavailable.
If .ai/project/file-patterns.yaml exists, spawn ONE aem-file-resolver agent with:
component_name — the confirmed component name from step 2platform — detected platform(s) from the index matchfe_locations — FE column value from component-index-project.mdThe agent reads file-patterns.yaml, resolves all files per platform, and returns a structured file table with ADO URLs.
Multi-platform support: If the component exists on multiple platforms (e.g., both Legacy and DXN), the agent resolves files for EACH platform separately and returns separate Backend sections.
Read .ai/config.yaml for:
scm.org and scm.project — for building SCM URLsaem.component-path — component definition rootaem.frontend-dir — frontend source root (if applicable)repos: — for cross-repo file resolutionSCM URL pattern — Build URLs from the SCM config. For ADO:
https://<scm.org>.visualstudio.com/<scm.project-url-encoded>/_git/<REPO>?path=/<FILE_PATH>
Or read ado.org from project.yaml:
https://{ado.org}/{ado-project}/_git/{repo}?path=/{FILE_PATH}
Apps files — Use aem.component-path to derive:
| File | Derived Path |
|---|---|
| HTL template | <component-path>/<name>/<name>.html (or versioned: <name>/v1/<name>/<name>.html) |
| Dialog | <component-path>/<name>/_cq_dialog/.content.xml (or versioned path) |
| Component def | <component-path>/<name>/.content.xml |
Verify with Glob — don't assume the exact path pattern. Glob for **/<name>/**/*.html and **/<name>/**/.content.xml to confirm.
Frontend files — Use aem.frontend-dir to locate JS/SCSS/config:
| File | Pattern |
|---|---|
| JS | <frontend-dir>/**/components/<name>/*.<name>*.js |
| SCSS | <frontend-dir>/**/components/<name>/*.<name>*.scss |
| Config | <frontend-dir>/**/components/<name>/*.<name>*.config.js |
Java/backend files — Grep for the component name in Java source:
Grep: {name}
path: <java-source-root>
glob: "*.java"
Only use ADO code search (mcp__ado__search_code) as a LAST RESORT — if a component isn't in the docs at all and conventions don't apply.
If .ai/project/project.yaml exists:
project.yaml to get AEM content pathsprimary_language_only: true to aem-page-finder (reduces MCP calls)canada-), scope the search to matching markets onlyRead .ai/config.yaml aem.content-paths for configured content paths.
Spawn ONE aem-page-finder agent (model: haiku). Pass it:
project.yaml → defaults.qa-author-url or config.yaml → aem.author-url-qa)primary_language_only: true (from content-paths.yaml or default)Run this agent in parallel with source file resolution (step 3).
If AEM MCP is reachable, read the dialog structure:
mcp__plugin_dx-aem_AEM__getNodeContent on the _cq_dialog path with depth 6If AEM is not reachable BUT Component Details section exists in component-index-project.md for this component (from step 2): display those dialog fields as fallback.
If neither source is available, note "Dialog fields not available — no AEM MCP and no Component Details in index".
## Component: <name>
**Resource type:** `<resource-type>`
**Platform:** <Legacy | DXN | both>
**FE:** <B | C | B C | Yes | N/A>
---
### Source Files
**Backend — <repo> (<platform>)**
| File | Purpose | Link |
|------|---------|------|
| `<name>.html` | HTL template | [link](url) |
| `_cq_dialog/.content.xml` | Author dialog | [link](url) |
| `.content.xml` | Component definition | [link](url) |
| `<Name>Model.java` | Sling Model | [link](url) |
| `<Name>ModelTest.java` | Unit test | [link](url) |
<If multi-platform, show separate Backend sections per platform>
**Frontend — <repo> (<brand|core>)**
| File | Purpose | Link |
|------|---------|------|
| `<name>.js` | Component logic | [link](url) |
| `<name>.scss` | Styles | [link](url) |
| `<name>.hbs` | Template (Legacy only) | [link](url) |
### Dialog Fields
| Field | Type | Label | JCR Property |
|-------|------|-------|-------------|
| ... | ... | ... | ... |
<Note source: "(from AEM MCP)" or "(from Component Details fallback)">
### AEM Pages
| Page | Market | Author URL |
|------|--------|-----------|
| <page-name> | <market> | [link](url) |
<Group by market/language when market-scoped search was used>
### Notes
<Naming mismatches, shared FE, missing files, edge cases, category info>
---
**Save results to a file?** (suggested: `.ai/research/<name>.md`)
If the user says yes:
.ai/research/<name>.md.ai/research/ directory if it doesn't exist/aem-component hero
Finds all source files for the hero component — HTL, dialog XML, Java model, JS, SCSS. Shows dialog fields from AEM MCP (or index fallback). Lists top AEM pages using it with author URLs.
/aem-component myprefix-banner
Strips the prefix, searches for both banner and myprefix-banner variations. Resolves files using file-patterns.yaml if available.
/aem-component card
If card exists on both Legacy and DXN platforms, shows separate Backend sections for each with platform-specific file paths and ADO links.
Cause: Component is new (not yet in seed data) or uses an unexpected naming convention.
Fix: Run /aem-refresh to update seed data. Or check the component name — try without prefix, with hyphens removed, or with different prefix variations.
Cause: Component isn't authored on any pages, or content paths in config don't cover the right site.
Fix: Check .ai/config.yaml aem.content-paths covers the target site. The component may only exist in a market not listed in aem.active-markets.
Cause: AEM MCP server is not running or unreachable.
Fix: Start AEM locally (http://localhost:4502). If AEM is unavailable, the skill falls back to Component Details from component-index-project.md if available.
component-index.md AND component-index-project.md before any MCP calldata-component-name attribute; another component may share the FE codenpx claudepluginhub easingthemes/dx-aem-flow --plugin dx-aemGenerates YAML index files (.ai/index/) for design system codebases: component inventory, relationship graph, summary stats. Enables fast AI agent queries on components and dependencies.
Creates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.