Skip to content
cccskills
FreePublished on GitHub

figma

Bidirectional Figma skill — read designs and write back to Figma. READ: extract tokens, map Vue/Reka UI components, translate Auto Layout to Tailwind. WRITE: push components, screens, and design tokens from code to Figma. Requires /figma:figma-use skill before every use_figma call.

The English summary is being prepared. Showing the original description.

Works withFigma
See how to install

Files included (1)

  • SKILL.md9.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Skill: Figma ↔ Vue 3 + shadcn-vue

Reading flow via MCP (Figma → Code)

1. mcp:figma → get_design_context(nodeId or URL)  ← always first
2. mcp:figma → get_variable_defs(nodeId)           ← formal tokens
3. mcp:figma → search_design_system(query)         ← DS components
4. mcp:figma → get_screenshot(nodeId)              ← visual reference

Figma → Tailwind Translation

Auto Layout → Flexbox/Grid Vue

Figma Auto LayoutTailwindVue template
Horizontal, gap 16flex gap-4<div class="flex gap-4">
Vertical, gap 24flex flex-col gap-6<div class="flex flex-col gap-6">
Space betweenflex justify-between
Fill container (width)flex-1 or w-full
Fixed width 320pxw-80 or w-[320px]
Wrapflex flex-wrap
Align centeritems-center
Grid 3 cols, gap 16grid grid-cols-3 gap-4

Colors → shadcn-vue CSS Variables

Figma Semanticshadcn CSS VariableTailwind
Primary--primarybg-primary text-primary-foreground
Background--backgroundbg-background
Foreground--foregroundtext-foreground
Muted--muted-foregroundtext-muted-foreground
Destructive--destructivetext-destructive border-destructive
Border--borderborder-border
Card--cardbg-card

Figma Typography → Tailwind

FigmaTailwind
12px Regulartext-xs
14px Regulartext-sm
14px Medium 500text-sm font-medium
14px Semibold 600text-sm font-semibold
16px Regulartext-base
18px Semiboldtext-lg font-semibold
20px Boldtext-xl font-bold
24px Boldtext-2xl font-bold
30px Boldtext-3xl font-bold

Figma line-height (absolute) → Tailwind (relative):

  • 16px line-height with 14px font → leading-none (1)
  • 20px / 14px → leading-tight (1.25)
  • 20px / 16px → leading-5 (1.25)
  • 24px / 16px → leading-6 (1.5) ← default body

Spacing → Tailwind Scale (base 4px)

Figma pxTailwindrem
2gap-0.5 p-0.50.125
4gap-1 p-10.25
8gap-2 p-20.5
12gap-3 p-30.75
16gap-4 p-41
20gap-5 p-51.25
24gap-6 p-61.5
32gap-8 p-82
40gap-10 p-102.5
48gap-12 p-123

Border radius → Tailwind

FigmaTailwind
4pxrounded
6pxrounded-md
8pxrounded-lg
12pxrounded-xl
16pxrounded-2xl
50% / circlerounded-full

Shadows → Tailwind

FigmaTailwind
0 1px 2px rgba(0,0,0,0.05)shadow-sm
0 1px 3px rgba(0,0,0,0.1)shadow
0 4px 6px rgba(0,0,0,0.07)shadow-md
0 10px 15px rgba(0,0,0,0.1)shadow-lg
0 25px 50px rgba(0,0,0,0.25)shadow-2xl

Figma → shadcn-vue Vue Component Mapping

Visual pattern in Figmashadcn-vue component
Surface / Card with padding<Card> + sub-parts
Primary button<Button>
Destructive button<Button variant="destructive">
Ghost button<Button variant="ghost">
Text input<Input>
Text area<Textarea>
Dropdown / Select<Select> + sub-parts
Select with searchCombobox (Command + Popover)
Modal / Overlay<Dialog>
Bottom sheet<Sheet>
Temporary notificationtoast() from vue-sonner
Badge / Chip<Badge>
Context menu<DropdownMenu>
Tooltip<Tooltip>
Tabs<Tabs> + sub-parts
Accordion<Accordion> + sub-parts
Checkbox<Checkbox>
Toggle on/off<Switch>
Loading placeholder<Skeleton>
Empty state<Empty> + sub-parts
Data table<DataTable>
Breadcrumb<Breadcrumb> + sub-parts
Form field<Field> or <FormField>
Button group<ButtonGroup>
Input with icon<InputGroup>
Spinner<Spinner>
Stepper<Stepper> + sub-parts

Components without shadcn-vue equivalent → Reka UI primitive

<!-- Custom component with Reka UI -->
<script setup lang="ts">
import { ComboboxRoot, ComboboxInput, ComboboxContent, ComboboxItem } from 'reka-ui'
</script>
<template>
  <ComboboxRoot>
    <ComboboxInput class="..." />
    <ComboboxContent class="...">
      <ComboboxItem v-for="item in items" :key="item.id" :value="item">
        {{ item.label }}
      </ComboboxItem>
    </ComboboxContent>
  </ComboboxRoot>
</template>

Expected output: figma-spec.md

# Figma Spec — [Frame Name]

## Extracted tokens

### Colors
| Token | Hex | Tailwind equiv. | CSS var |
|---|---|---|---|
| Brand blue | #2563EB | `bg-blue-600` | `--primary` |

### Typography
| Usage | Size | Weight | Tailwind |
|---|---|---|---|
| Heading | 24px | 700 | `text-2xl font-bold` |

### Dominant spacing
| Usage | Value | Tailwind |
|---|---|---|
| Gap between cards | 24px | `gap-6` |

## Mapped components

