[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CRCDHBQE86JAT3CBQ1KKVR":3,"skill-same:01M6CRCDHBQE86JAT3CBQ1KKVR":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":65,"install":66,"resources":78},"01M6CRCDHBQE86JAT3CBQ1KKVR","hp-design-sync",null,"Sync design tokens and component definitions from Figma into local JSON files. Requires Figma MCP.","ohmyhotelco\u002Fhare-cc-plugins","ohmyhotelco","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F258133233?v=4","01M6CR4HP2N9F9ZWNX1KRHQ2W1","01M6CR4HSJC5J80RVQMD5K9QRN",2,"MIT","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fhomepage-plugin\u002Fskills\u002Fhp-design-sync\u002FSKILL.md",[17,22,25],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"sync","design sync","hp design sync","design","write","true","URL","tokens","local","files","design tokens","edit","read","grep","json","Bash","file","figma","component","MCP","2026-11-10 10:12:30",false,"---\nname: hp-design-sync\ndescription: \"Sync design tokens and component definitions from Figma into local JSON files. Requires Figma MCP.\"\nargument-hint: \"[figma-file-url]\"\nuser-invocable: true\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# Sync Design Tokens from Figma\n\nExtract design tokens and component definitions from a Figma file via the official Figma MCP server, saving them as local JSON files for use by `hp-gen`.\n\nSupports both **design system library files** and **page-based design files** (where each Figma page represents a website page with sections as child frames).\n\n## Instructions\n\n### Step 0: Read Configuration\n\nRead `.claude\u002Fhomepage-plugin.json`. Extract `defaultLocale` for communication language.\n\nLanguage mapping:\n- `ko` → Korean\n- `en` → English\n- `vi` → Vietnamese\n\n### Step 1: Resolve Figma File Key\n\nDetermine the Figma file key from one of these sources (in priority order):\n\n1. **Skill argument** — if `[figma-file-url]` was provided, extract the file key using regex: `figma\\.com\u002F(file|design)\u002F([a-zA-Z0-9]+)`\n2. **Configuration** — read `figmaFileKey` from `.claude\u002Fhomepage-plugin.json`\n3. **User prompt** — if neither is available, ask the user for a Figma file URL\n\nAlso extract nodeId from URL if present (query param `node-id`). This allows targeting a specific page or frame.\n\nOnce resolved, if `figmaFileKey` is not already in `.claude\u002Fhomepage-plugin.json`, update the config file to add `figmaFileKey` and `figmaFileUrl` fields.\n\n### Step 2: Verify Figma MCP Connection\n\n#### 2.1 Tool Discovery\n\nCheck that Figma MCP tools are available. Look for tools matching any of these patterns:\n- `mcp__figma__*`\n- `mcp__figma_desktop__*`\n- `mcp__Figma__*`\n\nIf no Figma MCP tools are found, display an error message with setup instructions:\n\n> **Figma MCP not connected.**\n>\n> To set up the Figma MCP server:\n> 1. Remote (recommended): Add `https:\u002F\u002Fmcp.figma.com\u002Fmcp` as an MCP server\n> 2. Or install the Figma desktop MCP plugin\n>\n> See: https:\u002F\u002Fdevelopers.figma.com\u002Fdocs\u002Ffigma-mcp-server\u002F\n\nThen exit.\n\nIdentify the exact tool name prefix (e.g., `mcp__figma__` or `mcp__figma_desktop__`) for passing to the agent.\n\n#### 2.2 Connectivity Test\n\nAfter identifying the tool prefix, perform an actual MCP call to verify the connection works:\n\nCall `{mcpToolPrefix}get_metadata` with the `fileKey` from Step 1.\n\n- **Success**: The tool returns file metadata (page names, node structure). Proceed to Step 3 using this response (avoids a redundant call).\n- **Failure \u002F Error \u002F Timeout**: Display an error:\n\n> **Figma MCP connection failed.**\n>\n> Tools with prefix `{mcpToolPrefix}` were found but the connection test failed.\n> Error: {error message}\n>\n> Possible causes:\n> 1. The MCP server is not running or unreachable\n> 2. The Figma file key is invalid: `{fileKey}`\n> 3. You don't have access to this Figma file\n> 4. The MCP server needs re-authentication\n>\n> Try restarting the MCP server or re-adding it.\n\nThen exit. **Do NOT proceed to the agent if the connectivity test fails.**\n\n### Step 3: Discover File Structure and Classify Pages\n\nUse the `get_metadata` response from Step 2.2 (do not call again — reuse the connectivity test result).\n\n#### 3.1 Determine File Structure\n\nAnalyze the result to determine the file structure:\n\n- **Page-based**: The file contains pages with names like \"Home\", \"About\", \"Services\", etc. Each page has child frames representing sections (hero, features, etc.). This is the common case for website design files.\n- **Library-based**: The file contains pages with names like \"Components\", \"Styles\", \"Tokens\", \"Primitives\". This is a design system library.\n\n#### 3.2 Classify Pages\n\nFor page-based files, classify each page into one of four categories using name pattern matching:\n\n| Category | Name Patterns (case-insensitive) | Purpose |\n|---|---|---|\n| `website` | \"Home\", \"About\", \"Services\", \"Pricing\", \"Contact\", \"Blog\", \"FAQ\", \"Landing\", \"Portfolio\" and other website page names | Website pages with sections |\n| `layout` | \"Layout\", \"Shared\", \"Common\", \"Global\", \"Navigation\" | Header\u002FFooter\u002FNav definitions |\n| `icons` | \"Icons\", \"Iconography\", \"Icon Set\", \"Icon Library\" | Icon component library |\n| `components` | \"Components\", \"Design System\", \"Library\", \"UI Kit\", \"Atoms\", \"Molecules\" | Additional UI components |\n\nPages that do not match any non-website pattern default to `website`.\n\n**Viewport detection**: For website pages, detect if multiple viewport variants exist. Common patterns:\n- Same page name with viewport suffix: \"Home - Desktop\", \"Home - Mobile\", \"Home - Tablet\"\n- Same page name with size suffix: \"Home 1440\", \"Home 375\", \"Home 768\"\n- Separate pages named \"Mobile\", \"Tablet\", \"Responsive\"\n- Frames within a page with different widths (check via `get_metadata` child frame dimensions)\n\nIf multiple viewports are detected, group them by page and record the viewport info in `selectedPages`:\n```json\n{ \"name\": \"Home\", \"nodeId\": \"0:1\", \"pageType\": \"website\", \"viewport\": \"desktop\", \"viewportWidth\": 1440 }\n{ \"name\": \"Home - Mobile\", \"nodeId\": \"0:4\", \"pageType\": \"website-mobile\", \"viewport\": \"mobile\", \"viewportWidth\": 375, \"desktopPageName\": \"Home\" }\n```\n\nIf no mobile\u002Ftablet variants are found, this is normal — the section generator will apply responsive breakpoint inference rules.\n\nFor library-based files, all pages default to `components` category.\n\n#### 3.3 User Confirmation\n\nDisplay the classified pages with their detected categories to the user:\n\n```\nDetected pages:\n  [website]     Home (5 sections)\n  [website]     About (3 sections)\n  [layout]      Layout (Header, Footer)\n  [icons]       Icons (24 components)\n  [components]  Components (Card, Badge, Avatar, ...)\n```\n\nAsk:\n\n> \"Which pages should we extract? You can also change page categories if the auto-detection is wrong. (Enter page names or 'all')\"\n\nThe user can:\n- Select which pages to extract\n- Override a page's category (e.g., reclassify a page auto-detected as `components` to `website`)\n\nIf a `nodeId` was extracted from the URL in Step 1, pre-select the corresponding page.\n\n### Step 4: Check Existing Design System\n\nRead `docs\u002Fdesign-system\u002Fdesign-tokens.json` if it exists.\n\n- If it exists, show the last sync time (`extractedAt` field) and ask: **\"Update existing tokens or replace entirely?\"**\n  - **Update** — agent merges new values with existing ones\n  - **Replace** — agent overwrites completely\n- If it does not exist, proceed with fresh extraction.\n\n### Step 5: Launch Design Token Extractor Agent\n\nLaunch the `design-token-extractor` agent (`subagent_type: \"homepage-plugin:design-token-extractor\"`) with the following parameters:\n\n- `fileKey` — the Figma file key from Step 1\n- `mcpToolPrefix` — the MCP tool name prefix identified in Step 2\n- `selectedPages` — list of `{ name, nodeId, pageType }` objects selected by the user in Step 3. `pageType` is one of `\"website\"`, `\"website-mobile\"`, `\"website-tablet\"`, `\"layout\"`, `\"icons\"`, `\"components\"`\n- `fileStructure` — `\"page-based\"` or `\"library-based\"` (from Step 3)\n- `projectRoot` — current working directory\n- `outputDir` — `docs\u002Fdesign-system\u002F`\n- `mode` — `\"update\"` or `\"replace\"` (from Step 4, default `\"replace\"` for fresh extraction)\n- `figmaAccessToken` — (optional) read from `.claude\u002Fhomepage-plugin.json`. If present, enables REST API image export fallback. If absent, omit this parameter.\n\n### Step 6: Validate Output\n\nAfter the agent completes, first check for extraction failure:\n\n**6.0 Check for total failure:**\n- If `docs\u002Fdesign-system\u002Fextraction-error.json` exists, read it and display the error:\n  > **Design token extraction failed.**\n  > {error message from the file}\n  >\n  > No design tokens were extracted. Check your Figma MCP connection and try again.\n  Then exit without proceeding to Step 7.\n\n**6.1 Structural validation** — verify the output files exist and are well-formed:\n\n1. **`docs\u002Fdesign-system\u002Fdesign-tokens.json`** must exist and contain:\n   - `$schema` field equal to `\"design-tokens-v1\"`\n   - `colors` object with at least `primary`, `background`, `foreground`\n   - `cssVariables` object with `:root` containing at least 10 CSS variable entries\n   - `typography` object with `fontFamily`\n   - `extractionStats` object\n\n2. **`docs\u002Fdesign-system\u002Fcomponent-map.json`** must exist and contain:\n   - `$schema` field equal to `\"component-map-v1\"`\n   - `pages` object with at least one page entry (for page-based files) OR `globalComponents` object (for library-based files)\n   - `extractionStats` object\n\nIf structural validation fails, report which fields are missing and suggest re-running.\n\n**6.2 Extraction coverage validation** — verify that meaningful data was extracted from Figma:\n\nRead `extractionStats.overallCoverage` from `design-tokens.json`.\n\n- **Coverage >= 0.5** (50%+) → proceed normally\n- **Coverage \u003C 0.5 but > 0** → display a warning:\n  > **Low extraction coverage ({coverage*100}%).**\n  > Most design tokens are using default values, not values from your Figma file.\n  > This may indicate that the Figma file has non-standard variable naming,\n  > or that some MCP tool calls failed during extraction.\n  >\n  > You can:\n  > 1. Proceed with the current tokens (defaults will be used for missing values)\n  > 2. Re-run `\u002Fhomepage-plugin:hp-design-sync` to retry extraction\n  >\n  Ask the user whether to proceed or retry.\n- **Coverage == 0** → display an error:\n  > **No tokens were extracted from Figma.**\n  > All values in the output are defaults. This likely means the Figma MCP\n  > connection failed silently during extraction.\n  >\n  > Please verify your Figma MCP connection and re-run `\u002Fhomepage-plugin:hp-design-sync`.\n  Then exit.\n\n**6.3 Content image validation** (page-based files only):\n\nRead `component-map.json` and check sections that have `contentImages`:\n\n1. For each section with `contentImages.status !== \"none\"`:\n   - Verify that files referenced in `contentImages.images[].path` actually exist at `{projectRoot}\u002Fsrc\u002Fassets\u002F{path}`\n   - Count total extracted vs failed\n\n2. If any images have `extracted: false`, collect all `manualExport` entries and display a single actionable guide:\n\n   > **The following images need to be exported manually from Figma:**\n   >\n   > | # | Figma Layer | Section | Save To |\n   > |---|---|---|---|\n   > | 1 | {manualExport.figmaNodeName} | {sectionType} | `{manualExport.saveTo}` |\n   > | 2 | ... | ... | ... |\n   >\n   > **Export steps:**\n   > 1. Open the Figma file\n   > 2. Select the layer listed above\n   > 3. In the right panel, click \"Export\" → Format: **PNG**, Scale: **2x**\n   > 4. Save to the path shown in \"Save To\" (relative to project root)\n   >\n   > After placing the files, proceed with `\u002Fhomepage-plugin:hp-plan`. Missing images will use placeholder values during code generation — optional image props will be omitted, required ones will get a TODO comment.\n\n3. If `contentImages.extractionSummary` shows `total: 0` across all sections but image-bearing section types exist (HeroSection, TeamSection, etc.), display a note:\n\n   > **No content images were found in the Figma sections.**\n   >\n   > This is common when logos or illustrations are drawn as **vector shapes** rather than placed as image files. Figma MCP cannot export vector-only nodes as files.\n   >\n   > You can add images after running `\u002Fhomepage-plugin:hp-plan` by exporting from Figma (Select layer → right panel \"Export\" → PNG @2x) and placing them in `src\u002Fassets\u002Fimages\u002F{pageName}\u002F{sectionType}\u002F`.\n\n**6.4 Layout validation** (if any selected page had `pageType: \"layout\"`, or `component-map.json` contains `sharedComponents`):\n\n1. If `component-map.json` has `sharedComponents.Header` or `sharedComponents.Footer`:\n   - Verify `docs\u002Fpages\u002F_shared\u002Flayout-plan.json` exists\n   - Verify screenshot files referenced in `sharedComponents[].screenshotRef` exist under `docs\u002Fdesign-system\u002F`\n2. If layout pages were selected but `sharedComponents` is empty or missing, display a warning:\n   > **No layout components were detected in the layout page(s).**\n   >\n   > The page was classified as a layout page but no Header or Footer frames were found.\n   > You can define the layout manually during `\u002Fhomepage-plugin:hp-plan`.\n\n**6.5 Icon map validation** (if any selected page had `pageType: \"icons\"`):\n\n1. Verify `iconMap` exists in `component-map.json`\n2. If `iconMap.unmappedCount > 0`, display a warning:\n   > **{unmappedCount} icon(s) could not be mapped to Lucide icons.**\n   >\n   > Unmapped icons:\n   > - {figmaName} — no Lucide match (custom SVG path saved)\n   > - ...\n   >\n   > These will use inline SVG rendering during code generation.\n\n3. If `iconMap.totalCount === 0`, display a note:\n   > **No icon components were found in the icon page(s).**\n\n**6.6 Additional components validation** (if any selected page had `pageType: \"components\"`):\n\n1. Verify `additionalComponents` exists in `component-map.json`\n2. Display the list of discovered additional components:\n   > **Additional components extracted: {count}**\n   > {ComponentName1}, {ComponentName2}, ...\n3. If `additionalComponents` is empty, display a note:\n   > **No additional components found beyond the standard 7 UI components.**\n\n### Step 7: Display Summary\n\nShow extraction results:\n\n- File structure detected (page-based \u002F library-based)\n- Pages extracted by category:\n  - Website pages (with section counts per page)\n  - Layout pages (Header\u002FFooter extracted: Y\u002FN)\n  - Icon pages (mapped\u002Ftotal icons)\n  - Component pages (additional component count)\n- Number of color tokens extracted\n- Number of typography scales\n- Number of sections discovered and mapped\n- Number of UI components identified (Button, Input, etc.)\n- Content images extracted: {extracted} \u002F {total} across {sectionsWithImages} sections\n- If any images failed: list failed images by section type\n- Layout components: Header (Y\u002FN), Footer (Y\u002FN) — if extracted\n- Layout plan pre-populated: `layout-plan.json` (Y\u002FN) — if layout extracted\n- Icons: {mapped}\u002F{total} mapped to Lucide, {unmapped} custom — if icons extracted\n- Additional components: {count} discovered — if component pages extracted\n\nShow next step guidance:\n- If layout was extracted: \"Layout pre-populated from Figma. Run `\u002Fhomepage-plugin:hp-plan` to review and customize header\u002Ffooter definitions.\"\n- If layout was NOT extracted: \"Run `\u002Fhomepage-plugin:hp-plan` to define pages, sections, and layout.\"\n- If icons were extracted: \"Icon mappings saved. Section generator will use matched Lucide icons during `\u002Fhomepage-plugin:hp-gen`.\"\n- \"Run `\u002Fhomepage-plugin:hp-design-sync` again to re-sync after Figma updates.\"\n\n## Communication Language\n\nUse the `defaultLocale` from the configuration for all user-facing output:\n- `ko` → Korean\n- `en` → English\n- `vi` → Vietnamese\n","# Sync Design Tokens from Figma\n\nExtract design tokens and component definitions from a Figma file via the official Figma MCP server, saving them as local JSON files for use by `hp-gen`.\n\nSupports both **design system library files** and **page-based design files** (where each Figma page represents a website page with sections as child frames).\n\n## Instructions\n\n### Step 0: Read Configuration\n\nRead `.claude\u002Fhomepage-plugin.json`. Extract `defaultLocale` for communication language.\n\nLanguage mapping:\n- `ko` → Korean\n- `en` → English\n- `vi` → Vietnamese\n\n### Step 1: Resolve Figma File Key\n\nDetermine the Figma file key from one of these sources (in priority order):\n\n1. **Skill argument** — if `[figma-file-url]` was provided, extract the file key using regex: `figma\\.com\u002F(file|design)\u002F([a-zA-Z0-9]+)`\n2. **Configuration** — read `figmaFileKey` from `.claude\u002Fhomepage-plugin.json`\n3. **User prompt** — if neither is available, ask the user for a Figma file URL\n\nAlso extract nodeId from URL if present (query param `node-id`). This allows targeting a specific page or frame.\n\nOnce resolved, if `figmaFileKey` is not already in `.claude\u002Fhomepage-plugin.json`, update the config file to add `figmaFileKey` and `figmaFileUrl` fields.\n\n### Step 2: Verify Figma MCP Connection\n\n#### 2.1 Tool Discovery\n\nCheck that Figma MCP tools are available. Look for tools matching any of these patterns:\n- `mcp__figma__*`\n- `mcp__figma_desktop__*`\n- `mcp__Figma__*`\n\nIf no Figma MCP tools are found, display an error message with setup instructions:\n\n> **Figma MCP not connected.**\n>\n> To set up the Figma MCP server:\n> 1. Remote (recommended): Add `https:\u002F\u002Fmcp.figma.com\u002Fmcp` as an MCP server\n> 2. Or install the Figma desktop MCP plugin\n>\n> See: https:\u002F\u002Fdevelopers.figma.com\u002Fdocs\u002Ffigma-mcp-server\u002F\n\nThen exit.\n\nIdentify the exact tool name prefix (e.g., `mcp__figma__` or `mcp__figma_desktop__`) for passing to the agent.\n\n#### 2.2 Connectivity Test\n\nAfter identifying the tool prefix, perform an actual MCP call to verify the connection works:\n\nCall `{mcpToolPrefix}get_metadata` with the `fileKey` from Step 1.\n\n- **Success**: The tool returns file metadata (page names, node structure). Proceed to Step 3 using this response (avoids a redundant call).\n- **Failure \u002F Error \u002F Timeout**: Display an error:\n\n> **Figma MCP connection failed.**\n>\n> Tools with prefix `{mcpToolPrefix}` were found but the connection test failed.\n> Error: {error message}\n>\n> Possible causes:\n> 1. The MCP server is not running or unreachable\n> 2. The Figma file key is invalid: `{fileKey}`\n> 3. You don't have access to this Figma file\n> 4. The MCP server needs re-authentication\n>\n> Try restarting the MCP server or re-adding it.\n\nThen exit. **Do NOT proceed to the agent if the connectivity test fails.**\n\n### Step 3: Discover File Structure and Classify Pages\n\nUse the `get_metadata` response from Step 2.2 (do not call again — reuse the connectivity test result).\n\n#### 3.1 Determine File Structure\n\nAnalyze the result to determine the file structure:\n\n- **Page-based**: The file contains pages with names like \"Home\", \"About\", \"Services\", etc. Each page has child frames representing sections (hero, features, etc.). This is the common case for website design files.\n- **Library-based**: The file contains pages with names like \"Components\", \"Styles\", \"Tokens\", \"Primitives\". This is a design system library.\n\n#### 3.2 Classify Pages\n\nFor page-based files, classify each page into one of four categories using name pattern matching:\n\n| Category | Name Patterns (case-insensitive) | Purpose |\n|---|---|---|\n| `website` | \"Home\", \"About\", \"Services\", \"Pricing\", \"Contact\", \"Blog\", \"FAQ\", \"Landing\", \"Portfolio\" and other website page names | Website pages with sections |\n| `layout` | \"Layout\", \"Shared\", \"Common\", \"Global\", \"Navigation\" | Header\u002FFooter\u002FNav definitions |\n| `icons` | \"Icons\", \"Iconography\", \"Icon Set\", \"Icon Library\" | Icon component library |\n| `components` | \"Components\", \"Design System\", \"Library\", \"UI Kit\", \"Atoms\", \"Molecules\" | Additional UI components |\n\nPages that do not match any non-website pattern default to `website`.\n\n**Viewport detection**: For website pages, detect if multiple viewport variants exist. Common patterns:\n- Same page name with viewport suffix: \"Home - Desktop\", \"Home - Mobile\", \"Home - Tablet\"\n- Same page name with size suffix: \"Home 1440\", \"Home 375\", \"Home 768\"\n- Separate pages named \"Mobile\", \"Tablet\", \"Responsive\"\n- Frames within a page with different widths (check via `get_metadata` child frame dimensions)\n\nIf multiple viewports are detected, group them by page and record the viewport info in `selectedPages`:\n```json\n{ \"name\": \"Home\", \"nodeId\": \"0:1\", \"pageType\": \"website\", \"viewport\": \"desktop\", \"viewportWidth\": 1440 }\n{ \"name\": \"Home - Mobile\", \"nodeId\": \"0:4\", \"pageType\": \"website-mobile\", \"viewport\": \"mobile\", \"viewportWidth\": 375, \"desktopPageName\": \"Home\" }\n```\n\nIf no mobile\u002Ftablet variants are found, this is normal — the section generator will apply responsive breakpoint inference rules.\n\nFor library-based files, all pages default to `components` category.\n\n#### 3.3 User Confirmation\n\nDisplay the classified pages with their detected categories to the user:\n\n```\nDetected pages:\n  [website]     Home (5 sections)\n  [website]     About (3 sections)\n  [layout]      Layout (Header, Footer)\n  [icons]       Icons (24 components)\n  [components]  Components (Card, Badge, Avatar, ...)\n```\n\nAsk:\n\n> \"Which pages should we extract? You can also change page categories if the auto-detection is wrong. (Enter page names or 'all')\"\n\nThe user can:\n- Select which pages to extract\n- Override a page's category (e.g., reclassify a page auto-detected as `components` to `website`)\n\nIf a `nodeId` was extracted from the URL in Step 1, pre-select the corresponding page.\n\n### Step 4: Check Existing Design System\n\nRead `docs\u002Fdesign-system\u002Fdesign-tokens.json` if it exists.\n\n- If it exists, show the last sync time (`extractedAt` field) and ask: **\"Update existing tokens or replace entirely?\"**\n  - **Update** — agent merges new values with existing ones\n  - **Replace** — agent overwrites completely\n- If it does not exist, proceed with fresh extraction.\n\n### Step 5: Launch Design Token Extractor Agent\n\nLaunch the `design-token-extractor` agent (`subagent_type: \"homepage-plugin:design-token-extractor\"`) with the following parameters:\n\n- `fileKey` — the Figma file key from Step 1\n- `mcpToolPrefix` — the MCP tool name prefix identified in Step 2\n- `selectedPages` — list of `{ name, nodeId, pageType }` objects selected by the user in Step 3. `pageType` is one of `\"website\"`, `\"website-mobile\"`, `\"website-tablet\"`, `\"layout\"`, `\"icons\"`, `\"components\"`\n- `fileStructure` — `\"page-based\"` or `\"library-based\"` (from Step 3)\n- `projectRoot` — current working directory\n- `outputDir` — `docs\u002Fdesign-system\u002F`\n- `mode` — `\"update\"` or `\"replace\"` (from Step 4, default `\"replace\"` for fresh extraction)\n- `figmaAccessToken` — (optional) read from `.claude\u002Fhomepage-plugin.json`. If present, enables REST API image export fallback. If absent, omit this parameter.\n\n### Step 6: Validate Output\n\nAfter the agent completes, first check for extraction failure:\n\n**6.0 Check for total failure:**\n- If `docs\u002Fdesign-system\u002Fextraction-error.json` exists, read it and display the error:\n  > **Design token extraction failed.**\n  > {error message from the file}\n  >\n  > No design tokens were extracted. Check your Figma MCP connection and try again.\n  Then exit without proceeding to Step 7.\n\n**6.1 Structural validation** — verify the output files exist and are well-formed:\n\n1. **`docs\u002Fdesign-system\u002Fdesign-tokens.json`** must exist and contain:\n   - `$schema` field equal to `\"design-tokens-v1\"`\n   - `colors` object with at least `primary`, `background`, `foreground`\n   - `cssVariables` object with `:root` containing at least 10 CSS variable entries\n   - `typography` object with `fontFamily`\n   - `extractionStats` object\n\n2. **`docs\u002Fdesign-system\u002Fcomponent-map.json`** must exist and contain:\n   - `$schema` field equal to `\"component-map-v1\"`\n   - `pages` object with at least one page entry (for page-based files) OR `globalComponents` object (for library-based files)\n   - `extractionStats` object\n\nIf structural validation fails, report which fields are missing and suggest re-running.\n\n**6.2 Extraction coverage validation** — verify that meaningful data was extracted from Figma:\n\nRead `extractionStats.overallCoverage` from `design-tokens.json`.\n\n- **Coverage >= 0.5** (50%+) → proceed normally\n- **Coverage \u003C 0.5 but > 0** → display a warning:\n  > **Low extraction coverage ({coverage*100}%).**\n  > Most design tokens are using default values, not values from your Figma file.\n  > This may indicate that the Figma file has non-standard variable naming,\n  > or that some MCP tool calls failed during extraction.\n  >\n  > You can:\n  > 1. Proceed with the current tokens (defaults will be used for missing values)\n  > 2. Re-run `\u002Fhomepage-plugin:hp-design-sync` to retry extraction\n  >\n  Ask the user whether to proceed or retry.\n- **Coverage == 0** → display an error:\n  > **No tokens were extracted from Figma.**\n  > All values in the output are defaults. This likely means the Figma MCP\n  > connection failed silently during extraction.\n  >\n  > Please verify your Figma MCP connection and re-run `\u002Fhomepage-plugin:hp-design-sync`.\n  Then exit.\n\n**6.3 Content image validation** (page-based files only):\n\nRead `component-map.json` and check sections that have `contentImages`:\n\n1. For each section with `contentImages.status !== \"none\"`:\n   - Verify that files referenced in `contentImages.images[].path` actually exist at `{projectRoot}\u002Fsrc\u002Fassets\u002F{path}`\n   - Count total extracted vs failed\n\n2. If any images have `extracted: false`, collect all `manualExport` entries and display a single actionable guide:\n\n   > **The following images need to be exported manually from Figma:**\n   >\n   > | # | Figma Layer | Section | Save To |\n   > |---|---|---|---|\n   > | 1 | {manualExport.figmaNodeName} | {sectionType} | `{manualExport.saveTo}` |\n   > | 2 | ... | ... | ... |\n   >\n   > **Export steps:**\n   > 1. Open the Figma file\n   > 2. Select the layer listed above\n   > 3. In the right panel, click \"Export\" → Format: **PNG**, Scale: **2x**\n   > 4. Save to the path shown in \"Save To\" (relative to project root)\n   >\n   > After placing the files, proceed with `\u002Fhomepage-plugin:hp-plan`. Missing images will use placeholder values during code generation — optional image props will be omitted, required ones will get a TODO comment.\n\n3. If `contentImages.extractionSummary` shows `total: 0` across all sections but image-bearing section types exist (HeroSection, TeamSection, etc.), display a note:\n\n   > **No content images were found in the Figma sections.**\n   >\n   > This is common when logos or illustrations are drawn as **vector shapes** rather than placed as image files. Figma MCP cannot export vector-only nodes as files.\n   >\n   > You can add images after running `\u002Fhomepage-plugin:hp-plan` by exporting from Figma (Select layer → right panel \"Export\" → PNG @2x) and placing them in `src\u002Fassets\u002Fimages\u002F{pageName}\u002F{sectionType}\u002F`.\n\n**6.4 Layout validation** (if any selected page had `pageType: \"layout\"`, or `component-map.json` contains `sharedComponents`):\n\n1. If `component-map.json` has `sharedComponents.Header` or `sharedComponents.Footer`:\n   - Verify `docs\u002Fpages\u002F_shared\u002Flayout-plan.json` exists\n   - Verify screenshot files referenced in `sharedComponents[].screenshotRef` exist under `docs\u002Fdesign-system\u002F`\n2. If layout pages were selected but `sharedComponents` is empty or missing, display a warning:\n   > **No layout components were detected in the layout page(s).**\n   >\n   > The page was classified as a layout page but no Header or Footer frames were found.\n   > You can define the layout manually during `\u002Fhomepage-plugin:hp-plan`.\n\n**6.5 Icon map validation** (if any selected page had `pageType: \"icons\"`):\n\n1. Verify `iconMap` exists in `component-map.json`\n2. If `iconMap.unmappedCount > 0`, display a warning:\n   > **{unmappedCount} icon(s) could not be mapped to Lucide icons.**\n   >\n   > Unmapped icons:\n   > - {figmaName} — no Lucide match (custom SVG path saved)\n   > - ...\n   >\n   > These will use inline SVG rendering during code generation.\n\n3. If `iconMap.totalCount === 0`, display a note:\n   > **No icon components were found in the icon page(s).**\n\n**6.6 Additional components validation** (if any selected page had `pageType: \"components\"`):\n\n1. Verify `additionalComponents` exists in `component-map.json`\n2. Display the list of discovered additional components:\n   > **Additional components extracted: {count}**\n   > {ComponentName1}, {ComponentName2}, ...\n3. If `additionalComponents` is empty, display a note:\n   > **No additional components found beyond the standard 7 UI components.**\n\n### Step 7: Display Summary\n\nShow extraction results:\n\n- File structure detected (page-based \u002F library-based)\n- Pages extracted by category:\n  - Website pages (with section counts per page)\n  - Layout pages (Header\u002FFooter extracted: Y\u002FN)\n  - Icon pages (mapped\u002Ftotal icons)\n  - Component pages (additional component count)\n- Number of color tokens extracted\n- Number of typography scales\n- Number of sections discovered and mapped\n- Number of UI components identified (Button, Input, etc.)\n- Content images extracted: {extracted} \u002F {total} across {sectionsWithImages} sections\n- If any images failed: list failed images by section type\n- Layout components: Header (Y\u002FN), Footer (Y\u002FN) — if extracted\n- Layout plan pre-populated: `layout-plan.json` (Y\u002FN) — if layout extracted\n- Icons: {mapped}\u002F{total} mapped to Lucide, {unmapped} custom — if icons extracted\n- Additional components: {count} discovered — if component pages extracted\n\nShow next step guidance:\n- If layout was extracted: \"Layout pre-populated from Figma. Run `\u002Fhomepage-plugin:hp-plan` to review and customize header\u002Ffooter definitions.\"\n- If layout was NOT extracted: \"Run `\u002Fhomepage-plugin:hp-plan` to define pages, sections, and layout.\"\n- If icons were extracted: \"Icon mappings saved. Section generator will use matched Lucide icons during `\u002Fhomepage-plugin:hp-gen`.\"\n- \"Run `\u002Fhomepage-plugin:hp-design-sync` again to re-sync after Figma updates.\"\n\n## Communication Language\n\nUse the `defaultLocale` from the configuration for all user-facing output:\n- `ko` → Korean\n- `en` → English\n- `vi` → Vietnamese\n",{"name":5,"description":7,"allowed-tools":56,"argument-hint":57,"user-invocable":58},"Read, Write, Edit, Glob, Grep, Bash, Agent","[figma-file-url]",true,"main","eaef2a5b6092b72972ff2f25ef79803753bc9bbf","homepage-plugin\u002Fskills\u002Fhp-design-sync",0,"https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins","https:\u002F\u002Fgithub.com\u002Fohmyhotelco","2026-11-13 16:34:32",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":58},[68,71,74],{"tool":69,"command":70},"npx","npx skills add ohmyhotelco\u002Fhare-cc-plugins --skill hp-design-sync",{"tool":72,"command":73},"bunx","bunx skills add ohmyhotelco\u002Fhare-cc-plugins --skill hp-design-sync",{"tool":75,"command":76},"pnpm","pnpm dlx skills add ohmyhotelco\u002Fhare-cc-plugins --skill hp-design-sync","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fhomepage-plugin\u002Fskills\u002Fhp-design-sync\u002FSKILL.md",[],[80,104,124,146,163,181],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":51},"01M6M5QVXQNQMJBP1JZP9T440T","hp-shared","Shared conventions for every homepage-plugin agent and skill — stack, code conventions, state-file writes, check commands and how to report them. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fhomepage-plugin\u002Fskills\u002Fhp-shared\u002FSKILL.md",[],[87,88,89,90,91,92,93,94,95,96,97,98,99,100,47,101,102,103],"shared","hp shared","state","stack","plugin","how","for","report","code conventions","commands","how to","conventions","false","frontmatter","code","hand","check",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":114,"publishedAt":51},"01M6M5PZTN1M0G4AHJV08VF1HV","fe-shared","Shared conventions for every frontend-react-plugin agent and skill — code conventions, state files and locks, accepted deviations, design principles, build working directory, router-mode command matrix, TypeScript check. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Ffrontend-react-plugin\u002Fskills\u002Ffe-shared\u002FSKILL.md",[110,113],{"categoryNo":111,"categoryName":112,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[87,115,93,116,95,117,34,118,40,99,101,102,119,103,120,89,91,121,122,123],"fe shared","mode","frontend","design principles","react","router","principles","command","build",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":134,"publishedAt":51},"01M6M5GAW7ZZ3580DVCMH51SFQ","be-spring-shared","Shared conventions for every backend-springboot-plugin agent and skill — tech stack, CQRS architecture, naming, coding standards, TDD, commit and build rules, state files. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fbackend-springboot-plugin\u002Fskills\u002Fbe-spring-shared\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},[87,135,136,40,99,137,138,102,90,139,100,140,141,142,93,143,144,89,91,145],"spring","be spring shared","commit","architecture","coding standards","coding","standards","tech","Rules","cqrs","naming",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":51},"01M6FNV58QMW8K71SA9FGTXMF4","pp-translate","Use after directly editing the working language spec to sync changes to other supported languages.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-translate\u002FSKILL.md",[],[153,154,155,156,157,158,43,159,35,42,31,160,47,161,36,162],"pp","pp translate","translate","feature","name","editing","spec","use","language","changes",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":170,"publishedAt":51},"01M6FNV0PGRKR2MW0AEPS6XP0Q","pp-sync-stitch","Use when wireframes were manually edited on the Stitch website and need to be re-fetched to the local project.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-sync-stitch\u002FSKILL.md",[169],{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},[171,153,172,31,173,174,156,175,176,39,50,160,46,177,178,179,180,157,43,36],"pp sync stitch","stitch","projects","get","project","re","id","wireframes","website","screen",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":188,"publishedAt":51},"01M6FNTWW2KHS9XRAR72X33G0B","pp-sync-notion","Use when a specification needs to be published or re-synced to Notion after finalization or manual edits.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-sync-notion\u002FSKILL.md",[187],{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},[153,189,31,190,156,176,191,192,50,160,193,157,43,35,42,44,36],"notion","pp sync notion","search","manual","specification"]