enonic-api-reference
Enonic XP server-side JavaScript/TypeScript API reference for all /lib/xp/* libraries. Provides function signatures, parameters, return types, and usage examples for lib-content, lib-node, lib-auth, lib-portal, lib-context, lib-event, lib-task, lib-repo, lib-io, lib-mail, and lib-schema. Use when looking up Enonic XP library functions, parameter shapes, return types, or usage examples. Do not use for Guillotine GraphQL queries, content type schema definitions, Enonic CLI commands, or non-Enonic JavaScript APIs.
How do I install this agent skill?
npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-api-referenceIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides a comprehensive technical reference for Enonic XP server-side JavaScript and TypeScript APIs. It contains documentation, function signatures, and code examples for various Enonic libraries without any detected security risks.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
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.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/webmaxru/enonic-agent-skills/enonic-api-reference">View enonic-api-reference on skillZs</a>