### [ComponentName]
- **shadcn-vue**: `<Card>` with `<CardHeader>`, `<CardContent>`, `<CardFooter>`
- **Reka UI base**: `N/A` (shadcn-vue abstracts it)
- **Required props**: title, description, actions[]
- **Variants**: default, highlighted
- **States**: default, loading (Skeleton), empty
- **Notes**: Status Badge in CardHeader

## Documented behaviors
- Hover: card elevates with shadow-md
- Loading: 3 Skeleton cards of same dimensions

## Deviations from standard shadcn-vue
- Badge uses custom color #7C3AED — add as CSS variable

Writing flow via MCP (Code → Figma)

Prerequisites

MANDATORY: Before every use_figma call, load the /figma:figma-use skill. This skill teaches the Figma Plugin API syntax needed for write operations.

1. Load /figma:figma-use skill                    ← ALWAYS first
2. mcp:figma → whoami                              ← verify connection
3. mcp:figma → search_design_system(query)         ← discover existing DS
4. mcp:figma → use_figma(javascript)               ← create/edit nodes

Available write tools

ToolWhat it does
use_figmaExecute JavaScript in Figma context — create frames, text, components, set properties
create_new_fileCreate a new Figma or FigJam file
generate_diagramCreate diagrams in FigJam

Available design skills

SkillWhen to use
/figma:figma-useRequired before every use_figma call
/figma:figma-generate-designPush full screens/pages to Figma
/figma:figma-generate-libraryBuild design system with tokens and components

Tailwind → Figma reverse mapping

TailwindFigma Auto Layout property
flex gap-4layoutMode: "HORIZONTAL", itemSpacing: 16
flex flex-col gap-6layoutMode: "VERTICAL", itemSpacing: 24
justify-betweenprimaryAxisAlignItems: "SPACE_BETWEEN"
items-centercounterAxisAlignItems: "CENTER"
p-4paddingTop/Right/Bottom/Left: 16
px-4 py-2paddingLeft/Right: 16, paddingTop/Bottom: 8
w-fulllayoutSizingHorizontal: "FILL"
flex-1layoutGrow: 1
TailwindFigma node property
rounded-lgcornerRadius: 8
shadow-mdDrop shadow effect: y: 4, blur: 6, spread: -1
text-sm font-mediumfontSize: 14, fontWeight: 500
bg-primaryFill bound to variable --primary
border-borderStroke bound to variable --border

Writing components — pattern

// Example: Create a Card component in Figma
const card = figma.createFrame()
card.name = "Card"
card.layoutMode = "VERTICAL"
card.itemSpacing = 0
card.cornerRadius = 8
card.paddingTop = card.paddingBottom = 24
card.paddingLeft = card.paddingRight = 24

// Bind to variable instead of hardcoding
const bgVar = figma.variables.getLocalVariables().find(v => v.name === "card")
if (bgVar) {
  card.setBoundVariable("fills", bgVar.id)
}

Writing tokens — pattern

// Create a variable collection for design tokens
const collection = figma.variables.createVariableCollection("Design Tokens")

// Add color variable with light/dark modes
const primaryVar = figma.variables.createVariable("primary", collection.id, "COLOR")
primaryVar.setValueForMode(lightModeId, { r: 0.09, g: 0.09, b: 0.09 })
primaryVar.setValueForMode(darkModeId, { r: 0.98, g: 0.98, b: 0.98 })

Gotchas — Write mode

  • Always use figma.variables for colors — never hardcode hex
  • Auto Layout must be set via layoutMode before setting itemSpacing
  • Text nodes require figma.loadFontAsync() before setting characters
  • Component variants: use figma.combineAsVariants() after creating all variants
  • Figma plugin API is synchronous except font loading — handle await properly

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Accessibility auditing and remediation skill for Vue 3 + Reka UI. Use when reviewing components, verifying WCAG 2.1 AA, fixing ARIA issues, or validating keyboard navigation in Reka UI components.

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

Infraestrutura para IA — GPU, servidores MCP, gateway de LLM, pipeline de inferência, custo de token, cache semântico e observabilidade de modelo. Use quando o usuário disser "GPU", "MCP server", "LLM", "inferência", "modelo", "gateway de IA", "custo de token", "rate limit da API de IA", "self-host de modelo".

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

Escreve texto alternativo e descrição de imagem para peças de rede social. Use quando o usuário disser "alt text", "texto alternativo", "descrição da imagem", "acessibilidade da peça", "descrever para leitor de tela", ou automaticamente antes de qualquer publicação. Obrigatório em todas as peças — em carrossel, um por slide.

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

Organiza, compara e seleciona entre as variações geradas, e publica a grade de comparação como Artifact para aprovação do time. Use quando o usuário disser "qual dessas", "comparar as variações", "escolher a melhor", "mostrar as opções", "montar grade de aprovação", ou após qualquer lote de geração. Selecionar é trabalho, não detalhe.

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

Aumenta resolução e qualidade de imagem via Freepik/Magnific, ou orienta o processo manual quando não há chave. Use quando o usuário disser "upscale", "melhorar a resolução", "a imagem está pixelada", "Magnific", "Freepik", "aumentar a imagem", "imagem pequena demais". Gasta crédito — exige confirmação.

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

CI/CD e automação — GitHub Actions, Terraform, OpenTofu, Ansible, n8n. Use quando o usuário disser "pipeline", "CI/CD", "GitHub Actions", "workflow", "terraform", "ansible", "n8n", "automatizar", "deploy automático", "IaC".

The English summary is being prepared. Showing the original description.

pwdev-solucoes/pwdev-claude-marketplace3Updated Oct 15, 2026

See all skills by pwdev-solucoes

Report a problem with this skill