json-render-core

Installation
Summary

Schema definition, catalog creation, and spec streaming for AI-driven JSON rendering.

  • Define schemas with typed specs and component catalogs using defineSchema and defineCatalog; generate AI prompts automatically or with custom rules
  • Support dynamic prop expressions including state binding ($state, $bindState), conditionals ($cond), templates, and computed functions
  • Stream AI responses as JSONL patches using createSpecStreamCompiler for progressive spec building
  • Built-in validation, visibility conditions, state watchers, and framework-agnostic StateStore interface for external state management integration
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
347
GitHub Stars
14.7K
First Seen
Feb 6, 2026