vercel-labs avatar

Directives

A ready-made collection of seven directives for json-render that handle the repetitive stuff: formatting dates and currency with $format, basic arithmetic with $math, string operations like $concat and $truncate, and pluralization. The i18n factory is there if you need localization. They compose naturally, so you can nest a $math operation inside a $format directive without ceremony. Wire them into your renderer's provider or spread the array if you need to add custom ones. Saves you from writing the same defineDirective boilerplate every time you need to format a price or count array items in your specs.

skills.sh installs
8.1K
GitHub stars
19.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add vercel-labs/json-render --skill directives --agent claude-code

Installs into .claude/skills of the current project.

Files

@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';

Sponsors

Details

Repository
github.com/vercel-labs/json-render
Categories
Code Review & Quality, Cloud & Infrastructure
First seen
Jul 14, 2026

More from vercel-labs/json-render

All 31
1imbad0202 avatardeep-researchimbad0202/academic-research-skillsUniversal deep research agent team. 13-agent pipeline for rigorous academic research on any topic. 8 modes: full research, quick brief, paper review, lit-review8Kskills.sh installs
2shubhamsaboo avatarfullstack-developershubhamsaboo/awesome-llm-appsModern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating7.9Kskills.sh installs
3agricidaniel avatarseo-schemaagricidaniel/claude-seoDetect, validate, and generate Schema.org structured data. JSON-LD format preferred. Use when user says "schema", "structured data", "rich results", "JSON-LD", 7.8Kskills.sh installs
4wshobson avatarevaluation-methodologywshobson/agentsPluginEval quality methodology — dimensions, rubrics, statistical methods, and scoring formulas. Use this skill when understanding how plugin quality is measure7.6Kskills.sh installs
5agricidaniel avatarseo-planagricidaniel/claude-seoStrategic SEO planning for new or existing websites. Industry-specific templates, competitive analysis, content strategy, and implementation roadmap. Use when u7.5Kskills.sh installs
6agricidaniel avatarseo-clusteragricidaniel/claude-seoSERP-based semantic topic clustering for content architecture planning. Groups keywords by actual Google SERP overlap (not text similarity), designs hub-and-spo7.4Kskills.sh installs