solid
por vercel
Renderizador SolidJS para json-render. Use ao construir catálogos/registros @json-render/solid, conectando provedores Renderer, implementando bindings/ações, ou…
npx skills add https://github.com/vercel-labs/json-render --skill solid@json-render/solid
@json-render/solid renders json-render specs into Solid component trees with fine-grained reactivity.
Quick Start
import { Renderer, JSONUIProvider } from "@json-render/solid";
import type { Spec } from "@json-render/solid";
import { registry } from "./registry";
export function App(props: { spec: Spec | null }) {
return (
<JSONUIProvider registry={registry} initialState={{}}>
<Renderer spec={props.spec} registry={registry} />
</JSONUIProvider>
);
}
Create a Catalog
import { defineCatalog } from "@json-render/core";
import { schema } from "@json-render/solid/schema";
import { z } from "zod";
export const catalog = defineCatalog(schema, {
components: {
Button: {
props: z.object({
label: z.string(),
variant: z.enum(["primary", "secondary"]).nullable(),
}),
description: "Clickable button",
},
Card: {
props: z.object({ title: z.string() }),
description: "Card container",
},
},
actions: {
submit: { description: "Submit data" },
},
});
Define Components
Components receive ComponentRenderProps from the renderer:
interface ComponentRenderProps<P = Record<string, unknown>> {
element: UIElement<string, P>;
children?: JSX.Element;
emit: (event: string) => void;
on: (event: string) => EventHandle;
bindings?: Record<string, string>;
loading?: boolean;
}
Example:
import type { BaseComponentProps } from "@json-render/solid";
export function Button(props: BaseComponentProps<{ label: string }>) {
return (
<button onClick={() => props.emit("press")}>{props.props.label}</button>
);
}
Create a Registry
import { defineRegistry } from "@json-render/solid";
import { catalog } from "./catalog";
import { Card } from "./Card";
import { Button } from "./Button";
const { registry, handlers, executeAction } = defineRegistry(catalog, {
components: {
Card,
Button,
},
actions: {
submit: async (params, setState, state) => {
// custom action logic
},
},
});
Spec Structure
{
"root": "card1",
"elements": {
"card1": {
"type": "Card",
"props": { "title": "Hello" },
"children": ["btn1"]
},
"btn1": {
"type": "Button",
"props": { "label": "Click me" },
"on": {
"press": { "action": "submit" }
}
}
}
}
Providers
StateProvider: state model read/write and controlled mode viastoreVisibilityProvider: evaluatesvisibleconditionsValidationProvider: field validation +validateFormintegrationActionProvider: runs built-in and custom actionsJSONUIProvider: combined provider wrapper
Hooks
useStateStore,useStateValue,useStateBindinguseVisibility,useIsVisibleuseActions,useActionuseValidation,useOptionalValidation,useFieldValidationuseBoundPropuseUIStream,useChatUI
Built-in Actions
Handled automatically by ActionProvider:
setStatepushStateremoveStatevalidateForm
Dynamic Props and Bindings
Supported expression forms include:
{"$state": "/path"}{"$bindState": "/path"}{"$bindItem": "field"}{"$template": "Hi ${/user/name}"}{"$computed": "fn", "args": {...}}{"$cond": <condition>, "$then": <value>, "$else": <value>}
Use useBoundProp in components for writable bound values:
import { useBoundProp } from "@json-render/solid";
function Input(props: BaseComponentProps<{ value?: string }>) {
const [value, setValue] = useBoundProp(
props.props.value,
props.bindings?.value,
);
return (
<input
value={String(value() ?? "")}
onInput={(e) => setValue(e.currentTarget.value)}
/>
);
}
useStateValue, useStateBinding, and the state / errors / isValid fields from useFieldValidation are reactive accessors in Solid. Call them as functions inside JSX, createMemo, or createEffect.
Solid Reactivity Rules
- Do not destructure component props in function signatures when values need to stay reactive.
- Keep changing reads inside JSX expressions,
createMemo, orcreateEffect. - Context values are exposed through getter-based objects so consumers always observe live signals.
Streaming UI
import { useUIStream, Renderer } from "@json-render/solid";
const stream = useUIStream({ api: "/api/generate-ui" });
await stream.send("Create a support dashboard");
<Renderer
spec={stream.spec}
registry={registry}
loading={stream.isStreaming}
/>;
Use useChatUI for chat + UI generation flows.
Mais skills de vercel
vercel-optimize
vercel
Use para otimização de custo e desempenho no Vercel em projetos implantados, especialmente Next.js, SvelteKit, Nuxt e aplicações Astro limitadas. Colete métricas do Vercel, uso, configuração do projeto e resultados de varredura de código primeiro; investigue apenas candidatos baseados em métricas; produza recomendações ranqueadas fundamentadas em arquivos verificados e documentação do Vercel/framework com reconhecimento de versão. Acione para redução de fatura do Vercel, rotas lentas ou caras, oportunidades de cache, Invocações de Função, Minutos de Build, Transferência Rápida de Dados, Core...
officialdevelopmentdevops
writing-guidelines
vercel
Revise documentos/prosa para conformidade com as Diretrizes de Escrita. Use quando solicitado a "revisar meus documentos", "verificar estilo de escrita", "auditar prosa", "revisar voz e tom dos documentos" ou "verificar esta página de acordo com o manual de escrita".
officialdocumentcommunication
agent-friendly-apis
vercel
Habilidade complementar para o curso Agent-Friendly APIs na Vercel Academy. Crie uma API de feedback, torne-a amigável para agentes com documentação estruturada e, em seguida, crie uma skill do Claude Code que gere a documentação automaticamente.
official
filesystem-agents
vercel
Você é um assistente de ensino experiente para o curso Building Filesystem Agents na Vercel Academy. Você ajuda os alunos a construir agentes que navegam por sistemas de arquivos com bash para responder perguntas sobre dados estruturados.
official
add-provider-package
vercel
Guia para adicionar novos pacotes de provedores de IA ao AI SDK. Use ao criar um novo pacote @ai-sdk/<provider> para integrar um serviço de IA ao SDK.
official
csv
vercel
Analisar e transformar dados CSV usando ferramentas bash
official
ai
vercel
Python `ai` module — models, agents, hooks, middleware, MCP, structured output
official
cron-jobs
vercel
Configuração e melhores práticas de Vercel Cron Jobs. Use ao adicionar, editar ou depurar tarefas agendadas em vercel.json.
official