원클릭으로
dev-cds-web
USE THIS when asked to work on a new or existing (WEB) CDS React component in packages/web
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
USE THIS when asked to work on a new or existing (WEB) CDS React component in packages/web
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | dev.cds-web |
| description | USE THIS when asked to work on a new or existing (WEB) CDS React component in packages/web |
Use this guidance when adding ComponentConfigProvider defaults for the specific component you are editing.
packages/web/src/core/componentConfig.ts using its *BaseProps:import type { MyComponentBaseProps } from '../category/MyComponent';
export type ComponentConfig = {
MyComponent?: ConfigResolver<MyComponentBaseProps>;
};
useComponentConfig in the component and destructure from merged props:import { useComponentConfig } from '../hooks/useComponentConfig';
export const MyComponent = memo((_props: MyComponentProps) => {
const mergedProps = useComponentConfig('MyComponent', _props);
const { className, style, ...props } = mergedProps;
return <Box className={className} style={style} {...props} />;
});
_props as the input variable and mergedProps as the configured output.*BaseProps (not polymorphic/full *Props).Use Linaria for zero-runtime CSS. Always use CDS theme CSS variables for colors, spacing, typography, and other design tokens. Reference packages/web/src/core/theme.ts:53-119 for the CSS variable naming pattern.
import { css, cx } from '@linaria/core';
const containerCss = css`
/* Spacing tokens */
padding: var(--space-2);
gap: var(--space-1);
/* Color tokens */
background: var(--color-bgPrimary);
color: var(--color-fgPrimary);
border: 1px solid var(--color-line);
/* Border radius tokens */
border-radius: var(--borderRadius-400);
/* Typography tokens */
font-size: var(--fontSize-body);
&:hover {
background: var(--color-bgPrimaryHover);
}
`;
// Merge classNames with cx utility **in CORRECT ORDER**
<div
className={cx(
containerCss, // Base styles first
isCompact && conditionClassToApply, // Conditional computed styles
className, // User-provided className prop
classNames.root, // granular overrides last
)}
/>;
IMPORTANT: Using CSS variables ensures components respond correctly to theme changes (light/dark mode, brand themes).
Design tokens from packages/common/src/core/theme.ts map to CSS variables:
--color-{tokenName} (e.g., --color-bgPrimary, --color-fgMuted)--space-{scale} (e.g., --space-2 = 16px, --space-3 = 24px)--fontSize-{font}, --fontWeight-{font}, --lineHeight-{font}, --fontFamily-{font}--borderRadius-{size}, --borderWidth-{size}--iconSize-{size}, --avatarSize-{size}, --controlSize-{name}--shadow-{level}Reference packages/web/src/styles/media.ts for breakpoint values:
Use the Box component's responsive prop API for responsive values:
<Box padding={{ base: 2, phone: 1, desktop: 3 }} />
classNames object prop for granular overrides on child elements within the component.classNames object are specific to the component they should never be on the *BaseProps typedata-active, data-disabled, data-variant, data-filledstyle and styles object props for overriding inline styles.style and styles props should never be on the *BaseProps type.useMemo hook and applied in the correct order (default styles => style prop => styles[ELEMENT_NAME] prop).Example:
type ComponentProps = ComponentBaseProps & {
style?: React.CSSProperties;
styles?: { root?: React.CSSProperties; label?: React.CSSProperties };
};
Use Framer Motion for complex animations:
import { m as motion, AnimatePresence } from 'framer-motion';
<AnimatePresence>
{visible && (
<motion.div
initial={{ opacity: 0, y: -8 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -8 }}
/>
)}
</AnimatePresence>;
For simple transitions, prefer CSS transitions in Linaria.
Use ARIA attributes:
<div role="group" aria-roledescription="carousel" aria-live="polite">
<button aria-pressed={isActive} tabIndex={isVisible ? 0 : -1} />
</div>
className?: string - CSS class always applied to root elementstyle?: React.CSSProperties - inline styles always applied to root elementas prop for element type (where applicable e.g. see Box)Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Provides a structured workflow for writing high quality Coinbase Design System (CDS) code. Use this skill every time you are asked to create or update a user interface using React or React Native. Additinoally, this skill may be used to conduct a code review on existing code for CDS adherence. Trigger examples: "build this screen", "update this component", "perform a CDS audit on our changes", "check our codebase for CDS adherence", "does this feature use CDS well?"
Turn Figma designs into CDS React (cds-web) or React Native (cds-mobile) code. Use when the user shares a Figma design URL (e.g. `figma.com/design/...?node-id=...`) or asks to "implement this design" or "build this from Figma" in a frontend project that is using Coinbase Design System (CDS). Do not use for general CDS UI work with no Figma reference (use `cds-code`), or for design critique without an implementation request.
Reviews already-written Coinbase Design System (CDS) UI for accessibility: verifying documented accessibility props (e.g. accessibilityLabel, accessibilityState), confirming the chosen CDS primitives cover the right assistive technology behavior, and checking usage against official CDS documentation—not generic web ARIA tutorials. Use this skill to review CDS UI for screen reader, keyboard, and labeled control requirements after the code has been written.
Guidelines writing styles API (styles, classNames, and static classNames) for a CDS component. Use this skill when adding customization options to a React component via `styles` or `classNames` props or when needing to update the docsite with component styles documentation.
Back-port a specific commit from master to a release branch via cherry-pick. Creates a dedicated backport branch, attempts the cherry-pick, pushes it, and opens a PR by default. Returns to the original branch when done (success or failure). If there are merge conflicts, diagnoses the root cause without attempting an autonomous resolution. Use when asked to "backport", "cherry-pick to release", or "port a fix to a release branch".