
enonic-content-type-generator
Generates Enonic XP content type XML schema definitions from natural-language descriptions. Covers structured content modeling including input types, form layout, option sets, item sets, mixins, x-data, and content-type inheritance. Use when creating, scaffolding, or generating Enonic XP content type definitions, adding fields or sets to existing content types, or querying Enonic XP input types and super-types. Do not use for non-Enonic content modeling, GraphQL queries, JavaScript/TypeScript controllers, or generic XML editing unrelated to Enonic schemas.
- Installs
- 460
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-content-type-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads enonic-content-type-generator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
Step 3: Generate the Content Type XML
- Read
assets/content-type.template.xmlto obtain the starter template. - Replace
DISPLAY_NAMEwith the display name from Step 2. - Replace
DESCRIPTIONwith a short description or remove the element if none was provided. - Set the
<super-type>element to the value determined in Step 2. - Populate the
<form>element with the identified inputs, item sets, option sets, field sets, and mixin references. - For each input:
- Set the
nameattribute using camelCase. - Set the
typeattribute to the exact Enonic XP input type name (case-sensitive). - Add
<label>,<occurrences>,<help-text>,<default>, and<config>as required.
- Set the
- For ComboBox and RadioButton inputs, include all options inside
<config>. - For ContentSelector, ImageSelector, and MediaSelector inputs, include
<config>withallowContentType,allowPath,treeMode, andhideToggleIconas specified. - For TextLine and TextArea, add
<config>withmax-length,show-counter, orregexpif validation constraints are requested. - For Long and Double, add
<config>withminandmaxif range constraints are requested. - For DateTime, add
<config>with<timezone>true</timezone>if timezone-aware storage is requested. - If examples are needed for reference, read
references/examples.md.
Step 4: Write the File
- Construct the target path:
[projectRoot]/src/main/resources/site/content-types/[name]/[name].xml - Create the directory if it does not exist.
- Write the generated XML to the file.
- If a mixin was generated, write it to:
[projectRoot]/src/main/resources/site/mixins/[name]/[name].xml - If x-data was generated, write it to:
[projectRoot]/src/main/resources/site/x-data/[name]/[name].xml - If x-data references are needed in
site.xml, add<x-data>entries withallowContentTypesandoptionalattributes as specified.
Step 5: Validate Output
- Verify the generated XML is well-formed.
- Confirm every
<input>has a validtypeattribute by cross-referencingreferences/content-type-reference.md. - Confirm all
nameattributes are unique within their nesting level. - Confirm
<occurrences>values are logically consistent (minimum <= maximum, or maximum = 0 for unlimited). - If the request asks about super-types, input types, or schema structure without requesting file generation, answer the question using
references/content-type-reference.mdwithout creating files.
Error Handling
- If
scripts/find-enonic-targets.mjsexits with a non-zero code, report the stderr message and ask for the project root path manually. - If the requested input type does not match any known Enonic XP input type, read
references/content-type-reference.mdand suggest the closest match. Do not invent input type names. - If XML validation fails, read
references/troubleshooting.mdto diagnose and correct the error, then regenerate the file. - If a mixin reference cannot be resolved, confirm the mixin file path exists before writing the content type.
FAQ
What does the enonic-content-type-generator skill do?
Generates Enonic XP content type XML schema definitions from natural-language descriptions. Covers structured content modeling including input types, form layout, option sets, item sets, mixins, x-data, and content-type inheritance. Use when creating, scaffolding, or generating Enonic XP content type definitions, adding fields or sets to existing content types, or querying Enonic XP input types and super-types. Do not use for non-Enonic content modeling, GraphQL queries, JavaScript/TypeScript controllers, or generic XML editing unrelated to Enonic schemas.
How do I install enonic-content-type-generator?
Run npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-content-type-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/enonic-content-type-generator/ (personal) or .claude/skills/enonic-content-type-generator/ (project).
Which AI agents can use enonic-content-type-generator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is enonic-content-type-generator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains enonic-content-type-generator?
It is published by webmaxru in webmaxru/enonic-agent-skills. It has 460 recorded installs.
More from webmaxru/enonic-agent-skills
enonic-nextxp-integration
webmaxru/enonic-agent-skills
Open the skill to read its SKILL.md instructions.
agent-skill-deploy
webmaxru/enonic-agent-skills
Deploys agent skill collections from any GitHub repository with a /skills folder to one or more distribution surfaces: GitHub releases, Claude Code marketplace, VS Code plugin marketplace, and Copilot CLI plugin marketplace. Handles pre-flight validation, conventional commit analysis, version bumping across surface configs, and surface-specific publishing with dry-run support. Use when releasing, publishing, or deploying a skills collection to any supported marketplace or creating a GitHub release for a skills repository. Don't use for deploying non-skill packages, npm modules, Docker images, or Azure resources.
enonic-guillotine-query-builder
webmaxru/enonic-agent-skills
Open the skill to read its SKILL.md instructions.
agent-package-manager
webmaxru/enonic-agent-skills
Installs, configures, audits, and operates Agent Package Manager (APM) in repositories. Use when initializing apm.yml, installing or updating packages, validating manifests, managing lockfiles, compiling agent context, browsing MCP servers, setting up runtimes, or packaging resolved context for CI and team distribution. Don't use for writing a single skill by hand, generic package managers like npm or pip, or non-APM agent configuration systems.
github-agentic-workflows
webmaxru/enonic-agent-skills
Authors, reviews, installs, and debugs GitHub Agentic Workflows in repositories, including workflow markdown, frontmatter, gh aw compile and run flows, safe outputs, security guardrails, and operational patterns. Use when creating or maintaining GH-AW automation. Don't use for standard deterministic GitHub Actions YAML, generic CI pipelines, or non-GitHub automation systems.
skill-creator
webmaxru/enonic-agent-skills
Authors and structures professional-grade agent skills following the agentskills.io spec. Use when creating new skill directories, drafting procedural instructions, or optimizing metadata for discoverability. Don't use for general documentation, non-agentic library code, or README files.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.