x0k/svelte-jsonschema-form/sjsf-v2-migration
Claude Code and agent skill by x0k/svelte-jsonschema-form
- community
Checking that the SKILL.md file is still in the repository.
Migrate svelte-jsonschema-form codebases from v2 to v3. Use when upgrading SJSF packages, adapting to Svelte 5 runes, replacing removed properties (form.context, form.value, form.errors, getSnapshot), updating package names (shadcn4, flowbite3, skeleton5, sveltekit3), or fixing broken custom components.
Install
npx vskill@latest install x0k/svelte-jsonschema-form/sjsf-v2-migrationSKILL.md
SJSF v2 to v3 Migration Guide
This skill guides migrating existing projects from svelte-jsonschema-form v2 (Svelte 4 stores) to v3 (Svelte 5 runes).
Step 1: Update Package Names and Dependencies
SJSF v3 updates major UI framework integrations:
Step 2: Update defaults.ts
In v3, the validator option requires a FormValidator<T> created via createFormValidator:
For a drop-in migration keep the legacy merger/idBuilder (@sjsf/form/mergers/legacy, @sjsf/form/id-builders/legacy plus json-schema-merge-allof); switch to modern afterwards.
Step 3: Replace Removed Form Properties
v3 removes store subscriptions ($form) and legacy properties from the FormState object:
form.value Removal
- Snapshot read: Import and use
getValueSnapshot(form)from@sjsf/form. - Reactive state: In v3, pass
value: [() => state, (v) => state = v]tocreateForm.
form.errors Removal
- Access validation errors via query helpers
getFieldErrorsByPath(form, path),getErrors(form)/getFieldErrors(form, config)—form.submissionis aTaskwithstate/status, it has no.errorsproperty.
form.context Removal
- Internal context is no longer directly accessed. Use exported query helper functions (
getComponent,retrieveUiOption,getIdByPath) orgetFormContext().
getSnapshot Option Removal
- Removed. Use
getValueSnapshot(form).
Step 4: Upgrade Custom Components to Svelte 5 Runes
Convert legacy export let components to Svelte 5 $props() with $bindable():
See Breaking Changes Checklist for full comparison tables and component prop changes.
Gotchas & Rules
- No Store Subscriptions (`$`):
createForm()now returns a plain reactiveFormStateobject powered by Svelte 5 runes. Do not prepend$when reading properties (form.submission,form.isChanged). - Nullable Fields Mandate: SJSF v3 enforces that field widgets must not crash when receiving
nullorundefined. - Reactive Options via Getters: In v2, options were updated via stores. In v3, use JS getters for reactive options:
``ts let schema: Schema = $state.raw({ ... }); const form = createForm({ ...defaults, get schema() { return schema; } }); ``
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sjsf-v2-migration/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/x0k/svelte-jsonschema-form/sjsf-v2-migration)