enonic-controller-generator
Installation
SKILL.md
Enonic XP Controller Generator
Procedures
Step 1: Detect Enonic XP Project
- Execute
node scripts/find-enonic-targets.mjs <workspace-root>to locate the project root and existing components. - If the script exits with code 1 (no markers found), inform the user that no Enonic XP project was detected and stop.
- Record the
sitePathfrom stdout — all generated files target directories relative to this path.
Step 2: Determine Component Type
- Identify which component type the user requires:
- Page — renders a full page, may declare one or more regions.
- Part — a leaf component with a config form, no regions.
- Layout — organizes other components via named regions.
- Response processor — a site-level filter that modifies the HTTP response (e.g., inject scripts).
- If the request is ambiguous, ask the user to clarify the component type before proceeding.