Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

zustand — Claude Code skill: state management with json-render

This skill integrates Zustand into json-render to sync application state. Use it when your project already relies on Zustand and you need to connect it with components rendered by json-render.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add vercel-labs/json-render --skill zustand -a claude-code
Open on GitHub

What zustand does

The skill provides a zustandStateStore adapter that wraps a Zustand vanilla store into the StateStore interface for json-render. Create a store using createStore from zustand/vanilla, pass it to the adapter, and wire it to StateProvider from @json-render/react. Reads and writes flow through Zustand.

The adapter supports slicing state with a selector and custom updates via updater. For nested state, pick a slice with the selector and define how changes apply. Requires Zustand v5 or later — v4 is not supported due to breaking changes in the vanilla store API.

What it helps with

  • connect a Zustand store to json-render components
  • keep state synchronized across app layers
  • work with nested slices of Zustand state

Example prompts for the agent

  • Integrate Zustand into json-render to manage a counter and name through one store
  • Create an adapter for a nested ui slice and use it in the json-render provider
  • Wire a Zustand store with a custom updater for full state replacement

How to install zustand

1Skills CLI (Vercel)

npx skills add vercel-labs/json-render --skill zustand -a claude-code

2Manually: put the files in place

~/.claude/skills/zustand/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/zustand/

From the same set20

The whole set →
react vercel-labs This skill turns json-render JSON specs into React component trees. Use it when building JSON-driven UIs or defining a component catalog for generated specs. Claude Code CX Codex Cursor +1 16,300installs core vercel-labs Defines the schema and component catalog for json-render and builds the system prompt that makes an AI emit JSON UI specs. Claude Code CX Codex Cursor +1 15,000installs codegen vercel-labs Utilities for generating code from json-render UI trees. Build custom code exporters for Next.js, Remix, and other frameworks, traverse specs, and serialize props. Claude Code CX Codex Cursor +1 8,900installs next vercel-labs Converts JSON specs into Next.js apps with routes, layouts, SSR, and metadata. Handy when building AI-generated multi-page apps with @json-render/next. Claude Code CX Codex Cursor +1 8,600installs devtools vercel-labs Debug panel for json-render apps: component tree, state editor, actions log, streaming patches, and element picker. Claude Code CX Codex Cursor +1 8,300installs directives vercel-labs Pre-built directives for json-render: formatting, math, string handling, i18n. Wire them into your catalog and renderer with one import. Claude Code CX Codex Cursor +1 8,000installs mcp vercel-labs This skill helps build MCP servers that render interactive json-render UIs in Claude, ChatGPT, Cursor, and VS Code. Claude Code CX Codex Cursor +1 5,800installs react-native vercel-labs This skill turns JSON specs into native React Native mobile UIs. Use it when screens need state bindings, conditional visibility, and actions. Claude Code CX Codex Cursor +1 3,200installs

Similar

sprites-and-images phaserjs Guides agents on creating Sprite and Image objects in Phaser 4. Explains factory methods, texture frames, mixin components, and visual transforms. Claude Code CX Codex Cursor +1 1,100installs zod-4 prowler-cloud Provides validation patterns for Zod 4 and guides migration from Zod 3. It helps write schemas for forms, API payloads, and adapters. Claude Code CX Codex Cursor +1 1,200installs html-diagram plannotator Generates standalone interactive HTML diagrams without external services or build steps. Helps visualize component topology, state transitions, timelines, and quantitative structures. Claude Code CX Codex Cursor +1 4,100installs tailwind-design-system sickn33 A skill that keeps the agent on Tailwind while you build a design system: tokens, component variants, responsive patterns, accessibility. Useful when the UI drifts. Claude Code CX Codex Cursor +1 1,600installs edge-to-edge Google LLC Migrates Jetpack Compose apps to adaptive edge-to-edge layouts and fixes content blocked by system bars or the keyboard. Claude Code CX Codex Cursor +1 3,200installs swiftui-liquid-glass official OpenAI This skill helps build and review SwiftUI Liquid Glass interfaces for iOS 26+. Use it when adopting the API or checking fallbacks, interaction, and design fit. CX Codex GP ChatGPT 121installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs

Questions about zustand

How do I install zustand in Claude Code?

Run npx skills add vercel-labs/json-render --skill zustand -a claude-code, then open ~/.claude/skills/zustand/SKILL.md.

What does the zustand skill do?

It creates an adapter that wires a Zustand store to json-render as the state backend. json-render reads and writes state through Zustand, keeping components in sync.

Which versions of Zustand are supported?

Zustand v5 and above only. Version v4 is not compatible due to API changes in the vanilla store.

Source text

SKILL.md · Apache-2.0
---
name: zustand
description: Zustand adapter for json-render's StateStore interface. Use when integrating json-render with Zustand for state management via @json-render/zustand.
---

# @json-render/zustand

Zustand adapter for json-render's `StateStore` interface. Wire a Zustand vanilla store as the state backend for json-render.

## Installation

```bash
npm install @json-render/zustand @json-render/core @json-render/react zustand
```

Requires Zustand v5+. Zustand v4 is not supported due to breaking API changes in the vanilla store interface.

## Usage

```tsx
import { createStore } from "zustand/vanilla";
import { zustandStateStore } from "@json-render/zustand";
import { StateProvider } from "@json-render/react";

// 1. Create a Zustand vanilla store
const bearStore = createStore(() => ({
  count: 0,
  name: "Bear",
}));

// 2. Create the json-render StateStore adapter
const store = zustandStateStore({ store: bearStore });

// 3. Use it
<StateProvider store={store}>
  {/* json-render reads/writes go through Zustand */}
</StateProvider>
```

### With a Nested Slice

```tsx
const appStore = createStore(() => ({
  ui: { count: 0 },
  auth: { token: null },
}));

const store = zustandStateStore({
  store: appStore,
  selector: (s) => s.ui,
  updater: (next, s) => s.setState({ ui: next }),
});
```

## API

### `zustandStateStore(options)`

Creates a `StateStore` backed by a Zustand store.

| Option | Type | Required | Description |
|--------|------|----------|-------------|
| `store` | `StoreApi<S>` | Yes | Zustand vanilla store (from `createStore` in `zustand/vanilla`) |
| `selector` | `(state) => StateModel` | No | Select the json-render slice. Defaults to entire state. |
| `updater` | `(nextState, store) => void` | No | Apply next state to the store. Defaults to shallow merge. Override for nested slices, or use `(next, s) => s.setState(next, true)` for full replacement. |

© vercel-labs · Apache-2.0 · vercel-labs/json-render

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor