Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

enonic-content-migration烯基含量迁移

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

1,794

周安装

74

GitHub Stars

公开资料未说明

下载量

586
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:enonic-content-migration(烯基含量迁移)
来源仓库:https://github.com/webmaxru/enonic-agent-skills
仓库路径:skills/enonic-content-migration
安装命令:
npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-content-migration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/webmaxru/enonic-agent-skills --skill enonic-content-migration

简介

用于辅助 Enonic XP 内容迁移操作,确保数据完整性与结构兼容。

  • 适合在升级版本或跨平台迁移时使用,自动识别项目标记与目标版本。
  • 执行前需确认 build.gradle 与 gradle.properties 中的 xpVersion,避免不兼容变更。
  • 提供迁移步骤清单与风险提示,建议在测试环境验证后再应用于生产数据。
  • enonic-content-migration 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Enonic Content Migration

Procedures

Step 1: Identify the Enonic XP project and operation scope

  1. Inspect the workspace for Enonic XP project markers: build.gradle with com.enonic.xp dependencies, src/main/resources/ directory structure, or gradle.properties with xpVersion.
  2. 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.
  3. If no Enonic XP project is detected, stop and explain that this skill targets Enonic XP content operations only.
  4. Determine the target XP version from gradle.properties or build.gradle to select the correct API surface.
  5. 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

  1. Read references/migration-reference.md for query DSL patterns, batch processing strategies, and branch handling rules.
  2. Choose lib-content when the operation works with CMS content and needs publish/unpublish, content-type validation, and the content domain abstraction.
  3. Choose lib-node when the operation needs low-level node manipulation, custom repositories, or bypasses content-type validation for raw data migration.
  4. Determine the required context:

- Use lib-context to run operations in draft branch for modifications and master branch for reading published content. - Use lib-context with role:system.admin principal when the operation requires elevated permissions.

  1. If the operation processes more than ~100 items, wrap it in a task controller using lib-task. Read references/migration-reference.md section on task controllers for the pattern.

Step 3: Build the query

  1. Construct the NoQL query string or DSL expression to match the target content.
  2. For content-type filtering, use the contentTypes parameter on contentLib.query() or a type property comparison in node queries.
  3. For date-range queries, use instant() or dateTime() functions and the range() query function.
  4. For full-text search, use fulltext() with the appropriate field paths and operator (AND/OR).
  5. For path-scoped operations, use _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.
  6. Add filters for efficient post-query narrowing using exists, notExists, hasValue, or boolean combinations.
  7. Add aggregations when the operation needs grouped statistics (term counts, date histograms, numeric ranges, stats).
  8. Read references/examples.md for complete query and aggregation patterns.

Step 4: Implement batch processing

  1. Use paginated retrieval with start and count parameters to avoid loading all results into memory.
  2. Set count to a batch size between 50 and 200 depending on the complexity of per-item processing.
  3. Loop until result.hits.length === 0 or start >= result.total, incrementing start by the batch size each iteration.
  4. For contentLib.create() in bulk, set refresh: false to avoid per-item index refresh; call a manual refresh after the batch completes.
  5. For contentLib.modify(), use the editor callback pattern to safely transform each content item.
  6. For contentLib.publish(), batch keys into groups of 50–100 to avoid timeout on large publish sets.
  7. Track success and failure counts for reporting.
  8. Read 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

  1. Run content modifications in the draft branch context.
  2. After modifications complete, publish changed items to 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).
  3. Set includeDependencies: false when publishing bulk-updated items to avoid unintended dependency publishing.
  4. For operations comparing draft and master state, use repo.diff() from lib-node with target: 'master' and includeChildren: true.

Step 6: Wrap long-running operations in a task controller

  1. Use taskLib.executeFunction() for inline task functions or taskLib.submitTask() for named task descriptors.
  2. Report progress using taskLib.progress({info, current, total}) at regular intervals during batch processing.
  3. Read assets/task-migration.template.ts for the reusable task controller template with progress reporting.
  4. Check for existing running instances with taskLib.isRunning() before starting a duplicate operation.
  5. Use taskLib.sleep() for throttling between batches if the operation generates excessive load.
  6. For named tasks on XP 7.13+, the run function receives taskId as its second argument: exports.run = function(params, taskId) {...}.

Step 7: Validate and report results

  1. After the operation completes, log a summary: items processed, items created/updated/deleted, items failed, total duration.
  2. For migration operations, verify target content exists by querying the destination path.
  3. For publish operations, verify published state by querying the master branch.
  4. If errors occurred, collect error details (content path, error message) into a structured report.

Error Handling

  • If scripts/find-enonic-targets.mjs finds 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. Read references/troubleshooting.md for 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. Read references/troubleshooting.md for timeout and permission issues.
  • If an AccessDeniedException occurs on publish or modify, ensure the context includes role:system.admin principals via lib-context.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.98%
按下载量换算205

Claude

31.49%
按下载量换算185

Cursor

19.5%
按下载量换算114

Gemini CLI

9.2%
按下载量换算54

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills