Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问clear审计提醒

figma-designerFigma designer 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

10,749

周安装

457

GitHub Stars

47

下载量

3,766
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:figma-designer(Figma designer 前端)
来源仓库:https://github.com/charon-fan/agent-playbook
仓库路径:skills/figma-designer
安装命令:
npx skills add https://github.com/charon-fan/agent-playbook --skill figma-designer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/charon-fan/agent-playbook --skill figma-designer

简介

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等代码,整理组件结构或定位布局问题。
  • 需结合项目设计系统、路由和构建方式,避免生成孤立片段;改动后应通过本地预览确认效果。
  • 安装命令:npx skills add https://github.com/charon-fan/agent-playbook --skill figma-designer
  • 适用于 Codex、Claude、Cursor、Gemini CLI,需确保环境支持 GitHub 技能加载。

SKILL.md

Figma Designer

"Transform Figma designs into implementation-ready specifications with pixel-perfect accuracy"

Overview

This skill analyzes Figma designs through the Figma MCP server and generates detailed PRDs with precise visual specifications. It extracts design tokens, component specifications, and layout information that developers can implement directly.

Prerequisites

Figma MCP Server

Ensure the Figma MCP server is connected and accessible:

# Check if Figma MCP is available
mcp-list

If not available, install from: https://github.com/modelcontextprotocol/servers

Required Figma MCP tools:

  • figma_get_file - Get file metadata
  • figma_get_nodes - Get node details
  • figma_get_components - Get component information

When This Skill Activates

