agents/projects/chrome-design-system/skills/generate-component-spec/SKILL.md
//src/).[User provides Figma URL]
│
▼
[Step 1: Extract URL metadata & Retrieve Figma design context]
│
▼
[Step 2: Search C++ Views for controls under ui/views/controls/]
│
▼
[Step 3: Search WebUI under ui/webui/resources/cr_elements/]
│
▼
[Step 4: Analyze design tokens, colors, shapes, and typography]
│
▼
[Step 5: Identify architectural & state-handling gaps]
│
▼
[Step 6: Generate the final Markdown Spec File]
fileKey (e.g., qj3RvxSvSMVdw4tcH8GVMX) and the nodeId from the URL parameters.nodeId parameter to colons (e.g., 20268-1070 becomes 20268:1070).mcp_figma_get_design_context with your extracted fileKey and nodeId.ui/views/controls/. Search in this directory (especially under subdirectories like button/, textfield/, checkbox/, combobox/ depending on the component's visual role) using glob or grep_search. If there are no matches, note that there are no matches..h header files.enum class ButtonStyle in ui/base/ui_base_types.h) and typography providers (such as ui/views/style/typography_provider.cc).ui/webui/resources/cr_elements/ and ui/webui/resources/cr_components/. Search in this directory using glob or grep_search. If there are no matches, note that there are no matches..ts controller file (e.g., cr_button.ts) and any associated HTML templates (.html.ts) or CSS files (.css)..action-button or .tonal-button for <cr-button>).--desktop/sys/primary-colors/primary) to corresponding C++ ColorId entries (e.g., ui::kColorButtonBackgroundProminent in ui/color/color_id.h or material_ui_color_mixer.cc) and WebUI custom properties (e.g., --color-button-background-prominent).border-radius: 100px) or resolved dynamically.Document differences between design intent and system implementations, focusing on:
FocusRing).Write a polished, comprehensive Markdown specification file. Strictly follow rules:
{{ComponentName}}_Spec.md. Use the component name from Figma. If the component name includes the platform, separate it out like this: {{ComponentName}}_{{Platform}} (e.g. TextFields_WebUI).assets/spec-template.md.
//src/), NOT the user's filesystem (do not include file://).agents/projects/chrome-design-system/assets/component-specs/ directory.