cds-docs

作者: coinbase

目標:將 CDS 文檔引入當前對話,使後續的編輯、建議及 API 使用皆基於最新文檔——而非為用戶生成文檔講義。

npx skills add https://github.com/coinbase/cds --skill cds-docs

CDS Documentation Skill

Goal: Pull CDS documentation into the session so your next edits, recommendations, and API usage are grounded in current docs—not to produce a documentation handout for the user.

Treat fetched pages as source material you have read: internalize props, patterns, imports, and setup constraints, then act (code, refactors, answers) from that understanding. Quote or summarize for the user only when it helps. Keep the actual doc page contents to yourself and only share their contents directly to the user if they ask.

Whether you use the CDS MCP server or fetch the pages yourself with curl is an implementation detail. The use does not need to know your methodology unless they indicated they are debugging this skill.

Ambiguous product requests (e.g. “turn this into tabs,” “make it a card”) after you’ve read the index: if several CDS components could be relevant (e.g. underline Tabs vs pill SegmentedTabs vs TabNavigation), it is acceptable and often better to ask one short, concrete question (e.g. which visual pattern matches their spec) while briefly naming the options and how they differ per the docs. Do not pick one arbitrarily just to avoid asking.

1. Choose platform

Decide whether the work targets web (React, @coinbase/cds-web) or mobile (React Native, @coinbase/cds-mobile). If unclear, infer from the repo (e.g. package.json dependencies, apps/* layout) or ask a single clarifying question.

Pass web or mobile to list-cds-routes and when building curl URLs.

2. Tool order (try in sequence)

  1. CDS MCP server (packaged mcp-docs in @coinbase/cds-mcp-server / packages/mcp-server):

    • list-cds-routes with platform: "web" | "mobile".
    • get-cds-doc with route: path including the platform, ending in .txt (e.g. web/getting-started/installation.txt). Paths must come from the index.
  2. curl if MCP is not configured, fails, or returns errors:

    • Index: https://cds.coinbase.com/llms/web/routes.txt or https://cds.coinbase.com/llms/mobile/routes.txt
    • Page: https://cds.coinbase.com/llms/<route> where <route> matches the index (e.g. web/getting-started/theming.txt).

    Use curl -fsSL '<url>'. Prefer targeted fetches (the pages you need for this task) over loading everything; the index is for routing, not for echoing back wholesale.

3. Workflow whenever this skill applies

  1. Resolve platform (web or mobile).
  2. Load the index once per platform focus (list-cds-routes or routes.txt) and use it as the canonical map of .txt paths.
  3. Fetch additional pages only as needed for the work ahead; after each fetch, apply what you learned (imports, props, patterns)—do not stop at regurgitating the file.

4. Practical notes

  • Routes are case-sensitive; doc content is .txt from MCP or HTTP.
  • Web and mobile docs differ; confirm the component or topic exists for that platform’s index.
  • Human-readable URLs inside the .txt files are optional to share with the user; your priority is correct implementation, not reproducing the doc site in the reply.

5. What “done” looks like

  • Platform is correct or explicitly chosen.
  • Index informed which pages you pulled.
  • User-facing output is implementation-focused (components, imports, structure); retrieval steps stay implicit unless the user needs them.
  • If multiple components fit, you either ground the choice in doc differences or ask one clarifying question when the product spec is under-specified.
  • Your actions and explanations reflect fetched CDS details (APIs, setup, tokens)—especially where memory would be risky—not a dump of documentation for its own sake.

來自 coinbase 的更多技能

authenticate-wallet
coinbase
基於電子郵件OTP的錢包驗證,包含驗證與狀態檢查。兩步驟登入流程:先透過電子郵件發起請求以接收6位數OTP,再使用flowId與驗證碼完成驗證。內建電子郵件、flowId及OTP的輸入驗證規則,防止在執行指令前發生Shell注入。提供狀態檢查、餘額查詢、地址擷取及透過配套CLI指令存取錢包視窗等功能。所有指令皆支援--json輸出,以利機器讀取...
official
fund
coinbase
透過 Coinbase Onramp 或直接轉帳將 USDC 存入錢包。開啟輔助介面,用戶可選擇預設金額(10 美元、20 美元、50 美元)或自訂數值,並從 Apple Pay、簽帳卡、銀行轉帳或 Coinbase 帳戶資金中選擇付款方式。支援多種付款方式,結算時間各異:卡片與 Apple Pay 即時到帳,ACH 銀行轉帳需 1–3 天。資金以 Base 網路上的 USDC 存入;用戶亦可透過 npx [email protected]... 直接將 USDC 發送至錢包地址。
official
monetize-service
coinbase
部署一個付費API端點,其他代理可透過x402協議發現並付費使用。基於HTTP 402支付協議,在Base鏈上按請求收取USDC;客戶端使用簽名交易支付,無需API金鑰或帳戶。當您聲明發現擴展時,自動將端點註冊至x402 Bazaar供代理發現。支援多種定價層級、萬用路由,以及透過Express中介軟體為每個端點設定多種支付選項。基於@x402/express和@x402/core建置...
official
pay-for-service
coinbase
在Base上透過x402協議自動以USDC支付來呼叫付費API。執行HTTP請求(GET、POST等)至支援x402的端點,自動處理原子化USDC支付。支援透過方法、JSON主體、查詢參數及自訂標頭進行請求自訂。包含支付控制:設定每次請求的最大USDC金額,並使用關聯ID分組相關操作。需要錢包驗證及足夠的USDC餘額;驗證所有使用者輸入以防止shell...
official
query-blockchain-data
coinbase
透過 CDP SQL API 與 x402 查詢 Base 上的鏈上區塊鏈數據。當您或用戶想查看關於已解碼區塊的鏈上資訊時使用…
official
query-onchain-data
coinbase
使用SQL在Base上查詢鏈上數據,每次查詢需支付x402費用。透過CoinbaseQL(基於ClickHouse的SQL方言)存取解碼事件、交易與區塊,支援JOIN、CTE、子查詢及標準函數。主要提供三個資料表:base.events(解碼的智能合約日誌)、base.transactions(完整交易數據)及base.blocks(區塊元數據)。查詢事件時需對索引欄位(event_signature、address、block_timestamp)進行過濾,以避免掃描完整資料表...
official
search-for-service
coinbase
搜尋並探索 x402 市集上提供的付費 API 服務。透過 BM25 相關性搜尋查詢市集、列出所有可用資源,或檢查特定端點以查看定價與付款需求(無需付費)。支援按網路(base、base-sepolia)和輸出格式(人類可讀或 JSON)篩選。結果會快取在本機,每 12 小時自動重新整理;所有搜尋或探索操作均無需驗證。當無其他可用選項時,可作為備用方案使用。
official
send-usdc
coinbase
在Base上將USDC轉帳至以太坊地址或ENS名稱。接受十六進制地址(0x...)和ENS名稱(.eth)作為收款方,並自動解析ENS。支援靈活的金額格式:美元符號標記($5.00)、小數(1.50)或原子單位(1000000)。發送前需透過authenticate-wallet技能進行錢包驗證,並確保USDC餘額充足。包含輸入驗證以防止shell注入,並提供可選的JSON輸出供程式化使用。
official