Activates when you:

  • Provide a Figma link (https://www.figma.com/file/...)
  • Upload a design screenshot and mention "Figma"
  • Say "analyze this design" or "extract design specs"
  • Ask to "create PRD from Figma"

Design Analysis Workflow

Phase 1: Fetch Design Data

Input: Figma URL or File Key
  ↓
Extract File Key from URL
  ↓
Call figma_get_file to get metadata
  ↓
Call figma_get_nodes to get design tree
  ↓
Parse frame, component, and text nodes

Phase 2: Extract Design Tokens

Create a comprehensive design token inventory:

// Design Token Structure
interface DesignTokens {
  colors: {
    primary: string[];
    secondary: string[];
    neutral: string[];
    semantic: {
      success: string;
      warning: string;
      error: string;
      info: string;
    };
  };
  typography: {
    fontFamilies: Record<string, string>;
    fontSizes: Record<string, number>;
    fontWeights: Record<string, number>;
    lineHeights: Record<string, number>;
    letterSpacing: Record<string, number>;
  };
  spacing: {
    scale: number;  // 4, 8, 12, 16, etc.
    values: Record<string, number>;
  };
  borders: {
    radii: Record<string, number>;
    widths: Record<string, number>;
  };
  shadows: Array<{
    name: string;
    values: string[];
  }>;
}

Phase 3: Analyze Component Hierarchy

File
├── Frames (Pages/Screens)
│   ├── Component Instances
│   │   ├── Primary Button
│   │   ├── Input Field
│   │   └── Card
│   └── Text Layers
│       ├── Headings
│       ├── Body
│       └── Labels

For each component, extract:

  • Props: Size, variant, state
  • Layout: Flex direction, alignment, gap, padding
  • Styles: Fill, stroke, effects
  • Content: Text content, icons, images
  • Constraints: Responsive behavior

Phase 4: Generate Visual Specifications

Use this template for each screen:

## Screen: [Screen Name]

### Layout Structure

┌─────────────────────────────────────────┐ │ [Header/Nav] │ ├─────────────────────────────────────────┤ │ │ │ [Main Content] │ │ ┌───────────┐ ┌───────────┐ │ │ │ Card 1 │ │ Card 2 │ │ │ └───────────┘ └───────────┘ │ │ │ ├─────────────────────────────────────────┤ │ [Footer] │ └─────────────────────────────────────────┘

### Design Specifications

#### Colors

| Token | Value | Usage |
|-------|-------|-------|
| Primary | `#007AFF` | Primary buttons, links |
| Background | `#FFFFFF` | Screen background |
| Surface | `#F5F5F7` | Cards, sections |
| Text Primary | `#1C1C1E` | Headings, body |
| Text Secondary | `#8E8E93` | Captions, labels |

#### Typography

| Style | Font | Size | Weight | Line Height | Letter Spacing |
|-------|------|------|--------|------------|---------------|
| Display Large | SF Pro Display | 28px | Bold (700) | 34px | -0.5px |
| Heading 1 | SF Pro Display | 24px | Bold (700) | 32px | -0.3px |
| Heading 2 | SF Pro Display | 20px | Semibold (600) | 28px | -0.2px |
| Body Large | SF Pro Text | 17px | Regular (400) | 24px | -0.4px |
| Body | SF Pro Text | 15px | Regular (400) | 22px | -0.3px |
| Caption | SF Pro Text | 13px | Regular (400) | 18px | -0.1px |

#### Spacing

| Token | Value | Usage |
|-------|-------|-------|
| xs | 4px | Icon padding |
| sm | 8px | Tight spacing |
| md | 12px | Card padding |
| lg | 16px | Section spacing |
| xl | 24px | Large gaps |
| 2xl | 32px | Page margins |

#### Component: Primary Button

interface PrimaryButtonProps { size?: 'small' | 'medium' | 'large'; variant?: 'primary' | 'secondary' | 'tertiary'; disabled?: boolean; }

// Sizes size.small = { height: 32px, paddingHorizontal: 12px, fontSize: 15, iconSize: 16, }

size.medium = { height: 40px, paddingHorizontal: 16px, fontSize: 15, iconSize: 20, }

size.large = { height: 48px, paddingHorizontal: 24px, fontSize: 17, iconSize: 24, }

// Variants variant.primary = { backgroundColor: '#007AFF', color: '#FFFFFF', }

variant.secondary = { backgroundColor: '#F5F5F7', color: '#007AFF', }

variant.tertiary = { backgroundColor: 'transparent', color: '#007AFF', }


#### Constraints & Responsive Behavior

| Element | Constraints | Responsive Behavior |
| --- | --- | --- |
| Header | Left, Right, Top | Sticky on scroll |
| Sidebar | Left, Top, Bottom | Collapses to drawer on mobile |
| Content | Left, Right (16px) | Full width on mobile |

### Interaction States

| Element | Default | Hover | Pressed | Disabled |
| --- | --- | --- | --- | --- |
| Primary Button | opacity: 1 | opacity: 0.8 | opacity: 0.6 | opacity: 0.4 |
| Icon Button | opacity: 1 | background: rgba(0,0,0,0.05) | background: rgba(0,0,0,0.1) | opacity: 0.3 |
| Card | shadow: sm | shadow: md | - | opacity: 0.6 |

Output Formats

Option 1: Full PRD (Recommended)

Generates a complete 4-file PRD:

  • docs/{feature}-notes.md - Design decisions
  • docs/{feature}-task-plan.md - Implementation tasks
  • docs/{feature}-prd.md - Product requirements
  • docs/{feature}-tech.md - Technical specifications

Option 2: Visual Spec Document

Generates a design specification document:


docs/{feature}-design-spec.md

Option 3: Component Library

For design systems, generates:


src/components/ ├── Button/ │ ├── Button.tsx │ ├── Button.test.tsx │ └── Button.stories.tsx ├── Input/ ├── Card/ └── tokens.ts

Quick Reference: Design Token Categories

Always Extract These

CategoryWhat to ExtractWhy
ColorsHex/RGBA valuesTheme consistency
TypographyFont family, size, weight, spacingText hierarchy
SpacingPadding, margin, gap valuesLayout alignment
BordersRadius, width valuesShape consistency
ShadowsOffset, blur, spread, colorDepth perception
IconsName, size, colorVisual consistency
ImagesURL, dimensions, fit modeAsset management

Design Review Checklist

Before generating PRD, verify:

  • [ ] All screens are accounted for
  • [ ] Design tokens are extracted
  • [ ] Component variants are documented
  • [ ] Responsive behavior is specified
  • [ ] Interaction states are defined
  • [ ] Accessibility (WCAG) is considered

- [ ] Color contrast ratio ≥ 4.5:1 - [ ] Touch targets ≥ 44x44px - [ ] Focus indicators visible

Frame Analysis Template

For each frame/screen in the Figma file:

## Frame: {Frame Name}

### Purpose
{What this screen does}

### Elements

| Element | Type | Styles | Props |
|---------|------|--------|-------|
| {Name} | {Component/Text/Vector} | {css} | {props} |
| {Name} | {Component/Text/Vector} | {css} | {props} |

### Layout
- Container: {width, height, fill}
- Position: {absolute/relative}
- Constraints: {left, right, top, bottom}
- Auto Layout: {direction, spacing, padding, alignment}

### Content Hierarchy
1. {Primary element}
2. {Secondary element}
3. {Tertiary element}

### Notes
{Any special considerations}

Integration with Other Skills

Typical Workflow

Figma URL → figma-designer → Visual Specs
                                ↓
                           prd-planner → PRD
                                ↓
                           implementation → Code
                                ↓
                           code-reviewer → Quality Check

Handoff to Development

After generating specifications:

## Developer Handoff

### Design Files
- Figma: {url}
- Design Spec: {link}

### Design Tokens
- Generated: `tokens.ts`
- Color palette: `colors.ts`
- Typography: `typography.ts`

### Component Library
- Storybook: {url}
- Component docs: {link}

### Assets
- Icons: {folder}
- Images: {folder}
- Exports: {format}

Best Practices

DO

✅ Extract exact pixel values for critical dimensions ✅ Document component variants and states ✅ Include responsive breakpoints ✅ Note any platform differences (iOS vs Android) ✅ Include accessibility considerations ✅ Export design tokens as constants

DON'T

❌ Round spacing values (use exact 4px/8px/12px) ❌ Ignore hover/focus states ❌ Skip constraint behavior ❌ Forget about empty states ❌ Omit loading states ❌ Assume platform defaults without verification

Examples and Platform Notes

See references/example-output.md for a full sample output and platform-specific considerations.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.97%
按下载量换算1,129

Gemini CLI

22.12%
按下载量换算833

OpenCode

17.92%
按下载量换算675

Antigravity

11.06%
按下载量换算417

Codex

6.74%
按下载量换算254

Cursor

3.22%
按下载量换算121

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills