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天。资金以USDC形式存入Base网络;用户也可通过npx [email protected]...直接将USDC发送至钱包地址。
official
monetize-service
coinbase
部署一个付费API端点,其他代理可通过x402协议发现并支付。基于Base网络使用HTTP 402支付协议按请求收取USDC;客户端通过签名交易支付,无需API密钥或账户。声明发现扩展后自动将端点注册到x402 Bazaar供代理发现。支持多种定价层级、通配符路由及每个端点多个支付选项,使用Express中间件实现。基于@x402/express和@x402/core构建...
official
pay-for-service
coinbase
通过x402协议在Base上调用付费API,自动完成USDC支付。执行HTTP请求(GET、POST等)到支持x402的端点,自动处理原子级USDC支付。支持通过方法、JSON体、查询参数和自定义标头定制请求。包含支付控制:设置每次请求的最大USDC金额,并通过关联ID对相关操作进行分组。需要钱包认证和足够的USDC余额;验证所有用户输入以防止shell...
official
query-blockchain-data
coinbase
通过x402使用CDP SQL API查询Base上的链上区块链数据。当你或你的用户想要查看关于已解码区块的链上信息时使用…
official
query-onchain-data
coinbase
使用SQL在Base上查询链上数据,每次查询通过x402支付。通过CoinbaseQL(基于ClickHouse的SQL方言,支持连接、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