Generates C# IFieldMigration extension code for Kentico KX13→XbyK field transformations, including custom form controls, data type conversions, HTML cleanup, and URL path rewrites.
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/field-migration-api.md for the complete API patterns and decision guides.assets/FIELD_MIGRATION_EXAMPLE.cs for a complete annotated reference implementation.../_shared/references/migration-tool.md.../_shared/references/migration-docs.md.WithFieldPatch in an IClassMapping. These are candidates for IFieldMigration code or appsettings.json FieldMigrations config.Determine the set of IFieldMigration classes needed:
IFieldMigration class per logical transformation concern (e.g., one for custom rich text editors, one for HTML cleanup, one for date format conversion).ServiceCollectionExtensions class for DI registration.../_shared/references/migration-tool.md — the migration tool has default FieldMigration entries for standard data type + form control combinations (e.g., text + TextBoxControl → TextInput, longtext + HtmlAreaControl → RichTextEditor). It also has catch-all entries per data type (e.g., text + _other_ → TextInput, longtext + _other_ → TextArea). If a source form control matches a built-in entry or catch-all AND the target data type doesn't change, no IFieldMigration is needed.text → longtext) AND a form control change, the catch-all won't produce the correct result. Use IFieldMigration code, appsettings.json FieldMigrations config, or IClassMapping.WithFieldPatch instead.appsettings.json FieldMigrations config instead.IClassMapping SetFrom/ConvertFrom instead.IClassMapping.WithFieldPatch instead.IClassMapping.ConvertFrom when the transform is specific to one class and one field (per-class scope, not cross-class).IClassMapping.WithFieldPatch when the field definition change (data type, form component) is scoped to a single class and paired with an IClassMapping that already exists for that class.For each migration, generate a class implementing IFieldMigration:
Rank — use values < 100,000 (built-in defaults use 100,000+). Leave gaps between values (1000, 2000, 3000) for future insertions.ShallMigrate — precise matching on SourceFormControl, SourceDataType, FieldName, or ClassName. Avoid overly broad matches that interfere with built-in migrations.MigrateFieldDefinition — use System.Xml.Linq XElement API to patch XML field definitions (controlname, column type, data type, settings).MigrateValue — null-safe (null or DBNull check), type-safe (is string s pattern), context-aware (SourceObjectContext switch when behavior differs).IServiceCollection extension method for DI registration.Generate or update the ServiceCollectionExtensions static class:
AddSingleton<IFieldMigration>(new T()) for each migration.IFieldMigration code do not need entries in appsettings.json FieldMigrations config.IClassMapping registrations.Migration.Tool.Extensions project to verify the generated code compiles without errors.Save files to the user-specified path (default: Migration.Tool.Extensions/FieldMigrations/ — generated code belongs in the Migration.Tool.Extensions project, matching the Migration.Tool.Extensions.FieldMigrations namespace).
Provide a summary table of generated migrations:
| File | Pattern | Rank | Handles |
|---|---|---|---|
CommunityTextEditorFieldMigration.cs | Form control replacement | 1000 | CommunityTextEditor → RichTextEditor |
DateTextFieldMigration.cs | Data type conversion | 2000 | EventDateText text → datetime |
Ask if any migrations need adjustment and iterate on feedback.
Migration.Tool.Extensions.FieldMigrations (user can override).{DescriptiveName}FieldMigration.cs.Source_/Target_ prefix convention from the example.TODO comments for values unknown at generation time (e.g., target asset paths, lookup dictionaries).field-migration-api.md — do not invent methods that don't exist.IFieldMigration must have a corresponding AddSingleton<IFieldMigration>(new T()) registration.MigrateFieldDefinition uses System.Xml.Linq XElement API — find or create elements, set values, remove obsolete settings.MigrateValue must handle null (null or DBNull) and unexpected types defensively.IClassMapping.ConvertFrom for class-specific, per-field transforms; use IFieldMigration for cross-class or form-control-driven transforms.ShallMigrate is called for every field in every class — must be lightweight and specific. Broad matching (e.g., all "text" fields) interferes with built-in migrations.MigrateFieldDefinition and MigrateValue must be aligned — if the definition changes the data type, the value must be converted to match.IFieldMigration do NOT need appsettings.json FieldMigrations entries. Skip code generation when config suffices (simple form control swap, no value transform).IClassMapping, prefer WithFieldPatch over IFieldMigration — it keeps the definition change co-located with the class mapping. Only use IFieldMigration when the same form control or data type change applies across multiple classes.SourceObjectContext when transformation behavior differs across pages, custom tables, and forms.IFieldMigration code only — IClassMapping, ContentItemDirectorBase, IWidgetMigration, and IWidgetPropertyMigration are separate extension points.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
kentico-migration, field-migration, csharp-codegen, kx13-xbyk
/kentico-kx13-migration:migrate-content-fields [migration-plan-path]from kentico-kx13-migration
npx claudepluginhub kentico/xperience-by-kentico-kenticopilot --plugin kentico-kx13-migration14 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-Other plugins' skills for the same job