enonic-api-reference
Enonic XP Server-Side API Reference
Procedures
Step 1: Identify the Target Library
-
Determine which
/lib/xp/*library the query relates to. -
Map the library to the appropriate reference file:
Library Reference File lib-content references/lib-content-reference.mdlib-node references/lib-node-reference.mdlib-auth references/lib-auth-reference.mdlib-portal references/lib-portal-reference.mdlib-context, lib-event, lib-task references/lib-context-reference.mdlib-io, lib-mail, lib-repo, lib-schema references/lib-utilities-reference.md -
If the query spans multiple libraries or asks for a usage pattern, read
references/examples.md.
Step 2: Look Up the Function
- Read the identified reference file.
- Locate the specific function by name.
- Extract the following details:
- Signature: Function name and import path.
- Parameters: Name, type, required/optional, default value, description.
- Return type: Type and shape of the returned value.
- Example: Code snippet demonstrating correct usage.
Step 3: Provide the Answer
- Present the function signature with its import statement.
- Include the parameter table with types and descriptions.
- Include the return type and shape.
- Add a usage example. If the reference file includes one, use it. Otherwise, compose a minimal working example consistent with the documented signature.
- Note any version requirements (e.g., "Requires XP 7.8.0+").
Step 4: Handle Cross-Library Patterns
- If the query involves combining multiple libraries (e.g., "create content as admin"), read
references/examples.mdfor established patterns. - If a pattern is not documented, compose it by combining individual function signatures from the relevant reference files.
Step 5: Troubleshoot Common Issues
- If the query describes an error or unexpected behavior, read
references/troubleshooting.md. - Match the error message or symptom to a known issue.
- Provide the documented fix and any version-compatibility notes.
Step 6: Generate Import Blocks
- If the user needs a reusable import block, read
assets/enonic-imports.template.ts. - Uncomment only the libraries required for the user's controller.
Error Handling
- If a function is not found in any reference file, report that it may belong to a community library or a newer XP version not yet documented, and suggest checking https://developer.enonic.com/docs/xp/stable/api.
- If the query relates to Guillotine/GraphQL, content type schemas, or Enonic CLI, indicate that this skill does not cover those topics.
- If a version mismatch is suspected, consult the version compatibility table in
references/troubleshooting.md.
More from webmaxru/enonic-agent-skills
enonic-webhook-integrator
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.
91skill-creator
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.
89agent-skill-deploy
>
89enonic-content-migration
Generates Enonic XP scripts for bulk content operations — creating, updating, querying, migrating, and transforming content using lib-content and lib-node APIs. Covers the query DSL (NoQL), aggregations, batch processing, task controllers for long-running operations, and export/import workflows. Use when writing bulk content creation, update, or deletion scripts, querying with NoQL syntax, migrating content between environments, running long-running task operations, or working with aggregations and paginated retrieval. Do not use for Guillotine GraphQL frontend queries, content type schema definitions, single contentLib.get() calls, or non-Enonic data migration tools.
89enonic-sandbox-manager
Guides developers through Enonic CLI commands for sandbox management, project scaffolding, local development, app deployment, and CI/CD pipeline generation. Use when creating Enonic XP sandboxes, starting or stopping local instances, scaffolding projects from starters, running dev mode with hot-reload, deploying apps, or generating CI/CD workflows for Enonic apps. Don't use for writing XP application code (controllers, content types), querying via Guillotine or lib-content APIs, configuring non-Enonic environments, or Docker/Kubernetes deployment of XP.
89enonic-guillotine-query-builder
Composes, debugs, and optimizes Guillotine GraphQL queries for Enonic XP headless content delivery. Covers query construction, variable usage, filtering, aggregation, pagination, sorting, and TypeScript type generation from the auto-generated Guillotine schema. Use when writing or troubleshooting Guillotine queries, querying custom content types through GraphQL, or generating typed interfaces from Guillotine responses. Don't use for content type XML definitions, non-Enonic GraphQL APIs (Apollo, Hasura), server-side lib-content queries, or Guillotine deployment and CORS configuration.
89