enonic-content-type-generator
Installation
SKILL.md
Enonic XP Content Type Generator
Procedures
Step 1: Detect Enonic XP Project
- Execute
node scripts/find-enonic-targets.mjs [workspaceRoot]to locate Enonic XP project roots. - If the script returns an empty array, warn that no Enonic XP project markers were found and ask for the target directory.
- Store the detected project root for use in subsequent steps.
Step 2: Gather Requirements
- Identify the content type name from the request. The name must be lowercase-hyphenated (e.g.,
blog-post). - Identify the display name — a human-readable label (e.g.,
Blog Post). - Determine the super-type. Default to
base:structuredunless the request specifies a folder (base:folder) or another built-in type. - List all requested fields with their input types. Read
references/content-type-reference.mdto map natural-language field descriptions to the correct Enonic XP input type and configuration. - Identify any item sets (repeatable grouped fields), option sets (single-select or multi-select choices), or mixin references.
- If the request mentions a mixin, determine whether to generate the mixin file or reference an existing one.
- If the request mentions x-data, determine whether to generate the x-data file or reference an existing one.