Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

figma-to-angular

БесплатноБез исполняемых скриптовНе проверен

Converts Figma designs into production Angular components with Storybook stories for the Bitwarden Clients monorepo. Use this skill whenever the user provides…

bitwardenот bitwarden★ 14 360 звёзд на GitHub

Об этом скилле

Figma to Angular Component

This skill turns a Figma design spec into a fully implemented Angular component with Storybook stories in the Bitwarden Clients monorepo. The output should match the design visually while following all codebase conventions.

Workflow

Phase 1: Extract the design

Call get_design_context from the Figma MCP server. Extract the fileKey and nodeId from the URL:

  • figma.com/design/:fileKey/:fileName?node-id=:nodeId → convert - to : in nodeId
  • Pass clientFrameworks: "angular" and clientLanguages: "typescript,html,css"

The response contains reference code (React+Tailwind), a screenshot, and design metadata. Treat the code as a structural reference only — it must be fully converted to Angular.

Phase 2: Explore the codebase

Before writing any code, understand the conventions of the target location. Use an Explore agent to discover:

  1. Component file patterns — look at 2–3 sibling components in the same directory. Note the file naming, module structure, barrel exports, and whether they use standalone components.
  2. Existing components to reuse — search for components that match parts of the design (labels, buttons, inputs, icons). Reuse them instead of reimplementing.
  3. Tailwind configuration — read the relevant tailwind.config to understand the prefix (commonly tw-), available design tokens, and color system.
  4. Storybook patterns — check how sibling stories are structured: imports, moduleMetadata, I18nMockService usage, argTypes.
  5. i18n setup — find the I18nPipe import path and the locale messages file to add new keys.

This exploration is critical. Skipping it leads to components that don't match the codebase and require extensive rework.

Phase 3: Map design tokens

Create a mapping from Figma's design values to the codebase's Tailwind tokens. The Figma response includes raw CSS values (hex colors, px sizes). These must be translated to semantic tokens.

Common mappings for Bitwarden:

Figma concept Where to look
Colors (hex) tailwind.config → colors, bg, fg, border sections
Font sizes tailwind.config → extend.fontSize
Spacing / padding Standard Tailwind scale with prefix
Border radius Standard Tailwind (rounded-*)
Component variants Existing component source (e.g. base-button.directive.ts)

Never use raw hex values. Always map to a semantic token. If no exact match exists, use the closest available token and note the discrepancy.

Phase 4: Plan the component

Before writing code, create a plan covering:

  • Selector — follows the relevant prefix convention
  • Inputs and outputs — use Angular signal-based input() and output() functions
  • Content projection — identify slots for <ng-content> (labels, hints, actions)
  • Existing component reuse — which existing components to import and use
  • i18n keys — list all user-visible strings that need localization
  • Accessibility — keyboard navigation, ARIA attributes, focus management

Present this plan to the user and get approval before writing files.

Phase 5: Implement

Create these files following the patterns discovered in Phase 2:

Component TypeScript (component-name.component.ts)

@Component({
  selector: "bit-component-name",
  templateUrl: "./component-name.component.html",
  changeDetection: ChangeDetectionStrategy.OnPush,
  imports: [/* discovered dependencies */],
  host: {
    class: "tw-block",
  },
})

Key conventions:

  • ChangeDetectionStrategy.OnPush always
  • Signal-based inputs: input(), input.required<T>(), input(default, { transform: booleanAttribute })
  • Signal-based outputs: output<T>()
  • Internal state with signal() and viewChild()
  • Protected methods for template bindings, private for internal logic
  • No TypeScript enums — use Object.freeze({ ... } as const) with a same-name type alias (ADR-0025). Even for simple string unions, prefer the const object pattern for consistency.

Component template (component-name.component.html)

  • Use new Angular control flow: @if, @for, @switch
  • Avoid deprecated attributes like ngClass and ngStyle, prefer class and style.
  • All Tailwind classes use the library's prefix (check tailwind.config)
  • All user-visible strings go through {{ "key" | i18n }} or {{ "key" | i18n: param }}
  • Reuse existing components (bit-label, bitButton, bit-hint, etc.)

Barrel export (index.ts)

export { ComponentNameComponent } from "./component-name.component";

Storybook stories (component-name.stories.ts)

Every component gets stories. Follow the exact patterns from sibling components:

import
Полный SKILL.md на GitHub

Установить figma-to-angular в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/evals.json

FAQ

Что делает скилл figma-to-angular?

Converts Figma designs into production Angular components with Storybook stories for the Bitwarden Clients monorepo. Use this skill whenever the user provides a Figma URL and wants to create an Angular component, or mentions "implement this design", "create a component from Figma", "build this from the design spec", or similar. Also trigger when the user pastes a Figma link and asks for a component, even if they don't say "Figma" explicitly.

Как установить скилл figma-to-angular?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл figma-to-angular запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить figma-to-angular с