json-render-catalog
БесплатноЗапускает вложенные скриптыНе проверенjson-render catalogs for AI-safe generative UI: Zod-typed components, @json-render/shadcn, YAML specs, patch/merge/diff edits. Use when defining component…
от yonatangross★ 312 звёзд на GitHubОб этом скилле
Upstream version reference: @json-render/core 0.21.3 (2026-10-24).
json-render Component Catalogs
json-render (Vercel Labs, 12.9K stars, Apache-2.0) is a framework for AI-safe generative UI. AI generates flat-tree JSON (or YAML) specs constrained to a developer-defined catalog — the catalog is the contract between your design system and AI output. If a component or prop is not in the catalog, AI cannot generate it.
Storybook → catalog import (#1529, 2026-04)
When the project ships a Storybook setup, import the catalog from Storybook stories instead of hand-writing one. The bundled importer at scripts/storybook-to-catalog.mjs reads a @storybook/addon-mcp list-all-documentation manifest and emits a Zod-typed catalog.ts plus a components.tsx registry.
node "${CLAUDE_SKILL_DIR}/scripts/storybook-to-catalog.mjs" storybook-manifest.json \
--out src/genui/catalog.ts \
--components src/genui/components.tsx \
--project-root .
Storybook becomes the single source of truth — adding a story automatically expands the AI-allowed surface; removing one shrinks it. AI safety is enforced at import: callbacks, raw object props, and z.any() are dropped. Full mapping: references/storybook-import.md. Companion fixture for testing: references/storybook-fixture.json.
New in 2026-04 → 2026-10 (json-render 0.14 → 0.21)
__proto__paths (0.21): only thesetByPath,addByPathandremoveByPathhelpers ignore a path with a__proto__segment, without an error.createStateStore().set()/update()andcreateStoreAdapterwrite throughimmutableSetByPath, which has no guard, and no helper rejectsconstructororprototype. So validate keys yourself before any state-store write: reject__proto__,constructorandprototypesegments, and never use them as an element key, a state key or a patch path segment. RFC 6901 escaping is unchanged: write~0for~and~1for/inside a key.- Experimental composition API (0.21):
experimental_composeSpecandexperimental_createEvaluatorare the only new exports in@json-render/core0.21 (verified against the 0.20.0 and 0.21.3 type definitions, no removals). They are marked experimental, so do not build a catalog workflow on them yet. - Named slots (0.20) —
UIElementgainsslots?: Record<string, string[]>, a catalog declares which it accepts viaslots: ["default", "header", "footer"], and a React registry component receives named content asslots?.headerwhilechildrenstays the default slot. Prefer this over encoding layout regions as separate sibling elements. - Nested repeats and item-scoped visibility (0.20) —
repeat.statePathaccepts an item-relative{"$item": "employees"}form (newRepeatStatePathtype plusresolveRepeatStatePath/resolveRepeatItemStatePath), and arepeatcombined withvisible: {"$item": "status", "eq": "todo"}on the same element now filters items instead of erroring.validateSpecgainsinvalid_visible,repeat_without_children,repeat_item_outside_scopeandrepeat_state_mismatchissue codes. - Custom directives API (0.19) —
@json-render/corenow shipsdefineDirective, letting you declare new JSON shapes (e.g.$format,$math) that resolve to computed values at render time. Directives compose by nesting and resolve inside-out. All four renderers (React, Vue, Svelte, Solid) have built-in directive resolution. This is the safe escape hatch for computed values without widening the catalog toz.any(). @json-render/directivespackage (0.19) — seven ready-made directives:$format(date / currency / number / percent viaIntl),$math(add, subtract, multiply, divide, mod, min, max, round, floor, ceil, abs),$concat,$count,$truncate,$pluralize,$join. PluscreateI18nDirectivefor$ttranslation keys with{{param}}interpolation, andstandardDirectivesfor one-line registration. Register once, use in any spec — AI no longer needs string-mangling or duplicated literals.- Devtools ecosystem (0.18) — five new packages:
@json-render/devtoolscore + framework adapters for React, Vue, Svelte, Solid. Inspector panel has six tabs (Spec, State, Actions, Stream, Catalog, Pick) with DOM element picking that maps back to spec keys. Tree-shakes tonullin production. Companion Next.js demo app shipped with AI-chat + catalog integration. Action observer infrastructure exposed for adapters to mirror events into the panel. - Zod 4 fix (0.18) —
formatZodTypenow correctly handlesz.record(),z.default(), andz.literal()(previously produced empty/wrong prompt output). - Three edit modes (0.14) —
patch(RFC 6902),merge(RFC 7396),diff(unified) for progressive AI refinements.buildEditUserPrompt()+diffToPatches()+deepMergeSpec()in@json-render/core. @json-render/yaml(0.14) — official YAML wire format + streaming parser;buildUserPrompt({ format: 'yaml' }).- **`@js
Установить json-render-catalog в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл json-render-catalog?
json-render catalogs for AI-safe generative UI: Zod-typed components, @json-render/shadcn, YAML specs, patch/merge/diff edits. Use when defining component catalogs for AI-generated UIs.
Как установить скилл json-render-catalog?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл json-render-catalog запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic