skills/figma-spec-build/SKILL.md
Extract spec text from Figma frame "Description" side panels via the installed Figma MCP, propose codebase component mappings for each spec row, and produce structured spec files with component mappings. Use when the user provides one or more Figma frame URLs containing a "Description" panel and asks to turn them into an implementation plan (e.g. "Figma Description으로 구현해줘", "이 기획서 링크들 스펙 뽑아서 작업해줘", "$figma-spec-build", "figma-spec-build"). Do not use for pure design-to-code translation (that is figma:figma-implement-design) or for writing back to Figma.
npx skillsauth add gihwan-dev/claude-setup figma-spec-buildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turn Figma "Description" side panels into machine-readable spec files and map each numbered section to candidate codebase components. The user decides how to proceed with the output (create issues, feed to Codex, etc.).
figma.com/design/... URLs AND mentions extracting
specs, "Description", "스펙", "설명 영역", or asks to build from them.$figma-spec-build or figma-spec-build verbatim.figma:figma-implement-design.figma:figma-generate-design +
figma:figma-use.mcp__plugin_figma_figma__* tools are unavailable (Figma MCP not installed)
→ stop and report.figma.com/board/... (FigJam) → not supported.스킬 시작 시 아래 입력 조건을 검증한다. 하나라도 불충분하면 즉시 사용자에게 부족한 항목을 안내하고 보완을 요청한다.
| 조건 | 검증 방법 | 실패 시 |
|------|----------|---------|
| Figma URL이 최소 1개 | URL 파싱으로 figma.com/design/ 패턴 확인 | "figma.com/design/ 형식의 URL을 하나 이상 제공해 주세요" |
| URL에 node-id 파라미터 존재 | URL 쿼리스트링 파싱 | "URL에 node-id 파라미터가 없습니다. Figma에서 프레임을 선택한 상태의 URL을 복사해 주세요" |
| Figma MCP 도구 사용 가능 | get_metadata 호출 시도 | "Figma MCP가 연결되지 않았습니다. 설정을 확인해 주세요" |
| 대상 프레임에 "Description" 자식 노드 존재 | Phase 1의 find_description_nodes.py 결과 | "이 프레임에 Description 패널이 없습니다. URL을 확인해 주세요" |
get_metadata, get_design_context,
get_screenshot are allowed. Never call use_figma from this skill.get_design_context produces 100KB+ output; per-Description
calls are ~8KB. Whole-frame get_metadata is fine (only ID/name/position).tasks/<slug>/specs/*.md), never raw XML/JSX.x=1920 is the fallback hint.Phase 0: Bootstrap — verify MCP, collect URLs, create slug
Phase 1: Extract — per URL: find Description nodes, get JSX+screenshot, convert to markdown
Phase 2: Map — per section: suggest candidates via grep, user confirms
Phase 3: Brief — synthesize tasks/<slug>/BRIEF.md from specs + mappings
Phase 4: Handoff — present artifacts and suggest next steps
Each phase ends with a checkpoint. User replies with one of:
[1] Approve and continue [2] Modify [3] Add context [4] Stop here.
get_metadata on first
URL, or check mcp__plugin_figma_figma__* is in the available tools list).tasks/<slug>/
figma/urls.txt
figma/raw/ (get_metadata XML, get_design_context JSX dumps)
figma/screenshots/ (frame PNGs)
specs/ (clean markdown)
Checkpoint: "Found N URLs. Slug is <slug>. Proceed with extraction?"
For each URL in tasks/<slug>/figma/urls.txt, sequentially:
Parse URL:
python3 ${SKILL_DIR}/scripts/parse_url.py "<url>"
스크립트가 없으면 URL에서 직접 fileKey와 nodeId를 정규식으로 추출한다:
fileKey = URL path의 /design/ 다음 세그먼트, nodeId = node-id 쿼리 파라미터.
Fetch metadata (lightweight XML, text content NOT included):
mcp__plugin_figma_figma__get_metadata(fileKey, nodeId)
Save raw output to tasks/<slug>/figma/raw/metadata_<nodeId>.xml.
Find Description nodes:
python3 ${SKILL_DIR}/scripts/find_description_nodes.py \
--metadata tasks/<slug>/figma/raw/metadata_<nodeId>.xml
스크립트가 없으면 metadata에서 name이 "Description"인 노드를 직접 grep으로 찾는다.
Returns JSON: [{node_id, parent_node_id, parent_name, x, y, ...}].
For each Description node:
get_design_context(fileKey, <desc_node_id>, excludeScreenshot=true)
and save JSX to tasks/<slug>/figma/raw/dc_<desc_node_id>.jsx.python3 ${SKILL_DIR}/scripts/jsx_to_spec.py \
tasks/<slug>/figma/raw/dc_<desc_node_id>.jsx \
> tasks/<slug>/specs/<parent_node_id>__<desc_node_id>.md
스크립트가 없으면 JSX 텍스트 노드의 내용을 추출하여 마크다운 섹션으로 직접 정리한다.Capture screenshot of the PARENT frame (not Description):
mcp__plugin_figma_figma__get_screenshot(fileKey, <parent_node_id>)
Save to tasks/<slug>/figma/screenshots/<parent_node_id>.png.
Output: specs/*.md (clean markdown), screenshots/*.png.
Checkpoint: list frames + section counts + spec paths. Ask to proceed to mapping.
For each spec file under tasks/<slug>/specs/:
Determine target repo path. Default: current working directory. Ask user if ambiguous (monorepo, frontend subdir, etc).
Run mapping suggester:
python3 ${SKILL_DIR}/scripts/suggest_mappings.py \
--spec tasks/<slug>/specs/<file>.md \
--repo <repo_path> \
--top-n 5
스크립트가 없으면 spec 파일의 키워드를 추출하고 grep -rl로 코드베이스에서 관련 파일을 직접 검색한다.
For each section with candidates, present via AskUserQuestion:
<path> (score X.XX, <reason>)[new component: <suggested name>] option[skip this section] optionSave to tasks/<slug>/mappings.json:
{
"<frame_node_id>": {
"spec_path": "specs/<id>.md",
"screenshot_path": "figma/screenshots/<id>.png",
"sections": [
{"id": "1", "title": "Date 설정 드롭다운",
"mapping": {"type": "existing", "path": "src/..."}},
{"id": "2", "title": "좌측 정보 영역",
"mapping": {"type": "new", "proposed_name": "LeftInfoPanel"}}
]
}
}
Checkpoint: summary ("N sections mapped: X existing, Y new, Z skipped"). Ask to synthesize BRIEF.
Draft tasks/<slug>/BRIEF.md with sections:
Goal / Context / Scope / Success Criteria / Phases / Decisions / Risks / References / Status / Log.
Phase decomposition rules:
# TODO: verification command stub.References section includes the Figma URLs (source of truth).
Checkpoint: present the BRIEF phase list. Ask: "N phases drafted. Approve or modify?"
tasks/<slug>/
BRIEF.md
mappings.json
specs/ (N files)
figma/screenshots/ (N images)
스킬 실행이 성공한 것으로 간주하는 조건:
tasks/<slug>/specs/ 에 최소 1개의 마크다운 spec 파일이 생성됨tasks/<slug>/mappings.json 이 존재하고, 최소 1개 섹션에 매핑이 할당됨tasks/<slug>/BRIEF.md 가 생성됨 (Phase 3까지 진행한 경우)Phase 4까지 완료되지 않더라도 사용자가 [4] Stop here로 중단한 단계까지의 산출물이 올바르게 생성되어 있으면 정상 종료이다.
| Skill | Relation |
|-------|----------|
| figma:figma-implement-design | Complementary. That skill does pixel-fidelity code-gen for whole designs. This skill extracts textual spec for structured implementation planning. |
| architect | Use before this skill to explore design trade-offs. This skill handles Figma-specific extraction; architect handles design reasoning. |
| figma:figma-use | Not used. We only read from Figma. |
Each phase writes tasks/<slug>/figma/state.json:
{"phase": "extract|map|brief|done",
"urls": [...],
"completed_frames": [...],
"pending_frames": [...]}
On re-invocation, read this file to resume from the last completed phase.
User:
$figma-spec-build
https://www.figma.com/design/0CWIMb3Apd7wAiy66OqURb/Analysis?node-id=19030-97432&m=dev
https://www.figma.com/design/0CWIMb3Apd7wAiy66OqURb/Analysis?node-id=19030-98200
Claude responses (phase by phase):
tools
GitLab 이슈 우선순위 추천. glab CLI로 할당/미할당 이슈를 수집하고 우선순위 라벨, 마감일, 가중치를 분석하여 작업할 이슈 Top 5를 추천한다. Use when the user says "이슈 추천해줘", "뭐 작업할까", "이슈 골라줘", "gitlab-issue-picker", "$pick", or wants help deciding which issue to work on. Do not use when glab is not installed or not authenticated.
tools
--- name: unknown-proposal description: Handles repeated HyperAgent instruction pattern: 반복 지시가 있었지만 스킬 없이 수행된 작업 --- # unknown-proposal Use when a session matches `반복 지시가 있었지만 스킬 없이 수행된 작업`. ## Workflow 1. Identify whether this repeated instruction pattern is present. 2. Apply the captured checklist before tool execution. 3. Report the exact evidence and stop if the pattern no longer applies. ## Evidence Sessions - faf6eee3-341c-4cb8-b4ce-fd62714b09fd - 019e0130-8884-7683-9885-cf05935e4195
tools
GitLab 이슈 우선순위 추천. glab CLI로 할당/미할당 이슈를 수집하고 우선순위 라벨, 마감일, 가중치를 분석하여 작업할 이슈 Top 5를 추천한다. Use when the user says "이슈 추천해줘", "뭐 작업할까", "이슈 골라줘", "gitlab-issue-picker", "$pick", or wants help deciding which issue to work on. Do not use when glab is not installed or not authenticated.
tools
--- name: unknown-proposal description: Handles repeated HyperAgent instruction pattern: 반복 지시가 재발한 작업 --- # unknown-proposal Use when a session matches `반복 지시가 재발한 작업`. ## Workflow 1. Identify whether this repeated instruction pattern is present. 2. Apply the captured checklist before tool execution. 3. Report the exact evidence and stop if the pattern no longer applies. ## Evidence Sessions - eebe7e0e-8348-4482-a68f-5c4b4486f11b