x0k/svelte-jsonschema-form/sjsf-schema-patterns
Claude Code and agent skill by x0k/svelte-jsonschema-form
- community
Checking that the SKILL.md file is still in the repository.
Design JSON Schema and UI Schema for svelte-jsonschema-form forms. Use when creating dynamic forms (oneOf/anyOf discriminators, dependencies, if/then/else), configuring string formats (date-time, uri, data-url), handling file uploads (Data URL vs Native File), or configuring validation modes.
Install
npx vskill@latest install x0k/svelte-jsonschema-form/sjsf-schema-patternsSKILL.md
SJSF Schema Patterns & Validation
This skill covers authoring JSON Schemas, UI Schemas, dynamic fields, and validation strategies for svelte-jsonschema-form.
Step 1: Core JSON Schema Constraints
SJSF expects JSON Schema Draft-07. Keep schemas compliant with these engine rules:
- Definitions & `$ref`:
- Use local JSON pointers only:
"$ref": "#/definitions/User". #/$defs/needs the@sjsf/form/converters/draft-2020-12converter.- External URLs or remote network schemas are not resolved at runtime.
- String Formats:
date-time: maps todatetime-localinput.date,time,email,color: map to same-named inputs.uri: maps tourlinput.data-url: file upload widget (requirescompatresolver).
Step 2: UI Schema Directives
Customize UI appearance, widgets, and labels without altering validation rules via uiSchema:
No per-field disabled/ui:disabled in v3. Whole form: disabled option. Per field: readOnly: true in schema, or inert attribute where readonly has no effect.
Step 3: Dynamic Forms & Polymorphism
For dynamic forms, use oneOf with discriminator.propertyName:
See Dynamic Schemas Guide for conditional if/then/else and dependencies.
Step 4: Validation Configuration
Validation happens on two levels:
- Form-level submit validation: executes
validator.validateFormValue(schema, value). - Field-level live validation: configured by
fieldsValidationMode.
HTML5 validation runs by default; set novalidate on the form to disable it.
See File Handling Reference for handling file uploads and custom keywords.
Gotchas & Rules
- No Overlapping Properties in `oneOf` / `anyOf`: Properties declared inside a
oneOfbranch must NOT overlap with properties declared outside theoneOfat the same level. - `additionalProperties: false` Caution: Avoid setting
additionalProperties: falseon objects that usedependenciesor dynamic conditionals, as intermediate state can cause false validation failures. - `exclusiveMinimum` / `exclusiveMaximum`: Handled by JSON validator during checks, but not passed as HTML input attributes.
- Number Parsing: Number inputs automatically coerce string input into numbers. An empty number field yields
undefinedunless defaults or nullable schemas are specified.
Security
- Security scanPassed, 100 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-schema-patterns/SKILL.md
Popularity
- Repository stars
- 170
- Repository forks
- 10
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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-schema-patterns)