json-render is a framework where AI produces user interfaces as structured JSON constrained by a developer-defined component catalogue. It is for building dynamic interfaces from natural-language prompts across web and mobile frameworks.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add vercel-labs/json-render --skill directivesgit clone --depth 1 https://github.com/vercel-labs/json-renderWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vercel-labs/json-render/directives)<a href="https://agentmods.dev/skills/vercel-labs/json-render/directives"><img src="https://agentmods.dev/badge/skills/vercel-labs/json-render/directives/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vercel-labs/json-render/directives"><img src="https://agentmods.dev/badge/skills/vercel-labs/json-render/directives.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.01759 |
| Opus 5.5 | $0.00028 | $0.00704 |
| Sonnet 5.5 | $0.00014 | $0.00352 |
| Haiku 4.5 | $0.00007 | $0.00176 |
Grade A, and why
directives scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@json-render/directives
Pre-built custom directives for @json-render/core. Drop them into your catalog and renderer to add formatting, math, string manipulation, and i18n.
Quick Start
import { standardDirectives } from '@json-render/directives';
// Wire into prompt generation
const prompt = catalog.prompt({ directives: standardDirectives });
// Wire into the renderer (React example)
import { JSONUIProvider, Renderer } from '@json-render/react';
<JSONUIProvider registry={registry} directives={standardDirectives}>
<Renderer spec={spec} registry={registry} />
</JSONUIProvider>
To add factory directives like createI18nDirective, spread the array:
import { standardDirectives, createI18nDirective } from '@json-render/directives';
const directives = [...standardDirectives, createI18nDirective(config)];
Defining Custom Directives
Use defineDirective from @json-render/core:
import { defineDirective, resolvePropValue } from '@json-render/core';
import { z } from 'zod';
const doubleDirective = defineDirective({
name: '$double',
description: 'Double a numeric value.',
schema: z.object({
$double: z.unknown(),
}),
resolve(value, ctx) {
const resolved = resolvePropValue(value.$double, ctx);
return (resolved as number) * 2;
},
});
Rules:
- Name must start with
$ - Name must not conflict with built-in keys (
$state,$cond,$computed,$template,$item,$index,$bindState,$bindItem) - Resolvers should call
resolvePropValueon sub-values to support composition
Built-in Directives
$format — Locale-aware value formatting
Formats values using Intl formatters. Supports date, currency, number, and percent.
{ "$format": "currency", "value": { "$state": "/cart/total" }, "currency": "USD" }
{ "$format": "date", "value": { "$state": "/user/createdAt" } }
{ "$format": "number", "value": 1234567, "notation": "compact" }
{ "$format": "percent", "value": 0.75 }
{ "$format": "date", "value": { "$state": "/post/createdAt" }, "style": "relative" }
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 206 lines · 70 tokens per session scan A af32f33e68b7
directives is a skill published in the GitHub repository vercel-labs/json-render (19,939 stars, last pushed 9d ago), licensed Apache-2.0. It adds 70 tokens to every session and 1,759 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
directives compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| directivesvercel-labs/json-render | Skill | 20k | 9d ago | Apache-2.0 | A | 70 | Claude Code, Codex |
| intl-expansionalirezarezvani/claude-skills | Skill | 31k | yesterday | MIT | A | 27 | Claude Code |
| chinese-documentationjnMetaCode/superpowers-zh | Skill | 8.6k | yesterday | MIT | A | 62 | Claude Code |
| azure-ai-translation-text-pymicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 60 | Claude Code |
| hardenfengshao1227/ccg-workflow | Skill | 6.0k | 13d ago | MIT | A | 62 | Claude Code |
| edit-sitemicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 104 | Claude Code |
| asc-subscription-localizationrorkai/app-store-connect-cli-skills | Skill | 1.2k | 2d ago | MIT | A | 60 | Claude Code |