x0k/svelte-jsonschema-form/sjsf-form-setup
Claude Code and agent skill by x0k/svelte-jsonschema-form
- community
Checking that the SKILL.md file is still in the repository.
Initialize and configure svelte-jsonschema-form (v3) in Svelte 5 projects. Use when creating new forms, configuring createForm options (validator, theme, merger, idBuilder), setting up reusable defaults, choosing uncontrolled vs controlled forms, or handling submissions.
Install
npx vskill@latest install x0k/svelte-jsonschema-form/sjsf-form-setupSKILL.md
SJSF Form Setup
This skill guides the setup and configuration of forms using svelte-jsonschema-form (v3) with Svelte 5.
Step 1: Install Core Packages
Choose a theme and a validator:
See Themes and Validators Matrix for alternative packages (Zod, Valibot, Skeleton, Flowbite).
Step 2: Create Reusable Defaults (src/lib/sjsf/defaults.ts)
SJSF favors explicit modular imports over heavy globals. Create a central defaults.ts to re-export standard configurations:
Add side-effect include imports for extra fields/widgets you use (e.g. import "@sjsf/form/fields/extra/file-include").
Step 3: Define Schema and Render Form
In a Svelte 5 component (+page.svelte or form component):
For quick prototyping without accessing form state directly, use <SimpleForm>:
Step 4: Controlled Forms (State Binding)
Prefer uncontrolled forms (initialValue + onSubmit). Use controlled value binding only for simultaneous editing from multiple locations (e.g. form + sidebar):
See Form Options Reference for complete configuration options and array mutation guidelines.
Gotchas & Rules
- JSON Schema Draft-07 Only: SJSF natively processes Draft-07 schemas.
$schemadeclarations are ignored. - Reactive Options via Getters: All options support Svelte 5 reactivity through JS getters:
``ts let schema: Schema = $state.raw({ ... }); const form = createForm({ ...defaults, get schema() { return schema; } }); ` Never recreate form` to apply new options.
- Array Mutation in Controlled Mode: In Svelte 5 controlled forms, mutating arrays in place (e.g.
data.items.push(x)) may not trigger SJSF tracking. Always reassign (data.items = [...data.items, x]) or usekeyedArraysMap. - Local Definitions in `$ref`: Only local JSON Pointer fragments (e.g.
#/definitions/address) are supported for schema$ref. External URI$reffetching is not supported.
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-form-setup/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-form-setup)