本文へ移動
cccskills
無料GitHub で公開

image-to-code

Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Skill: Image to Code

Step 0 — is the kit here? This skill reads files from the kit. Check once: ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING On KIT_MISSING only the skill folders were installed, which is what npx skills add does. Say so plainly, point the user at npx ux-ui-agent-skills init or the plugin install, and stop. Do not guess the contents of a file you could not open.

Reconstruct a design from a visual reference as a real design system, not a one-off copy. Match the system (color/type/spacing language), never lift copyrighted imagery or brand assets.

Steps

  1. Read the reference like a designer. Infer and write down:
    • Palette — 1 dominant surface family, text colors, 1 primary action + at most 1 accent (sample the hues; don't guess random hex).
    • Type — family feel (geometric/grotesk/serif), the scale jumps, display vs. body contrast, weights.
    • Spacing & density — base unit, section rhythm, card padding; airy vs. compact.
    • Radius & depth — radius language (sharp/soft/pill), shadow vs. hairline separation.
    • Layout archetype + sequence — bounded hero / asymmetric split / dense bento / editorial stack (${CLAUDE_SKILL_DIR}/../../../taste/design-taste.md → Variance Mandate).
  2. Anchor to a known system if it's close — browse ${CLAUDE_SKILL_DIR}/../../../taste/aesthetic-systems.md / python3 ${CLAUDE_SKILL_DIR}/../../../scripts/design_systems.py search <term> and adopt that recipe to stabilize decisions.
  3. Build the token theme from the inferred values → 3-tier DTCG (design-tokens skill); generate a single theme.css. Verify every color pair with ${CLAUDE_SKILL_DIR}/../../../scripts/contrast.py / ${CLAUDE_SKILL_DIR}/../../../scripts/validate_contrast.py (light + dark) — a sampled brand color that fails AA gets adjusted; taste never overrides POUR.
  4. Rebuild layout + components token-driven via ${CLAUDE_SKILL_DIR}/../../../frameworks/adapter-protocol.md + ${CLAUDE_SKILL_DIR}/../../../components/*: one shared primitive layer, all 8 states, a11y wired, no emoji (lucide), single theme. Apply taste (design-taste.md) so it doesn't regress to generic.
  5. Verify against the reference — render and screenshot it, compare side-by-side to the reference; run node ${CLAUDE_SKILL_DIR}/../../../scripts/measure_render.mjs, lint_hardcodes.py, taste_audit.mjs, and npm run verify.

Verification (definition of done)

  • npm run verify is 100% (tokens resolve, contrast AA light+dark, no hardcodes/emoji, real-render WCAG).
  • The rebuilt UI uses ONE inferred token theme — no per-section palettes.
  • A screenshot of the result visibly matches the reference's design language.

Honest limit: this matches the design system, not a pixel-perfect copy. Do not reproduce the reference's photographs, logos, or copyrighted copy — substitute your own or generic placeholders.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit a UI or design against WCAG 2.2 AA/AAA and ARIA patterns, returning criterion-referenced findings with severity and specific fixes. Use when the user wants an accessibility check, contrast verification, keyboard/screen-reader review, or wants to confirm a component meets POUR.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

Apply a visual direction — an archetype (high-end agency, editorial minimal, brutalist, soft-SaaS, dark-tech) or one of 138 named design systems (apple, linear-app, stripe, vercel, notion, material, shadcn, spotify, tesla…) — by resolving it into the token system. Use when the user wants a specific look/vibe/brand feel, or asks to make a design feel premium/expensive/non-generic.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

brandkit

無料

Generate a complete, accessible brand design system from a brief — primitive → semantic → component DTCG tokens (color, type, spacing, radius, shadow, motion), light + dark, plus a single theme.css — verified for WCAG. Use when the user wants a from-scratch brand/design foundation, a new palette + type system, or a themeable token kit for a product.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

critique

無料

Adversarial design critique of the current work — render it, look at it, and argue for rejection. Run after the gates are green, never instead of them.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

Build a dense, data-heavy screen - an analytics console or a trading terminal - with real charts drawn from tokens: candlestick, volume, depth, stacked area, waterfall, scatter, correlation matrix, donut, gauge, sparklines, heatmaps and order books. Use when the request is a dashboard, terminal, monitoring view, data console, or any screen whose job is to show many numbers at once. Covers the layout sequence, the SVG geometry, the accessibility contract per chart type, and the contrast traps that only appear in dark mode.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

plugin87/ux-ui-agent-skills1,5732026年10月11日 更新

plugin87 のスキルをすべて見る

このスキルの問題を報告する