
Yaml
- 684 installs
- 15.8k repo stars
- Updated July 8, 2026
- vercel-labs/json-render
The yaml skill documents YAML as a spec format for json-render alongside JSON, covering schema validation, catalog definition, and registry wiring for YAML-driven UIs.
About
The yaml skill documents YAML as a spec format for json-render alongside JSON, covering schema validation, catalog definition, and registry wiring for YAML-driven UIs. Agents learn to structure flat element maps, root keys, actions, visibility conditions, and data bindings in YAML syntax for human-editable specs. Integration patterns mirror JSON adapters with parsers that load YAML into the same Spec type consumed by Renderer providers. Use when teams prefer YAML for AI-generated or hand-edited UI specs in json-render pipelines.
- YAML spec authoring for json-render pipelines.
- Schema validation aligned with json-render catalogs.
- Flat element map and root key patterns in YAML.
- Human-editable alternative to JSON specs.
- Same Renderer integration as JSON specs.
Yaml by the numbers
- 684 all-time installs (skills.sh)
- +15 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #505 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
yaml capabilities & compatibility
- Capabilities
- yaml spec authoring for json render pipelines. · schema validation aligned with json render catal · flat element map and root key patterns in yaml. · human editable alternative to json specs.
- Use cases
- documentation
npx skills add https://github.com/vercel-labs/json-render --skill yamlAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 684 |
|---|---|
| repo stars | ★ 15.8k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 8, 2026 |
| Repository | vercel-labs/json-render ↗ |
How do I apply yaml using the workflow in its SKILL.md?
Author and validate YAML specs for json-render with schema-aware catalog and registry patterns.
Who is it for?
Developers following the yaml skill for the tasks it documents.
Skip if: Tasks outside the yaml scope described in SKILL.md.
When should I use this skill?
User mentions yaml or related triggers from the skill description.
What you get
Working yaml setup aligned with the documented patterns and constraints.
- YAML spec streams
- JSON Patch diff operations
Files
@json-render/yaml
YAML wire format for @json-render/core. Progressive rendering and surgical edits via streaming YAML.
Key Concepts
- YAML wire format: Alternative to JSONL that uses code fences (
yaml-spec,yaml-edit,yaml-patch,diff) - Streaming parser: Incrementally parses YAML, emits JSON Patch operations via diffing
- Edit modes: Patch (RFC 6902), merge (RFC 7396), and unified diff
- AI SDK transform:
TransformStreamthat converts YAML fences into json-render patches
Generating YAML Prompts
import { yamlPrompt } from "@json-render/yaml";
import { catalog } from "./catalog";
// Standalone mode (LLM outputs only YAML)
const systemPrompt = yamlPrompt(catalog, {
mode: "standalone",
editModes: ["merge"],
customRules: ["Always use dark theme"],
});
// Inline mode (LLM responds conversationally, wraps YAML in fences)
const chatPrompt = yamlPrompt(catalog, { mode: "inline" });Options:
system(string) — Custom system message intromode("standalone" | "inline") — Output mode, default "standalone"customRules(string[]) — Additional rules appended to prompteditModes(EditMode[]) — Edit modes to document, default ["merge"]
AI SDK Transform
Use pipeYamlRender as a drop-in replacement for pipeJsonRender:
import { pipeYamlRender } from "@json-render/yaml";
import { createUIMessageStream, createUIMessageStreamResponse } from "ai";
const stream = createUIMessageStream({
execute: async ({ writer }) => {
writer.merge(pipeYamlRender(result.toUIMessageStream()));
},
});
return createUIMessageStreamResponse({ stream });For multi-turn edits, pass the previous spec:
pipeYamlRender(result.toUIMessageStream(), {
previousSpec: currentSpec,
});The transform recognizes four fence types:
yaml-spec— Full spec, parsed progressively line-by-lineyaml-edit— Partial YAML deep-merged with current spec (RFC 7396)yaml-patch— RFC 6902 JSON Patch linesdiff— Unified diff applied to serialized spec
Streaming Parser (Low-Level)
import { createYamlStreamCompiler } from "@json-render/yaml";
const compiler = createYamlStreamCompiler<Spec>();
// Feed chunks as they arrive from any source
const { result, newPatches } = compiler.push("root: main\n");
compiler.push("elements:\n main:\n type: Card\n");
// Flush remaining data at end of stream
const { result: final } = compiler.flush();
// Reset for next stream (optionally with initial state)
compiler.reset({ root: "main", elements: {} });Methods: push(chunk), flush(), getResult(), getPatches(), reset(initial?)
Edit Modes (from @json-render/core)
The YAML package uses the universal edit mode system from core:
import { buildEditInstructions, buildEditUserPrompt } from "@json-render/core";
import type { EditMode } from "@json-render/core";
// Generate edit instructions for YAML format
const instructions = buildEditInstructions({ modes: ["merge", "patch"] }, "yaml");
// Build user prompt with current spec context
const userPrompt = buildEditUserPrompt({
prompt: "Change the title to Dashboard",
currentSpec: spec,
config: { modes: ["merge"] },
format: "yaml",
serializer: (s) => yamlStringify(s, { indent: 2 }).trimEnd(),
});Fence Constants
For custom parsing, use the exported constants:
import {
YAML_SPEC_FENCE, // "```yaml-spec"
YAML_EDIT_FENCE, // "```yaml-edit"
YAML_PATCH_FENCE, // "```yaml-patch"
DIFF_FENCE, // "```diff"
FENCE_CLOSE, // "```"
} from "@json-render/yaml";Key Exports
| Export | Description |
|---|---|
yamlPrompt | Generate YAML system prompt from catalog |
createYamlTransform | AI SDK TransformStream for YAML fences |
pipeYamlRender | Convenience pipe wrapper (replaces pipeJsonRender) |
createYamlStreamCompiler | Streaming YAML parser with patch emission |
YAML_SPEC_FENCE | Fence constant for yaml-spec |
YAML_EDIT_FENCE | Fence constant for yaml-edit |
YAML_PATCH_FENCE | Fence constant for yaml-patch |
DIFF_FENCE | Fence constant for diff |
FENCE_CLOSE | Fence close constant |
diffToPatches | Re-export: object diff to JSON Patch |
deepMergeSpec | Re-export: RFC 7396 deep merge |
Related skills
How it compares
Use yaml when json-render projects need fence-delimited YAML streams and incremental patches; skip it if the app renders static React components without LLM-generated specs.
FAQ
What does yaml do?
Author and validate YAML specs for json-render with schema-aware catalog and registry patterns.
When should I use yaml?
Invoke when Author and validate YAML specs for json-render with schema-aware catalog and registry patterns.
Is yaml safe to install?
Review the Security Audits panel on this page before installing in production.