json-schema

JSON Schema Generator

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "json-schema" with this command: npx skills add beshkenadze/claude-skills-marketplace/beshkenadze-claude-skills-marketplace-json-schema

JSON Schema Generator

Overview

Creates JSON Schema definitions for data validation and API documentation.

Instructions

When generating JSON Schema:

  • Analyze the data structure or requirements

  • Determine types for each field (string, number, object, array, etc.)

  • Add constraints: required fields, patterns, min/max values

  • Include descriptions for documentation

  • Set appropriate $schema version (draft-07 recommended)

Schema Components

Basic Types

  • string

  • Text values

  • number / integer

  • Numeric values

  • boolean

  • True/false

  • object

  • Nested structures

  • array

  • Lists of items

  • null

  • Null values

Common Constraints

  • required

  • Mandatory fields

  • minLength / maxLength

  • String length

  • minimum / maximum

  • Number bounds

  • pattern

  • Regex validation

  • enum

  • Allowed values

  • format

  • Semantic formats (email, uri, date-time)

Examples

Example: User Schema

Input: "Create a schema for a user with name, email, age, and optional phone"

Output:

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "User", "type": "object", "required": ["name", "email", "age"], "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100, "description": "User's full name" }, "email": { "type": "string", "format": "email", "description": "User's email address" }, "age": { "type": "integer", "minimum": 0, "maximum": 150, "description": "User's age in years" }, "phone": { "type": "string", "pattern": "^\+?[1-9]\d{1,14}$", "description": "Optional phone number in E.164 format" } }, "additionalProperties": false }

Guidelines

Do

  • Always include $schema declaration

  • Add descriptions for all properties

  • Use additionalProperties: false for strict validation

  • Prefer specific formats over loose patterns

  • Use required array for mandatory fields

Don't

  • Use overly permissive types (avoid {} or true )

  • Skip validation constraints on user input

  • Mix draft versions in same schema

  • Forget to handle nullable fields explicitly

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

gitea-tea

No summary provided by upstream source.

Repository SourceNeeds Review
General

zenstack

No summary provided by upstream source.

Repository SourceNeeds Review
General

ios-design-review

No summary provided by upstream source.

Repository SourceNeeds Review
General

wget-reader

No summary provided by upstream source.

Repository SourceNeeds Review