design-code
БесплатноБез исполняемых скриптовНе проверенGenerate production-ready, accessible, token-driven component code for ANY framework (React+Tailwind, Next.js, SwiftUI, Vue, Svelte, Angular, Solid, Web…
от plugin87★ 3 262 звезды на GitHubОб этом скилле
Skill: Design Code
Requirements
This skill needs the full UX/UI Agent Skills kit: the gates, the references and
the design-system library. Install it with npx [email protected] init
or as the Claude Code plugin. npx [email protected] add copies the skill folder and
nothing else. Installed that way, this skill runs in guidance-only mode: no gate
runs, so it gives no verdict.
Step 0: is the kit here? Check once:
ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSINGOnKIT_MISSING, open your reply with: "Guidance-only mode: the UX/UI Agent Skills kit is not installed here, so no gate ran and nothing below is measured." Then work from this file and general practice, under three rules. Do not guess or cite the contents of a kit file you could not open. State no measured number (no contrast ratio, no N/N, no "passes WCAG"): write "not verified" where one would go. End with a lineSkipped (kit not installed):that names every gate script this file tells you to run, then the install command above.
Render components into a target framework via the adapter system.
Steps
- Identify the target framework + styling method from the request (or ask).
- Read
${CLAUDE_SKILL_DIR}/../../../frameworks/adapter-protocol.md(the universal contract: token resolution, component contract, styling, dark mode, motion + output rules). - Load the concrete adapter:
- Full references:
${CLAUDE_SKILL_DIR}/../../../frameworks/react-tailwind.md,${CLAUDE_SKILL_DIR}/../../../frameworks/nextjs.md,${CLAUDE_SKILL_DIR}/../../../frameworks/swiftui.md. - Concise adapters:
${CLAUDE_SKILL_DIR}/../../../frameworks/adapters/{vue,svelte,angular,solid,web-components-lit,react-native,flutter,jetpack-compose,vanilla-css,css-in-js}.md. - No file for the target? Generate an adapter on the fly using the protocol's "author a new adapter" checklist.
- Full references:
- Pull the component spec from
${CLAUDE_SKILL_DIR}/../../../components/*and the ARIA pattern from${CLAUDE_SKILL_DIR}/../../../accessibility/aria-patterns.md. - Resolve all values to tokens (
${CLAUDE_SKILL_DIR}/../../../tokens/*.json); apply aesthetic direction if requested (apply-aestheticskill).
Output rules (mandatory)
Use tokens (never hardcode) · include a11y on every interactive element · handle all applicable of the 8 states · support dark mode at the semantic layer · mobile-first · honor reduced motion · deliver complete files, no placeholders (${CLAUDE_SKILL_DIR}/../../../workflows/redesign-audit.md → Output Completeness).
Verification (mandatory before declaring done)
Code is the highest-stakes output. Self-check every time:
- No hardcoded values: every color/size/radius/shadow/duration/font traces to a token (CSS var / theme key / asset). Run
${CLAUDE_SKILL_DIR}/../../../scripts/lint_hardcodes.pyover the output; zero raw hex/px/ms AND zero raw Tailwind palette utilities (bg-gray-500,text-blue-600). Use semantic utilities/tokens (bg-surface,text-primary). Run${CLAUDE_SKILL_DIR}/../../../scripts/validate_theme_refs.pyso everyvar(--…)resolves to a defined theme token (no floating tokens). One allowed exception: 3rd-party theme-config (MUI/Mantine) mapping our tokens INTO their API. - All applicable states present: Default, Hover, Focus(-visible ring), Active, Disabled, Loading(+
aria-busy), Error, Selected, or justified N/A. - Accessibility wired: correct role/ARIA per
${CLAUDE_SKILL_DIR}/../../../accessibility/aria-patterns.md, keyboard model, focus management, ≥24px target; verify contrast (${CLAUDE_SKILL_DIR}/../../../scripts/contrast.py) for any new color pair. - Dark mode + reduced motion + responsive: semantic tokens swap; motion has a
prefers-reduced-motionfallback; layout is mobile-first. - Completeness: full files, no
// ...; if asked for N, deliver N. If any check fails, fix before returning (runa11y-auditif unsure). - Single-theme consistency: consume the project's ONE shared token theme (the root CSS-var layer); never define a per-page palette or new colors. Across multiple pages/screens, the same semantic tokens must drive every surface so the whole product stays visually identical and themeable from one place (
${CLAUDE_SKILL_DIR}/../../../.claude/rules/tokens-and-color.md→ Single-Theme Consistency). - One shared primitive layer: build ONE reusable component per atom (
Button,Input,Modal,Badgeviacva/equivalent); never repeat utility-class clusters inline across files or hand-roll a div-as-modal per screen. Overlays reuse the singleModalprimitive: focus trap,role="dialog",aria-modal="true",aria-labelledby, Escape, return focus on close, backdrop (WCAG 2.4.3 + 2.1.2). See${CLAUDE_SKILL_DIR}/../../../examples/golden/Button.tsx+${CLAUDE_SKILL_DIR}/../../../examples/golden/Modal.tsx. - Font loading: NEVER
@importweb fonts in CSS (render-
Установить design-code в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл design-code?
Generate production-ready, accessible, token-driven component code for ANY framework (React+Tailwind, Next.js, SwiftUI, Vue, Svelte, Angular, Solid, Web Components/Lit, React Native, Flutter, Jetpack Compose, vanilla CSS, or CSS-in-JS). Use when the user wants working UI code for a component or screen in a specific stack.
Как установить скилл design-code?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл design-code запускает скрипты?
Нет, скилл состоит только из инструкций (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