Help us improve
Share bugs, ideas, or general feedback.
From enonic-skills
Sets up Enonic XP event listeners, webhook configurations, and external system integrations triggered by content lifecycle events. Covers lib-event listener registration, node event filtering, outbound webhook configuration via com.enonic.xp.webhooks.cfg, custom HTTP service controllers for inbound webhooks, task-based async processing with lib-task, and outbound HTTP calls with lib-httpClient. Use when listening for content publish/create/update/delete events, configuring outbound webhooks, building HTTP service endpoints for inbound webhooks, or triggering async processing on content changes. Do not use for content querying, frontend component development, non-Enonic event systems, or GitHub webhook configuration.
npx claudepluginhub webmaxru/ai-native-dev --plugin enonic-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/enonic-skills:enonic-event-managerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Step 1: Detect the Enonic XP project**
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Structures git workflow practices for committing, branching, resolving conflicts, and organizing work across parallel streams. Use when making any code change.
Share bugs, ideas, or general feedback.
Step 1: Detect the Enonic XP project
node scripts/find-enonic-targets.mjs . to locate Enonic XP project roots in the workspace.gradle.properties (appName) or build.gradle.Step 2: Determine integration direction
references/event-reference.md to identify the correct event types, listener patterns, and filtering strategies.references/webhook-reference.md when the task involves outbound webhook configuration or inbound HTTP service endpoints.Step 3: Implement outbound event listener (if applicable)
assets/event-listener.template.ts as a starting scaffold.main.ts (or main.js) controller using lib-event's listener() function.type parameter with a pattern matching the target node events (e.g., node.pushed, node.created, node.updated, node.deleted).event.data.nodes[].path to restrict processing to the intended content tree.request() function inside the callback or delegate to a background task.executeFunction() to avoid blocking the event thread.references/examples.md for complete integration patterns including CDN invalidation, search reindexing, and notification dispatch.Step 4: Configure outbound webhooks (if applicable)
references/webhook-reference.md for the com.enonic.xp.webhooks.cfg configuration format.XP_HOME/config/com.enonic.xp.webhooks.cfg with webhook entries specifying the target URL and event types.REPLACE_WITH_CDN_SECRET) and instruct the operator to substitute real credentials out-of-band. Secrets must be managed by the operator through secure deployment pipelines, environment variables, or secret management tools—not committed to files.Step 5: Implement inbound webhook endpoint (if applicable)
assets/http-service.template.ts as a starting scaffold.src/main/resources/services/<serviceName>/<serviceName>.ts.post(req) function that parses the incoming JSON payload from req.body..., /, \).200 for success, 400 for malformed payloads, 401 for authentication failures, 413 for oversized payloads, 500 for unexpected errors.Step 6: Wire async processing with lib-task (if applicable)
executeFunction() from lib-task.progress() to allow monitoring.references/event-reference.md for the task event lifecycle (task.submitted, task.updated, task.finished, task.failed).Step 7: Validate the integration
node scripts/find-enonic-targets.mjs . to confirm the project still resolves correctly.main.ts or main.js file, which runs at application startup.references/troubleshooting.md when events do not fire, webhook deliveries fail, or inbound requests are rejected.node scripts/find-enonic-targets.mjs . finds no projects, confirm that build.gradle references com.enonic.xp plugins or that a src/main/resources/site/ directory exists.references/troubleshooting.md to check listener registration location, event type patterns, and cluster vs. local event scope.services/<name>/<name>.ts and the application is deployed.taskLib.list() and inspect logs for errors within the task function.