<< All versions

Skill v1.0.0

currentAutomated scan100/100
alvinindra/figma-mcp-rust/generate-type-scale
──Details
PublishedOctober 21, 2026 at 06:51 AM
Content Hashsha256:9e67706d28c9fe26...
Git SHA1b10632640fe
──Files
Files (1 file, 3.0 KB)
SKILL.md3.0 KBactive
SKILL.md · 63 lines · 3.0 KB

version: "1.0.0" name: generate-type-scale description: Generate a typographic scale (Display, Heading, Body, Label, Caption) from a base font and ratio and create Figma text styles with figma-mcp-rust. Use when the user asks for a type scale, typography system, or heading/body text styles.


Generate Type Scale

Given a base font family and body size, generate a full typographic scale as Figma text styles.

Input

Ask the user for:

  • Font family (e.g. "Inter"), required
  • Base body font size in px (e.g. 16), required
  • Scale ratio: "minor-third" (1.2), "major-third" (1.25), "perfect-fourth" (1.333), "golden" (1.618), default major-third
  • Include display sizes (above H1)? Default no
  • Include mono / code style? Default no

Scale Calculation

Using base size B and ratio R:

Style NameSize formulaWeightLine HeightLetter Spacing
Display/2XLB x R^7 (px)7001.1-0.02em
Display/XLB x R^67001.1-0.02em
Heading/H1B x R^57001.2-0.01em
Heading/H2B x R^47001.25-0.01em
Heading/H3B x R^36001.30
Heading/H4B x R^26001.350
Body/XLB x R^14001.60
Body/BaseB4001.60
Body/SMB / R4001.50
Label/LGB x R^0.5 (px)5001.4+0.01em
Label/BaseB5001.4+0.01em
Label/SMB / R5001.4+0.02em
Caption/BaseB / R^1.5 (px)4001.4+0.02em
Code/BaseB4001.60 (mono font)

Round all sizes to nearest integer. Minimum size: 10px.

Show the full table to the user for review before creating anything.

Creation Steps

  1. For each style row, call create_text_style() with:
  • name: e.g. "Heading/H1"
  • fontFamily: the chosen font
  • fontStyle: map weight to style name ("Regular"=400, "Medium"=500, "SemiBold"=600, "Bold"=700)
  • fontSize: calculated value
  • lineHeightValue + lineHeightUnit="PIXELS" (convert ratio x size to px)
  • letterSpacingValue + letterSpacingUnit="PERCENT" (convert em to %)
  1. Skip styles already present with the same name (create_text_style is idempotent).

Rules

  • Always show the scale preview table before executing.
  • Use "Regular" font style for weight 400, "Medium" for 500, "SemiBold" for 600, "Bold" for 700.

Adjust if the chosen font uses different style names (ask user to confirm).

  • Line height in PIXELS = round(fontSize x lineHeightRatio).
  • Letter spacing in PERCENT = letterSpacingEm x 100.
All versions