Produces high quality Coinbase Design System (CDS) code for React and React Native projects. Always use this skill every time you are asked to create or update UI or write React or React Native code.
75
68%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/cds-code/SKILL.mdPerform the following operations only once per session, after the skill is activated.
For any CDS documentation needs, you will need to use either of the following tools. If neither are available you may let the user know but still continue on with the task as documentation is helpful but not required.
cds-docs skill OR...cds-docs skill is not configured, try calling the CDS MCP server list-cds-routes tool.You must determine if you are operating in a React or React Native project before you write any code.
Run the bash discovery script: scripts/discover-cds-packages.sh
This will gve you:
CDS Runtime (web or mobile) - use this value as the platform argument for the CDS MCP serverIf you are unable to run the bash script, you can likely infer the platform by inspecting the project's source code.
getting-started/stylinggetting-started/themingFor all frontend coding tasks, you must follow these steps.
YOU MUST perform steps 1 and 2 before writing any code!
Use guidelines/components.md to help identify the appropriate CDS components for the task.
The guidelines file will cover most use cases, but you may optionally browse the CDS docs for the full list of supported CDS components.
If you decide your task will require icons (Icon or IconButton) or illustrations (SpotSquare, Pictogram, HeroSquare, etc.) please read the corresponding guidelines files for more details.
| Icons | Illustrations |
|---|---|
guidelines/icons.md | guidelines/illustrations.md |
If the task involves icons, also follow guidelines/icons.md and use scripts/discover-cds-icons.mjs to search icon names. If the task involves illustrations, also follow guidelines/illustrations.md and use scripts/discover-cds-illustrations.mjs to search illustration names.
If no CDS component fits your use case, you may fall back to the following options in this order of priority:
IMPORTANT: Always inform the user which CDS components you are planning to use before moving on to Step 2.
For any CDS component you plan to use, retrieve and read their documentation (see Part 1 for more details on docs setup).
Now create or update the UI with proper CDS components and usage.
Most CDS component implement an API that allows you to apply the CDS design tokens, we call these 'style props'. Prefer setting these style props for styling components over setting custom style via inline styles or CSS.
Why this matters: When you set font, color, textAlign, or other typography properties through style instead of props, the component loses its connection to the CDS theme. For example, setting fontSize and fontWeight via style without a font prop means the CDS font family never applies -- the text falls back to inherit and may render in the wrong typeface.
You should check a component's props table in their CDS docs page to verify what props are available.
Example misuse of custom styles and their style props alternatives:
Instead of style | Use the prop |
|---|---|
style={{ color: "var(--color-fgMuted)" }} | color="fgMuted" |
style={{ fontSize: 12, fontWeight: 500, lineHeight: "16px" }} | font="caption" (or the matching CDS font token) |
style={{ textAlign: "center" }} | textAlign="center" |
style={{ textTransform: "uppercase" }} | textTransform="uppercase" |
style={{ display: "flex", flexDirection: "column" }} | Use VStack, or flexDirection="column" on Box |
style={{ gap: 8 }} | gap={1} |
style={{ padding: 16 }} | padding={2} |
style={{ backgroundColor: "..." }} | background="bgAlternate" (or semantic token) |
If you need to further customize the style of a rendered CDS component or a specific style is not support via style props, you may reference: guidelines/customizing-styles.md.
Your task will be complete if:
Part 1font, color, textAlign, textTransform, padding, gap) instead of customization via style or with CSS.This is critical. Do not guess or memorize CDS import paths. The discovery script output is the source of truth (see Part 1 for details).
Before writing or returning any CDS import, verify it against the export list from setup:
The package name may vary between projects. Different repos may install CDS under different scopes. Always use the package name reported by the discovery script, not a hardcoded scope. If the project already has CDS imports in existing code, match whatever scope those files use.
Common mistakes to avoid:
<pkg>/layout/Box or <pkg>/buttons/Button when the actual export is <pkg>/layout or <pkg>/buttons.f79a780
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.