core

Installation
Summary

Schema definition, catalog creation, and AI prompt generation for json-render specs.

  • Define schemas with typed specs and catalogs using defineSchema, then create catalogs mapping component names to their props and descriptions
  • Generate AI system prompts from catalogs with optional custom rules; supports spec streaming via JSONL patches with createSpecStreamCompiler
  • Dynamic prop expressions enable state binding ($state, $bindState), conditionals ($cond), templating ($template), and computed functions ($computed)
  • Built-in validation helpers, visibility conditions, state watchers, and spec validation/auto-fix utilities for runtime prop resolution and spec refinement
  • Framework-agnostic StateStore interface for plugging in Redux, Zustand, XState, or other state management libraries
SKILL.md

@json-render/core

Core package for schema definition, catalog creation, and spec streaming.

Key Concepts

  • Schema: Defines the structure of specs and catalogs (use defineSchema)
  • Catalog: Maps component/action names to their definitions (use defineCatalog)
  • Spec: JSON output from AI that conforms to the schema
  • SpecStream: JSONL streaming format for progressive spec building

Defining a Schema

import { defineSchema } from "@json-render/core";

export const schema = defineSchema((s) => ({
  spec: s.object({
    // Define spec structure
Related skills
Installs
1.3K
GitHub Stars
14.7K
First Seen
Mar 7, 2026