跳到正文
cccskills
免费在 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.

中文简介正在准备中。当前显示原文说明。

集成工具Figma
查看安装方法

包含的文件(1)

  • SKILL.md9.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill whenever the user wants to create or improve a presentation for an academic context — conference papers, seminar talks, thesis defenses, grant briefings, lab meetings, invited lectures, or any presentation where the audience will evaluate reasoning and evidence. Triggers include: 'conference talk', 'seminar slides', 'thesis defense', 'research presentation', 'academic deck', 'academic presentation'. Also triggers when the user asks to 'make slides' in combination with academic content (e.g., 'make slides for my paper on X', 'create a presentation for my dissertation defense', 'build a deck for my grant proposal'). This skill governs CONTENT and STRUCTURE decisions. For the technical work of creating or editing the .pptx file itself, also read the pptx SKILL.md.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

adp

免费

Redpanda's Agentic Data Plane: governance infrastructure for building, running, and governing AI agents and MCP servers, plus a proxying AI Gateway for LLM providers, operated via `rpk ai` and the ADP API. Use when creating or managing AI agents (managed or self-managed) via `rpk ai agent` or `AgentRegistryService`; configuring MCP servers (remote or managed catalog, code mode, auth); setting up LLM providers or querying models via `rpk ai llm`/`rpk ai model` or the AI Gateway proxy; or configuring budgets, guardrails, or Cedar access-control policies through the governance APIs. Also covers reading agent transcripts and spending insights, and wiring OAuth clients or providers to the aigw Authorization Server. For the separate rpk cloud mcp control-plane MCP server, see `/redpanda:rpk-cloud`.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

ads

免费

Operate professional paid advertising across Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat, and X. Use for account intake, source-grounded audits, strategy, budget and measurement planning, creative production, experiments, reporting, monitoring, and explicitly approved campaign changes. Also trigger on PPC, paid social, retail media, attribution, tracking, landing pages, cross-platform conversion totals, negative keywords or search terms, beta-feature scoring, stale platform claims, API-token or credential setup, campaign deletion, and safe Claude Ads installation or uninstall.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

ads-apple

免费

Audit Apple Ads measurement, AdServices and AdAttributionKit, campaign and keyword structure, Search Match, App Store placements, custom product pages, bidding, budgets, MMP reconciliation, and policy. Use for Apple Ads, Apple Search Ads, App Store ads, Search Match, custom product pages, AdServices, or Apple app-install campaigns.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

Research competitor paid-ad presence, messaging, creative, formats, landing pages, keyword and auction signals, transparent ad libraries, and strategic gaps across supported platforms. Use for competitor ads, ad libraries, ad spy, competitive PPC analysis, competitor creative, Google Ads Transparency, Meta Ad Library, or paid-media competitor research.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

ads-dna

免费

Extract a public-safe brand and offer profile for paid advertising from an authorized website and operator input. Triggers on: brand DNA, brand profile, brand identity, brand style, brand colors, brand voice, visual identity, style guide, website brand analysis.

中文简介正在准备中。当前显示原文说明。

skillmds/skillmd2492026年10月14日 更新

查看 skillmds 的全部技能

报告此技能的问题