Directives
Pre-built json-render directives for formatting, math, string handling, and i18n in specs.
- CCM score
- 79 of 100
- skills.sh installs
- 8.1K
- GitHub stars
- 19.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers seven built-in directives:
$format,$math,$concat,$count,$truncate,$pluralize, and$join, plus the$ti18n factory - Includes
standardDirectivesas a ready array andcreateI18nDirectivefor locale-keyed message catalogs with fallback - Guides custom directive authoring via
defineDirective, requiring a$prefix and avoiding built-in key names like$stateor$cond - Designed for
@json-render/corerenderers in React, Vue, Svelte, and Solid, and for prompt generation with the same directive array
Install
$ npx -y skills add vercel-labs/json-render --skill directives -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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';
Details
- Repository
- github.com/vercel-labs/json-render
- Categories
- Frontend & UI Code, AI Agents & LLM Apps
- First seen
- Jul 14, 2026
Questions
What does the json-render directives skill add to my project?
The directives skill provides pre-built custom directives for @json-render/directives, covering formatting, math, string manipulation, and i18n. It adds $format, $math, $concat, $count, $truncate, $pluralize, $join, and the $t translation directive to your specs.
How do I install the json-render directives skill?
Run npx -y skills add vercel-labs/json-render --skill directives -y in your project. After that, the agent can use the directives when you work with @json-render/directives or define custom directives with defineDirective.
What do I need before using the json-render directives?
You need the @json-render/core package, and the renderer you use, such as @json-render/react, Vue, Svelte, or Solid. The directives are passed to the provider or createRenderer output and to catalog.prompt. A factory directive like $t also needs a locale and a messages config.
Can I write my own directive with this skill?
Yes, the skill shows how to create one with defineDirective from @json-render/core. Directive names must start with $, must not clash with built-in keys like $state or $cond, and should call resolvePropValue on sub-values so directives can compose.
More from vercel-labs/json-render
All 30- Mcp6K
- React Native3.3K
- Shadcn2.5K
- React Three Fiber2.5K
- React Pdf2.5K
- Zustand2K
- Remotion1.9K
- Image1.7K
- Remotion Best Practices1.7K
- Vue1.5K
- React Email1.5K
- Ink1.4K
- Svelte1.3K
- Shadcn Svelte1.2K
- Redux1.2K
- Jotai1.2K
- Xstate1.2K
- Solid1.2K
- Yaml1.1K
- Json Render React391
- Json Render Core340
- Json Render Shadcn316
- Json Render Remotion153
- Json Render React Native142
Similar to Directives
More Frontend & UI Codejson-render-coreSkillvercel-labs/json-render340 installsCore package for defining json-render schemas, catalogs, and AI prompts that build UI or video JSON specs.
inkSkillvercel-labs/json-render1.4K installsInk terminal renderer that turns JSON specs into interactive terminal UIs with data binding and actions.
i18n-localizationPluginalirezarezvani/claude-skills30.7K starsShip a new language without the usual breakage. Three deterministic stdlib scripts: a translation-file checker for JSON/ARB (i18next, ICU), .properties, .string
vue-i18n-skilldSkillskilld-dev/vue-ecosystem-skills450 installsOfficial Vue 3 internationalization plugin guide covering createI18n, useI18n, message syntax, formatting, and v10 to v12 migration.
internationalization-i18nSkillsecondsky/claude-skills469 installsMultilingual support kit covering i18next, Intl formatting, pluralization, and RTL layout patterns.
alpinejsSkillbrettatoms/agent-skills267 installsPractical Alpine.js reference that keeps HTML directives short by moving logic into extracted components and stores.