webflow-code-component:convert-component
БесплатноБез исполняемых скриптовНе проверенConvert an existing React component into a Webflow Code Component. Analyzes TypeScript props, maps to Webflow prop types, generates the .webflow.tsx…
от webflow★ 138 звёзд на GitHubОб этом скилле
Convert Component
Convert an existing React component into a Webflow Code Component by analyzing its structure and generating the appropriate .webflow.tsx definition file.
When to Use This Skill
Use when:
- User has an existing React component they want to use in Webflow
- User asks to "convert", "adapt", or "make this work with Webflow"
- User provides a React component file and wants a Webflow definition
- User is migrating components from another React project
Do NOT use when:
- Creating a component from scratch (use component-scaffold)
- User just wants to understand code components (answer directly)
- Component is already a Webflow code component (use component-audit)
Instructions
Phase 1: Analyze Existing Component
Read the React component file: Get the full source code
Extract component information:
- Component name (function/const name)
- Props interface or type definition
- Each prop's TypeScript type
- Default values if defined
- Whether component uses
children
Identify incompatible patterns:
Pattern Issue Resolution React Context usage Context doesn't work across Webflow components Refactor to props or use nano stores window/documentin renderSSR will fail Wrap in useEffect or set ssr: falselocalStorage/sessionStoragein renderSSR will fail Wrap in useEffect or set ssr: falseComplex object props Can't map to Webflow prop types Break into individual props Function props (callbacks) Not supported in Webflow Remove or internalize logic useContexthookWon't work across components Use alternative state patterns External CSS imports May not work in Shadow DOM Import in .webflow.tsx instead CSS class references to global styles Won't work in Shadow DOM Use component-scoped styles styled-components Needs Shadow DOM decorator Set up globals.ts with decorator Emotion (@emotion/styled) Needs Shadow DOM decorator Set up globals.ts with decorator Detect styling approach and note required setup:
If using styled-components:
npm i @webflow/styled-components-utils styled-componentsCreate/update
globals.ts:import { styledComponentsShadowDomDecorator } from "@webflow/styled-components-utils"; export const decorators = [styledComponentsShadowDomDecorator];If using Emotion:
npm i @webflow/emotion-utils @emotion/cache @emotion/reactCreate/update
globals.ts:import { emotionShadowDomDecorator } from "@webflow/emotion-utils"; export const decorators = [emotionShadowDomDecorator];For both CSS-in-JS approaches, update
webflow.json:styled-components:
{ "library": { "globals": "./src/globals.ts", "renderer": { "server": "@webflow/styled-components-utils/server" } } }Emotion:
{ "library": { "globals": "./src/globals.ts", "renderer": { "server": "@webflow/emotion-utils/server" } } }Flag any dependencies that might cause issues:
- Large libraries (bundle size concern)
- Browser-only libraries
- Libraries that manipulate DOM directly
Phase 2: Map Props to Webflow Types
Apply TypeScript → Webflow prop type mapping:
TypeScript Type Webflow Prop Notes stringprops.Text()Default for short text string(long/HTML content)props.RichText()If prop name suggests content/body/description React.ReactNode/childrenprops.Slot()For nested content numberprops.Number()Numeric values booleanprops.Boolean()Toggles "option1" | "option2"props.Variant()String literal unions (requires optionsarray)enumprops.Variant()Convert enum values to optionsarray (required){ href: string; ... }props.Link()Returns { href, target?, preload? }object — may need wrapper if component expects separatehref/targetpropsImage-related types props.Image()Image src, url, etc. string(canvas-editable text)props.TextNode()For text editable directly on canvas; has multilineparamboolean(show/hide)props.Visibility()Semantic show/hide toggle string(for HTML id)props.Id()If prop is named "id" or used for accessibility Complex objects SPLIT Break into multiple simple props Functions/callbacks REMOVE Not supported Arrays SPECIAL May need component redesign Handle special cases:
Complex object props - Break them down:
// Original interface Props { author: {
Установить webflow-code-component:convert-component в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл webflow-code-component:convert-component?
Convert an existing React component into a Webflow Code Component. Analyzes TypeScript props, maps to Webflow prop types, generates the .webflow.tsx definition file, and identifies required modifications.
Как установить скилл webflow-code-component:convert-component?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл webflow-code-component:convert-component запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic