figma.enumerate-component-urls

โดย coinbase

แจกแจงชุดคอมโพเนนต์สาธารณะทั้งหมดในไฟล์ CDS Figma และสร้างรายการ [ชื่อคอมโพเนนต์]: [URL Figma] ที่จัดกลุ่มตามส่วนของหน้า ใช้สกิลนี้…

npx skills add https://github.com/coinbase/cds --skill figma.enumerate-component-urls

Overview

Produces a [Name]: [URL] list for every public component set in a CDS Figma file, grouped by the file's page sections. Uses the Figma REST API directly (more reliable than the Figma MCP tools, which only expose the currently open page in the desktop app).

Requires $FIGMA_ACCESS_TOKEN to be set in the environment.

Default file: Unless the user provides a different Figma URL, always use the canonical CDS Components file:


Step 1 — Get all pages via the REST API

Use the file key above (or extract it from a user-provided URL — it's the segment between /design/ and the next /). Then fetch all pages at depth=1:

FILE_KEY="k5CtyJccNQUGMI5bI4lJ2g"  # override if user provided a different URL
curl -s -H "X-Figma-Token: $FIGMA_ACCESS_TOKEN" \
  "https://api.figma.com/v1/files/${FILE_KEY}?depth=1" | python3 -c "
import json, sys
data = json.load(sys.stdin)
pages = data['document']['children']
for p in pages:
    print(p['id'], '|', p['name'])
"

The output mixes two kinds of pages:

PatternMeaning
⚡️ Actions, 🔘 Inputs, …Section header — group label only, no component sets inside
↳ Button, ↳ Modal, …Component page — contains the actual component set(s)

Collect only the component page IDs (those with the prefix) for Step 2. Ignore section header pages, cover pages, staging pages, and deprecated sections (usually marked ⛔️ Deprecated).


Step 2 — Batch-query pages for component sets

Query the /nodes endpoint at depth=2 to discover COMPONENT_SET children within each page. Batch many page IDs into one request to stay efficient:

# IDs are colon-separated (e.g. 60:512), URL-encode : → %3A and , → %2C
IDS="60%3A512%2C0%3A1%2C52733%3A3517"
curl -s -H "X-Figma-Token: $FIGMA_ACCESS_TOKEN" \
  "https://api.figma.com/v1/files/${FILE_KEY}/nodes?ids=${IDS}&depth=2" | python3 -c "
import json, sys
data = json.load(sys.stdin)
for nid, node in sorted(data['nodes'].items()):
    if node is None:
        continue
    page = node['document']
    sets = [c for c in page.get('children', []) if c['type'] == 'COMPONENT_SET']
    print(f'=== {page[\"name\"]} (id: {nid}) ===')
    for s in sets:
        print(f'  [SET] {s[\"id\"]} | {s[\"name\"]}')
    if not sets:
        # No sets at top level — print child types to diagnose
        for c in page.get('children', [])[:5]:
            print(f'  [{c[\"type\"]}] {c[\"id\"]} | {c[\"name\"]}')
"

Edge case: pages that use SECTION containers

Some pages nest their component sets inside Figma SECTION nodes rather than placing them directly as page children. When depth=2 returns only SECTION entries and no COMPONENT_SET entries, re-query those section IDs at depth=2 to find the component sets inside them.

The CDS Tray page is a known example — its Tray component set lives inside a section called "Tray component".


Step 3 — Exclude internal helper sets

Component sets whose names start with . are private design helpers used internally by other components. They are not public consumer APIs and should be excluded from the output.

Known examples in the CDS file:

  • Carousel: .count, .carouselPagination
  • Select: .Input Chip, .Dropdown Menu, .Checkbox, .Tray/Multi Select, .Desktop Input Chips, .CheckboxGroup
  • Modal: .Header
  • SegmentedTabs: .tabs
  • TabbedChips: .Tab Chip
  • BottomTabBar: .Tab Bar Icon
  • Tray: .ListCells-Mobile, .ListCells-Desktop, .TabbedChipps-Mobile, .TabbedChipps-Desktop, .Drag handle

The rule is simple: if name.startswith('.'), skip it.


Step 4 — Format the output URLs

Figma node IDs use : internally (60:512) but URLs use - (node-id=60-512).

Always link to the component node — never the page node.

Every entry must point to the actual component, whether it's a COMPONENT_SET (has variants) or a bare COMPONENT (no variants). Both are valid link targets. The only thing that's wrong is using a CANVAS (page) node ID — that lands on the whole page rather than the component.

SituationUse in URLName entry
Page has 1 public component (set or standalone)That component's node IDThe page name (stripped of and emoji)
Page has 2+ public componentsEach component's node IDThe component/set name

If you're unsure of a node's type, check via the REST API — type will be COMPONENT_SET, COMPONENT, or CANVAS. Skip CANVAS IDs.

URL template:

https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id={component-set-id-with-dashes}

Output format

Group entries under the section headers from the file (Layout, Actions, Inputs, etc.) using markdown ## headings. Within each section, list components in the order they appear in the file:

## ⚡️ Actions

**Button**: https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=0-1
**ButtonGroup**: https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=52733-3517
**IconButton**: https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=57214-1766

For multi-set pages, each set gets its own line. If a set name contains emoji decorators (like 🔮 Card carousel), keep them — they convey meaning (e.g., 🔮 = experimental in CDS).


Tips

  • Batch aggressively: The /nodes endpoint accepts many IDs at once. Prefer fewer large requests over many small ones to stay within rate limits.
  • Check for WIP pages: Pages prefixed with 🚧 are works in progress. Include them but note the WIP status in the output.
  • Section order matters: Preserve the top-to-bottom page order from Step 1 when grouping under section headers — it matches the Figma file's navigation structure, which is what consumers expect.

Skills เพิ่มเติมจาก coinbase

git.repo-manager
coinbase
git.repo-manager — ทักษะที่สามารถติดตั้งได้สำหรับเอเจนต์ AI เผยแพร่โดย coinbase/cds
official
agentic-wallet
coinbase
ดำเนินการกระเป๋าเงินคริปโตผ่าน CLI awal — ลงชื่อเข้าใช้ ตรวจสอบยอดเงิน ส่ง USDC/ETH/POL/SOL ซื้อขายโทเค็น เติมเงินในกระเป๋า และใช้โปรโตคอลการชำระเงิน x402 เพื่อ...
official
authenticate-wallet
coinbase
การยืนยันตัวตนกระเป๋าเงินผ่าน OTP ทางอีเมล พร้อมการตรวจสอบความถูกต้องและสถานะ ขั้นตอนการเข้าสู่ระบบสองขั้นตอน: เริ่มต้นด้วยอีเมลเพื่อรับ OTP 6 หลัก จากนั้นยืนยันด้วย flowId และรหัสเพื่อดำเนินการยืนยันตัวตนให้สมบูรณ์ รวมถึงกฎการตรวจสอบข้อมูลนำเข้าสำหรับอีเมล flowId และ OTP เพื่อป้องกันการแทรกคำสั่งเชลล์ก่อนดำเนินการคำสั่ง ให้การตรวจสอบสถานะ การสอบถามยอดคงเหลือ การดึงที่อยู่ และการเข้าถึงหน้าต่างกระเป๋าเงินผ่านคำสั่ง CLI ที่เกี่ยวข้อง คำสั่งทั้งหมดรองรับเอาต์พุต --json สำหรับการอ่านโดยเครื่อง...
official
fund
coinbase
ฝาก USDC เข้ากระเป๋าเงินผ่าน Coinbase Onramp หรือโอนโดยตรง เปิด UI คู่หูที่ให้ผู้ใช้เลือกจำนวนเงินที่กำหนดไว้ ($10, $20, $50) หรือกำหนดเอง และเลือกจาก Apple Pay, บัตรเดบิต, โอนผ่านธนาคาร หรือการเติมเงินจากบัญชี Coinbase รองรับวิธีการชำระเงินหลายวิธีโดยมีระยะเวลาการชำระที่แตกต่างกัน: ทันทีสำหรับบัตรและ Apple Pay, 1–3 วันสำหรับการโอนผ่านธนาคารแบบ ACH ฝากเงินเป็น USDC บนเครือข่าย Base; หรือผู้ใช้สามารถส่ง USDC ไปยังที่อยู่กระเป๋าเงินโดยตรงผ่าน npx awal@2.0.3...
official
monetize-service
coinbase
ปรับใช้ปลายทาง API แบบชำระเงินที่เอเจนต์อื่นสามารถค้นพบและชำระเงินผ่านโปรโตคอล x402 คิดค่าบริการเป็น USDC ต่อคำขอบน Base โดยใช้โปรโตคอลการชำระเงิน HTTP 402; ลูกค้าชำระเงินด้วยธุรกรรมที่ลงนามแล้ว ไม่ต้องใช้คีย์ API หรือบัญชีใดๆ ลงทะเบียนปลายทางกับ x402 Bazaar โดยอัตโนมัติเพื่อให้เอเจนต์ค้นพบเมื่อคุณประกาศส่วนขยายการค้นพบ รองรับระดับราคาหลายระดับ เส้นทางแบบ Wildcard และตัวเลือกการชำระเงินหลายแบบต่อปลายทางโดยใช้ Express Middleware สร้างบน @x402/express และ @x402/core...
official
pay-for-service
coinbase
เรียกใช้ API แบบชำระเงินบน Base ด้วยการชำระเงิน USDC อัตโนมัติผ่านโปรโตคอล x402 ดำเนินการร้องขอ HTTP (GET, POST ฯลฯ) ไปยังเอนด์พอยต์ที่รองรับ x402 โดยจัดการชำระเงิน USDC แบบอะตอมิกโดยอัตโนมัติ รองรับการปรับแต่งคำขอผ่านเมธอด, เนื้อหา JSON, พารามิเตอร์คิวรี, และส่วนหัวที่กำหนดเอง รวมถึงการควบคุมการชำระเงิน: กำหนดจำนวน USDC สูงสุดต่อคำขอ และจัดกลุ่มการดำเนินการที่เกี่ยวข้องด้วยรหัส correlation ต้องมีการยืนยันตัวตนของกระเป๋าเงินและยอดคงเหลือ USDC ที่เพียงพอ ตรวจสอบอินพุตของผู้ใช้ทั้งหมดเพื่อป้องกันเชลล์...
official
query-blockchain-data
coinbase
สอบถามข้อมูลบล็อกเชนออนเชนบน Base โดยใช้ CDP SQL API ผ่าน x402 ใช้เมื่อคุณหรือผู้ใช้ของคุณต้องการดูข้อมูลออนเชนเกี่ยวกับบล็อกที่ถอดรหัสแล้ว…
official
query-onchain-data
coinbase
สอบถามข้อมูลออนเชนบน Base โดยใช้ SQL พร้อมการชำระเงินแบบ x402 ต่อคำสั่งค้นหา เข้าถึงอีเวนต์ ธุรกรรม และบล็อกที่ถอดรหัสแล้วผ่าน CoinbaseQL ซึ่งเป็นภาษา SQL ที่ใช้ ClickHouse รองรับการ join, CTE, subquery และฟังก์ชันมาตรฐาน มีตารางหลักสามตาราง: base.events (บันทึกสัญญาอัจฉริยะที่ถอดรหัสแล้ว), base.transactions (ข้อมูลธุรกรรมทั้งหมด), และ base.blocks (ข้อมูลเมตาของบล็อก) จำเป็นต้องกรองฟิลด์ที่จัดทำดัชนี (event_signature, address, block_timestamp) ในการค้นหาอีเวนต์เพื่อหลีกเลี่ยงการสแกนทั้งตาราง...
official