Complete Module Migration

VerifiedCaution

Orchestrates a six-phase migration of an entire module to the target architecture defined in docs/ARCHITECTURE.md. Each phase (Analysis, Structure, Types, Services, State, Components, Review) requires user approval before proceeding, with validation steps after each phase. Ideal when migrating a complex module that touches all layers: files, types, services, state, and components.

Sby Skills Guide Bot
DevelopmentAdvanced
606/2/2026
Claude Code
#migration#module-migration#architecture#svelte#sveltekit

Recommended for

Our review

Migrates an entire module to the target architecture through six phases with approval gates.

Strengths

  • Structured phase-based process with intermediate validation
  • Covers full migration scope: analysis, structure, types, services, state, and components
  • Automatically validates build, svelte-check, and tests after each phase

Limitations

  • Requires a target architecture defined in docs/ARCHITECTURE.md
  • Relies on @migrator tool for coordination, not specified here
  • Can be overkill for simple modules
When to use it

Use this skill when you need to migrate an existing module to a new Svelte/SvelteKit architecture.

When not to use it

Do not use it for one-off changes or modules that don't require a full migration.

Security analysis

Caution
Quality score85/100

The skill uses Bash within a controlled migration workflow, but Bash is inherently powerful; there is no explicit destructive or exfiltrating instruction, but caution is warranted.

Findings
  • Uses Bash for build, svelte-check, and test validation, which could execute arbitrary commands if module path or configuration is malicious.

Examples

Migrate user module
Migrate the user module at src/lib/user to the target architecture from docs/ARCHITECTURE.md
Migrate auth module
Perform a full module migration for src/routes/auth following the migration process with approval gates

name: migration-migrate-module description: "Use when a complete module needs migration to the target architecture — runs 6 phases with approval gates." user-invocable: true argument-hint: "[module-path]" allowed-tools: Read, Write, Edit, Bash, Glob, Grep

Migrate an entire module to the target architecture from docs/ARCHITECTURE.md.

Module/Path: $ARGUMENTS

Steps

Use @migrator to coordinate the full migration in phases:

  1. Phase 0 -- Analysis: Map the module (files, Svelte 4 vs 5 patterns, JS vs TS, SvelteKit 1 vs 2 patterns, dependencies)
  2. Phase 1 -- Structure: Create src/lib/modules/[name]/ and route files, move existing files
  3. Phase 2 -- Types: Create .types.ts + .contracts.ts + adapter
  4. Phase 3 -- Services: Migrate to pure service (no try/catch, native fetch)
  5. Phase 4 -- State: Server state -> SvelteKit load functions, Client state -> Svelte stores
  6. Phase 5 -- Components: Svelte 4 -> 5 runes + composition (see conversion table)
  7. Phase 6 -- Review: Validate conformance, check for remaining legacy patterns

Validate build/svelte-check/tests after each phase. Ask for approval before each phase.

Related skills