Generates C# ContentItemDirectorBase code for controlling per-item migration behavior in the Kentico Migration Tool, including linked page handling, page-to-widget conversion, child linking, and template overrides.
Ships in kentico-kx13-migration. 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.
Produces ready-to-use C# code files for the Migration.Tool.Extensions project. Takes the migration plan output from the migrate-content-plan skill — or a direct text description — as input.
references/content-item-director-api.md for the complete API patterns, method signatures, and annotated code samples.assets/CONTENT_ITEM_DIRECTOR_EXAMPLE.cs for a complete annotated reference implementation showing all patterns.../_shared/references/migration-tool.md.../_shared/references/migration-docs.md.ContentItemDirectorBase).If the plan explicitly states no linked pages exist (e.g., "No linked pages exist" or "NodeLinkedNodeID is null for all pages"), trust the plan and skip the database query. No DirectLinkedNode override is needed.
If the plan includes a linked page audit with specific rows, use those rows directly — do not re-query the database for confirmation.
Only query the KX13 database when the plan does not mention linked pages at all (section missing or silent on the topic):
SELECT t.NodeAliasPath, t.ClassName, t.NodeLinkedNodeID,
t2.NodeAliasPath AS LinkedToPath, t2.ClassName AS LinkedToClass
FROM CMS_Tree t
JOIN CMS_Tree t2 ON t.NodeLinkedNodeID = t2.NodeID
WHERE t.NodeLinkedNodeID IS NOT NULL
When linked pages do exist, every one MUST have an explicit handling directive. The default behavior (Materialize) creates duplicate content items silently.
Determine the set of director classes needed:
SourceClassName or NodeAliasPath).Direct() for content item behavior (LinkChildren, AsWidget, OverridePageTemplate, Drop).DirectLinkedNode() for linked page behavior (Materialize, Drop, StoreReferenceInAncestor).ServiceCollectionExtensions class (or per-director extension methods) for DI registration./Reused-content/, /Error-pages/, /System/, or similar utility paths should be explicitly dropped unless the plan provides a different mapping. These pages, if not dropped, will be migrated using their source class's default mapping, which often produces incorrect results (e.g., an error page mapped as a ContactPage).For each director, generate a class inheriting from ContentItemDirectorBase:
Direct(ContentItemSource source, IContentItemActionProvider options) for content item directives.DirectLinkedNode(LinkedPageSource source, ILinkedPageActionProvider options) for linked page directives.switch/if on source.SourceClassName, source.SourceNode.NodeAliasPath, or source.LinkedNode.NodeClassID / source.LinkedNode.NodeAliasPath for conditional logic.options.LinkChildren(fieldName, filteredChildren) for child page linking — always include a Where filter.options.AsWidget(widgetIdentifier, null, null, opts => { ... }) for page-to-widget conversion — always specify the full location chain: OnAncestorPage().InEditableArea().InSection().InFirstZone().options.OverridePageTemplate(templateIdentifier) for template overrides.options.StoreReferenceInAncestor(level, fieldName) for linked page reference storage — verify ancestor level from the page tree structure. Important: the ancestor content type must support content item reference fields; see the StoreReferenceInAncestor rule below.options.Materialize() to create independent copies of linked pages.options.Drop() to skip migration of specific pages.DirectLinkedNode(): if the plan specifies store_reference or drop for specific linked page paths, use path-based or class-based matching. For all other linked pages not explicitly handled, default to options.Drop() rather than allowing implicit Materialize() — duplicated content is harder to clean up than missing content that can be re-migrated with a different strategy.Direct(): include explicit options.Drop() for utility/error page paths that should not be migrated. Use path prefix matching: source.SourceNode.NodeAliasPath.StartsWith("/Reused-content/", StringComparison.OrdinalIgnoreCase).Direct() is abstract — do NOT call base.Direct(source, options) (causes CS0205: Cannot call an abstract base member). For the default case in Direct(), either leave the case empty (no action = default migration behavior) or call a specific action.DirectLinkedNode() is virtual — calling base.DirectLinkedNode(source, options) in the default case is valid and preserves standard linked page behavior (Materialize).Generate service registration using the per-director extension method pattern:
services.AddTransient<ContentItemDirectorBase, MyDirector>() for each director — NOT AddSingleton.appsettings.json settings or IClassMapping registrations are required).Migration.Tool.Extensions project to verify the generated code compiles without errors.Skip this sub-step if the migration plan confirmed no linked pages exist. Otherwise, after a successful build:
DirectLinkedNode() override and confirm every linked page has an explicit handling directive (Drop, Materialize, or StoreReferenceInAncestor). Match by SourceClassName and/or NodeAliasPath.base.DirectLinkedNode() which defaults to Materialize), warn that these will be silently duplicated. Recommend adding explicit options.Drop() for them.AddTransient<ContentItemDirectorBase, T>() — NOT AddSingleton.Migration.Tool.Extensions/ContentItemDirectors/ — generated code belongs in the Migration.Tool.Extensions project, matching the Migration.Tool.Extensions.ContentItemDirectors namespace).migrate-content-items-api.md — do not invent methods that don't exist.AddTransient registration (NOT AddSingleton or AddScoped).base.Direct() — it is abstract and will not compile. For unhandled cases in Direct(), leave the default branch empty (no action = default migration behavior).base.DirectLinkedNode() for unhandled cases in DirectLinkedNode() only — it is virtual and defaults to Materialize.ContentItemDirectorBase code only — IClassMapping, IFieldMigration, IWidgetMigration, and IWidgetPropertyMigration are separate extension points not covered here.migrate-content-classes skill at code generation time. If you encounter taxonomy references while reading the migration plan, treat them as informational context for understanding the data model, not something this skill needs to resolve or query for.StoreReferenceInAncestor: verify ancestor level from the page tree (-1 = parent, -2 = grandparent). Account for non-migrated intermediate types like CMS.Folder.AsWidget: always specify the full location chain — OnAncestorPage().InEditableArea().InSection().InFirstZone().LinkChildren: always include a Where filter on source.ChildNodes to select appropriate child types.Migration.Tool.Extensions.ContentItemDirectors (user can override).{ConcernName}Director.cs.Source_/Target_ prefix convention from the example.TODO comments for values unknown at generation time (e.g., widget type identifiers, editable area names, section identifiers). Class IDs should be available from the migration plan's page type table; only add TODO if genuinely missing.appsettings.json or class mapping code — only ContentItemDirectorBase code.Migration.Tool.Extensions project and fix any compilation errors before considering the task complete.options.Drop() for it in DirectLinkedNode(). This prevents silent content duplication. Add a comment explaining the decision so the user can switch to Materialize if needed./Reused-content/, /Error-pages/, /System/, etc.) must have explicit Direct() handling (typically options.Drop()). Never let them fall through to default migration, which maps them based on their source class name and produces unexpected results.Direct() is abstract, not virtual — ContentItemDirectorBase.Direct() is declared abstract. Calling base.Direct(source, options) produces compiler error CS0205: Cannot call an abstract base member. In the default/fallback branch of your Direct() override, simply do nothing (no action = standard migration behavior). By contrast, DirectLinkedNode() is virtual, so base.DirectLinkedNode(source, options) works fine.ICmsTree does not have SourceClassName — child nodes from source.ChildNodes and linked nodes from source.LinkedNode are ICmsTree objects. ICmsTree exposes NodeClassID (int), NodeAliasPath, NodeName, NodeGUID, etc. — but NOT SourceClassName. The SourceClassName property exists only on the top-level ContentItemSource and LinkedPageSource records. When filtering child nodes in LinkChildren, use NodeClassID (e.g., .Where(c => c.NodeClassID == cafeClassId)). Read class IDs from the migration plan's page type table (ClassID column). Only query the CMS_Class table if the plan does not include class IDs.ConvertClassesToContentHub must list every child type used in LinkChildren — if a child content type referenced in a LinkChildren call is not included in the ConvertClassesToContentHub appsettings list, the linking silently fails (no error, no reference created). When generating prerequisite comments on the director or its registration method, explicitly list every child type that must appear in ConvertClassesToContentHub. When presenting the summary, cross-check the plan's ConvertClassesToContentHub value against all child types used in LinkChildren calls and warn if any are missing.StoreReferenceInAncestor requires a compatible ancestor — the ancestor content type must support content item reference fields. If the ancestor is a webpage content type that does not already have a content item reference field defined (via IClassMapping WithoutSource("contentitemreference") or by the tool auto-creating it), StoreReferenceInAncestor will fail with "Content item is not reusable, but specifies linked children". Before generating StoreReferenceInAncestor, verify that the ancestor content type will have the reference field — check the corresponding IClassMapping for a WithoutSource("contentitemreference") field matching the fieldName parameter, or confirm the tool will auto-create it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/migrate-code-componentMigrates a reusable shared component (header, footer, navigation, breadcrumbs, etc.) from a Kentico Xperience 13 project to Xperience by Kentico. Locates the component in the source project and migrates it together with all dependencies. Use when migrating shared layout elements like headers, footers, or navigation./migrate-code-globalMigrates global code from a Kentico Xperience 13 project to Xperience by Kentico. Sets up the target project structure, generates code files, and migrates shared code including localization, styles, business logic, and project startup configuration. Use when starting a KX13 to XbyK codebase migration./migrate-code-pageMigrates a page from a Kentico Xperience 13 project to Xperience by Kentico. Converts controllers, views, layouts, content retrieval, and all dependencies for the specified page. Use when migrating the business and presentation logic of a specific page after its Page Builder widgets have been migrated./migrate-code-page-visualEnsures a migrated page visually matches the original Kentico Xperience 13 page. Uses Playwright to compare both pages and iteratively fixes styling, layout, and content differences. Use when a page migration results in visual discrepancies that need to be corrected./migrate-code-page-widgetsMigrates Page Builder widgets and sections from a Kentico Xperience 13 page to Xperience by Kentico. Identifies and converts all widget and section components used by the specified page. Use when migrating Page Builder features for a specific page before migrating the page logic itself./migrate-content-appsettingsGenerates appsettings.json for the Kentico Migration Tool CLI. Use when configuring migration settings, ConvertClassesToContentHub, EntityConfigurations, FieldMigrations, or QuerySourceInstanceApi./kentico-kx13-migration:migrate-content-items [migration-plan-path]from kentico-kx13-migration
npx claudepluginhub kentico/xperience-by-kentico-kenticopilot --plugin kentico-kx13-migrationOther plugins' skills for the same job