/enonic-skills:enonic-content-managementfrom enonic-skills
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.
Ships in enonic-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Step 1: Identify the Enonic XP project and operation scope
build.gradle with com.enonic.xp dependencies, src/main/resources/ directory structure, or gradle.properties with xpVersion.node scripts/find-enonic-targets.mjs . to scan for Enonic XP project markers and existing content operation files when a Node runtime is available.gradle.properties or build.gradle to select the correct API surface.Step 2: Select the API layer and context
references/migration-reference.md for query DSL patterns, batch processing strategies, and branch handling rules.lib-content when the operation works with CMS content and needs publish/unpublish, content-type validation, and the content domain abstraction.lib-node when the operation needs low-level node manipulation, custom repositories, or bypasses content-type validation for raw data migration.lib-context to run operations in draft branch for modifications and master branch for reading published content.lib-context with role:system.admin principal when the operation requires elevated permissions.lib-task. Read references/migration-reference.md section on task controllers for the pattern.Step 3: Build the query
contentTypes parameter on contentLib.query() or a type property comparison in node queries.instant() or dateTime() functions and the range() query function.fulltext() with the appropriate field paths and operator (AND/OR)._path LIKE '/content/site-path/*' to match descendants. Note: the _path property in NoQL queries includes the internal /content/ prefix, but hit._path in results returns the content-domain path without it. Always prepend /content/ when building queries from result paths.filters for efficient post-query narrowing using exists, notExists, hasValue, or boolean combinations.aggregations when the operation needs grouped statistics (term counts, date histograms, numeric ranges, stats).references/examples.md for complete query and aggregation patterns.Step 4: Implement batch processing
start and count parameters to avoid loading all results into memory.count to a batch size between 50 and 200 depending on the complexity of per-item processing.result.hits.length === 0 or start >= result.total, incrementing start by the batch size each iteration.contentLib.create() in bulk, set refresh: false to avoid per-item index refresh; call a manual refresh after the batch completes.contentLib.modify(), use the editor callback pattern to safely transform each content item.contentLib.publish(), batch keys into groups of 50–100 to avoid timeout on large publish sets.assets/bulk-update.template.ts for the reusable batch update controller template. Note: templates use TypeScript/ESM syntax (import, const, arrow functions); adapt to CommonJS JavaScript (require(), var, function()) for XP runtime deployment as .js files.Step 5: Handle branch operations and publishing
draft branch context.master using contentLib.publish(). On XP < 7.12, pass sourceBranch: 'draft' and targetBranch: 'master'. On XP 7.12+, these parameters are ignored (publish always goes draft→master).includeDependencies: false when publishing bulk-updated items to avoid unintended dependency publishing.repo.diff() from lib-node with target: 'master' and includeChildren: true.Step 6: Wrap long-running operations in a task controller
taskLib.executeFunction() for inline task functions or taskLib.submitTask() for named task descriptors.taskLib.progress({ info, current, total }) at regular intervals during batch processing.assets/task-migration.template.ts for the reusable task controller template with progress reporting.taskLib.isRunning() before starting a duplicate operation.taskLib.sleep() for throttling between batches if the operation generates excessive load.run function receives taskId as its second argument: exports.run = function(params, taskId) { ... }.Step 7: Validate and report results
master branch.scripts/find-enonic-targets.mjs finds no Enonic XP project, explain that the workspace does not contain an Enonic XP application.contentAlreadyExists, check whether the target exists and decide whether to update or skip. Read references/troubleshooting.md for duplicate handling patterns.instant() wrapper for date comparisons) are a common cause.taskLib.get(taskId) for state and progress details. Read references/troubleshooting.md for timeout and permission issues.AccessDeniedException occurs on publish or modify, ensure the context includes role:system.admin principals via lib-context.assets/bulk-update.template.ts (opens in a new tab)assets/task-migration.template.ts (opens in a new tab)references/compatibility.md (opens in a new tab)references/examples.md (opens in a new tab)references/migration-reference.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)scripts/find-enonic-targets.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/enonic-app-managerGuides 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./enonic-content-type-generatorGenerates 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./enonic-controller-generatorGenerates Enonic XP controller files (TypeScript/JavaScript) and paired XML descriptors for pages, parts, and layouts. Covers lib-portal imports, HTTP handler exports, region definitions, Thymeleaf/Mustache rendering, and response processors. Use when scaffolding page controllers with regions, part controllers with config access, layout controllers with multi-region support, or response processors for Enonic XP sites. Do not use for content type schemas, headless Next.js/React frontends, GraphQL Guillotine queries, or non-Enonic web frameworks.enonic-skills@webmaxru-ai-native-dev is listed by webmaxru/ai-native-dev — review the source before installing
npx claudepluginhub webmaxru/ai-native-dev --plugin enonic-skills