
enonic-content-management
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.
- Installs
- 295
- 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-management- 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-management 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 Content Management
Procedures
Step 1: Identify the Enonic XP project and operation scope
- Inspect the workspace for Enonic XP project markers:
build.gradlewithcom.enonic.xpdependencies,src/main/resources/directory structure, orgradle.propertieswithxpVersion. - Execute
node scripts/find-enonic-targets.mjs .to scan for Enonic XP project markers and existing content operation files when a Node runtime is available. - If no Enonic XP project is detected, stop and explain that this skill targets Enonic XP content operations only.
- Determine the target XP version from
gradle.propertiesorbuild.gradleto select the correct API surface. - Classify the requested operation:
- Bulk create: Importing content from external sources (JSON, CSV, APIs).
- Bulk update: Modifying existing content matching query criteria.
- Bulk delete: Removing content matching query criteria.
- Migration: Moving or transforming content between paths, sites, or environments.
- Query/Aggregation: Retrieving and analyzing content with NoQL and aggregations.
- Long-running task: Any operation processing more than ~100 items that needs progress reporting.
Step 2: Select the API layer and context
- Read
references/migration-reference.mdfor query DSL patterns, batch processing strategies, and branch handling rules. - Choose
lib-contentwhen the operation works with CMS content and needs publish/unpublish, content-type validation, and the content domain abstraction. - Choose
lib-nodewhen the operation needs low-level node manipulation, custom repositories, or bypasses content-type validation for raw data migration. - Determine the required context:
- Use
lib-contextto run operations indraftbranch for modifications andmasterbranch for reading published content. - Use
lib-contextwithrole:system.adminprincipal when the operation requires elevated permissions.
- Use
- If the operation processes more than ~100 items, wrap it in a task controller using
lib-task. Readreferences/migration-reference.mdsection on task controllers for the pattern.
Step 3: Build the query
- Construct the NoQL query string or DSL expression to match the target content.
- For content-type filtering, use the
contentTypesparameter oncontentLib.query()or atypeproperty comparison in node queries. - For date-range queries, use
instant()ordateTime()functions and therange()query function. - For full-text search, use
fulltext()with the appropriate field paths and operator (AND/OR). - For path-scoped operations, use
_path LIKE '/content/site-path/*'to match descendants. Note: the_pathproperty in NoQL queries includes the internal/content/prefix, buthit._pathin results returns the content-domain path without it. Always prepend/content/when building queries from result paths. - Add
filtersfor efficient post-query narrowing usingexists,notExists,hasValue, orbooleancombinations. - Add
aggregationswhen the operation needs grouped statistics (term counts, date histograms, numeric ranges, stats). - Read
references/examples.mdfor complete query and aggregation patterns.
Step 4: Implement batch processing
- Use paginated retrieval with
startandcountparameters to avoid loading all results into memory. - Set
countto a batch size between 50 and 200 depending on the complexity of per-item processing. - Loop until
result.hits.length === 0orstart >= result.total, incrementingstartby the batch size each iteration. - For
contentLib.create()in bulk, setrefresh: falseto avoid per-item index refresh; call a manual refresh after the batch completes. - For
contentLib.modify(), use the editor callback pattern to safely transform each content item. - For
contentLib.publish(), batch keys into groups of 50–100 to avoid timeout on large publish sets. - Track success and failure counts for reporting.
- Read
assets/bulk-update.template.tsfor 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.jsfiles.
Step 5: Handle branch operations and publishing
- Run content modifications in the
draftbranch context. - After modifications complete, publish changed items to
masterusingcontentLib.publish(). On XP < 7.12, passsourceBranch: 'draft'andtargetBranch: 'master'. On XP 7.12+, these parameters are ignored (publish always goes draft→master). - Set
includeDependencies: falsewhen publishing bulk-updated items to avoid unintended dependency publishing. - For operations comparing draft and master state, use
repo.diff()fromlib-nodewithtarget: 'master'andincludeChildren: true.
Step 6: Wrap long-running operations in a task controller
- Use
taskLib.executeFunction()for inline task functions ortaskLib.submitTask()for named task descriptors. - Report progress using
taskLib.progress({ info, current, total })at regular intervals during batch processing. - Read
assets/task-migration.template.tsfor the reusable task controller template with progress reporting. - Check for existing running instances with
taskLib.isRunning()before starting a duplicate operation. - Use
taskLib.sleep()for throttling between batches if the operation generates excessive load. - For named tasks on XP 7.13+, the
runfunction receivestaskIdas its second argument:exports.run = function(params, taskId) { ... }.
Step 7: Validate and report results
- After the operation completes, log a summary: items processed, items created/updated/deleted, items failed, total duration.
- For migration operations, verify target content exists by querying the destination path.
- For publish operations, verify published state by querying the
masterbranch. - If errors occurred, collect error details (content path, error message) into a structured report.
Error Handling
- If
scripts/find-enonic-targets.mjsfinds no Enonic XP project, explain that the workspace does not contain an Enonic XP application. - If a content operation fails with
contentAlreadyExists, check whether the target exists and decide whether to update or skip. Readreferences/troubleshooting.mdfor duplicate handling patterns. - If a query returns zero results, verify the query syntax, branch context, and property paths. NoQL string-format mismatches (e.g. missing
instant()wrapper for date comparisons) are a common cause. - If a task fails or times out, check
taskLib.get(taskId)for state and progress details. Readreferences/troubleshooting.mdfor timeout and permission issues. - If an
AccessDeniedExceptionoccurs on publish or modify, ensure the context includesrole:system.adminprincipals vialib-context.
FAQ
What does the enonic-content-management skill do?
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.
How do I install enonic-content-management?
Run npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-content-management 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-management/ (personal) or .claude/skills/enonic-content-management/ (project).
Which AI agents can use enonic-content-management?
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-management 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-management?
It is published by webmaxru in webmaxru/enonic-agent-skills. It has 295 recorded installs.
More from webmaxru/enonic-agent-skills
enonic-nextxp-integration
webmaxru/enonic-agent-skills
Guides setup, development, and troubleshooting of the Next.js and Enonic XP headless integration (Next.XP framework). Covers Enonic adapter configuration, content type to React component mapping, Guillotine GraphQL data fetching, Content Studio preview mode, and draft/master branch switching. Use when building a Next.js frontend powered by Enonic XP, configuring the Next.XP adapter, mapping content types to components, fetching Enonic content via Guillotine in Next.js, or debugging Content Studio preview. Don't use for traditional server-side Enonic XP rendering, standalone Guillotine queries without Next.js, non-Next.js frontend frameworks with Enonic, or React4XP embedded rendering.
enonic-content-type-generator
webmaxru/enonic-agent-skills
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.
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
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.
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.
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 productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。