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

image · vercel-labs — Claude Code skill: JSON to SVG and PNG via Satori

Turns JSON specs into SVG and PNG images via Satori. Useful for generating OG images, social cards, and rendering AI-generated image specs.

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

What image does

The skill renders images from JSON structures using Satori: takes a spec with elements (Frame, Heading, Text, Box, Row, Column, Image, Divider, Spacer) and outputs an SVG string or PNG buffer. Frame is the mandatory root container; layout and content components nest inside. You can add custom components through Zod schemas.

renderToPng requires font data (fontData) and the @resvg/resvg-js package. SVG works without them. Exports are split: full package @json-render/image, component catalog /catalog, render functions only /render, server-side /server (no React or Satori).

Fits template-driven preview generation: the agent receives a structure, the skill assembles the image. The spec defines dimensions, colors, spacing, positioning — everything Satori supports in JSX.

What it helps with

  • generate an OG image from a JSON schema
  • create a social card programmatically
  • render an image from an AI-generated spec
  • turn structured data into PNG or SVG
  • assemble a preview with text, background, and images from a template

Example prompts for the agent

  • Create a 1200×630 OG image with a 'Hello World' heading on a dark background
  • Render this JSON spec to PNG using the Inter font
  • Build a social card: h1 heading, description text, logo on the right

How to install image

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/image/SKILL.md

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

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

Other versions of image

Similar

refero-design referodesign A research-led skill for UI and product design that grounds work in references before code. Use it for landing pages, product screens, redesigns, and visual polish. Claude Code CX Codex Cursor +1 11,900installs preline-theme-generator htmlstreamofficial Generates custom Preline UI theme CSS from brand colors or mood descriptions. Runs entirely through local scripts after install. Claude Code CX Codex Cursor +1 1,300installs visual-edit-precision Adit Jain Skill for targeted UI changes when you show elements on a screenshot or point them out in code. Edits only what you selected, without refactoring the entire component. Claude Code CX Codex Cursor 2,800installs huggingface-gradio huggingface This skill helps you build and modify Python Gradio interfaces for machine learning demos. It provides patterns for layouts, UI components, and chatbot workflows. Claude Code CX Codex Cursor +1 2,300installs zustand-5 prowler-cloud Zustand 5 state management patterns for Claude Code: basic stores, selectors, persist middleware, and slice composition. Prevents unnecessary re-renders and keeps state logic clean. Claude Code CX Codex Cursor +1 911installs text-and-bitmaptext phaserjs Helps AI agents configure and render text in Phaser 4. Useful when styling Canvas text, handling word wrapping, and setting up bitmap fonts. Claude Code CX Codex Cursor +1 816installs 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 image

How to install image in Claude Code?

Run npx skills add vercel-labs/json-render --skill image -a claude-code. The skill will appear in ~/.claude/skills/image/SKILL.md.

What does the image skill do?

It turns JSON specs into SVG and PNG images via Satori. Used for generating OG images, social cards, and rendering image specs created by AI.

Which components are available in image?

Standard set: Frame (root container), Box, Row, Column for layout, Heading, Text, Image for content, Divider and Spacer for decoration. You can add custom ones via Zod schemas.

Source text

SKILL.md · Apache-2.0
---
name: image
description: Image renderer for json-render that turns JSON specs into SVG and PNG images via Satori. Use when working with @json-render/image, generating OG images from JSON, creating social cards, or rendering AI-generated image specs.
---

# @json-render/image

Image renderer that converts JSON specs into SVG and PNG images using Satori.

## Quick Start

```typescript
import { renderToPng } from "@json-render/image/render";
import type { Spec } from "@json-render/core";

const spec: Spec = {
  root: "frame",
  elements: {
    frame: {
      type: "Frame",
      props: { width: 1200, height: 630, backgroundColor: "#1a1a2e" },
      children: ["heading"],
    },
    heading: {
      type: "Heading",
      props: { text: "Hello World", level: "h1", color: "#ffffff" },
      children: [],
    },
  },
};

const png = await renderToPng(spec, {
  fonts: [{ name: "Inter", data: fontData, weight: 400, style: "normal" }],
});
```

## Using Standard Components

```typescript
import { defineCatalog } from "@json-render/core";
import { schema, standardComponentDefinitions } from "@json-render/image";

export const imageCatalog = defineCatalog(schema, {
  components: standardComponentDefinitions,
});
```

## Adding Custom Components

```typescript
import { z } from "zod";

const catalog = defineCatalog(schema, {
  components: {
    ...standardComponentDefinitions,
    Badge: {
      props: z.object({ label: z.string(), color: z.string().nullable() }),
      slots: [],
      description: "A colored badge label",
    },
  },
});
```

## Standard Components

| Component | Category | Description |
|-----------|----------|-------------|
| `Frame` | Root | Root container. Defines width, height, background. Must be root. |
| `Box` | Layout | Container with padding, margin, border, absolute positioning |
| `Row` | Layout | Horizontal flex layout |
| `Column` | Layout | Vertical flex layout |
| `Heading` | Content | h1-h4 heading text |
| `Text` | Content | Body text with full styling |
| `Image` | Content | Image from URL |
| `Divider` | Decorative | Horizontal line separator |
| `Spacer` | Decorative | Empty vertical space |

## Key Exports

| Export | Purpose |
|--------|---------|
| `renderToSvg` | Render spec to SVG string |
| `renderToPng` | Render spec to PNG buffer (requires `@resvg/resvg-js`) |
| `schema` | Image element schema |
| `standardComponents` | Pre-built component registry |
| `standardComponentDefinitions` | Catalog definitions for AI prompts |

## Sub-path Exports

| Export | Description |
|--------|-------------|
| `@json-render/image` | Full package: schema, components, render functions |
| `@json-render/image/server` | Schema and catalog definitions only (no React/Satori) |
| `@json-render/image/catalog` | Standard component definitions and types |
| `@json-render/image/render` | Render functions only |

© 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