knock-email-template-migration
Email template migration skill
This skill migrates a directory of existing email templates into Knock. The end state is not a 1:1 HTML dump: shared chrome becomes email layouts, repeated components become partials usable in the visual block editor, template bodies become block-based templates wherever that's faithful, and each email is delivered by a workflow with a documented trigger payload contract.
The migration runs as a phased process with explicit user checkpoints and a durable on-disk workspace, so it can handle large template sets, be resumed across sessions, and never writes to Knock before the user approves the plan.
Overview
The skill has seven rule files, read one phase at a time, and six reference files the rules point at:
- Migration process - the phased state machine: preflight, intake, workspace, the plan checkpoint, build order, commit strategy, additional passes, resuming
- Analyzing source templates - format detection, the corpus scan into chrome families, the per-template analysis file, verbatim body copy, syntax families, subject discovery
- Mapping variables and logic - namespace policy, Liquid truthiness and guards, control-flow decisions, provider artifacts, creating variables, the trigger payload contract
- Extracting layouts - what belongs in a layout, deduplication, the default-layout policy, CSS strategy for blocks, MJML layouts
- Extracting partials - partial candidates, the isolated scope rule, loops, input schemas, partial content and CSS
- Building templates and workflows - workflow shape, block composition, HTML and MJML modes, consolidated workflows, channel overrides, validate, push, readback
- Verifying the migration - readback, rendered previews and the visual pass, test sends, the final report
The references hold the tables, templates, and recipes the rules depend on. Each opens with the rule sections that point at it and is read only when a step needs it.