dev.cds-mobile

द्वारा coinbase

dev.cds-mobile — coinbase/cds द्वारा प्रकाशित AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल।

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

CDS Mobile Package Guidelines

Mobile-specific patterns for @coinbase/cds-mobile.

Component Config Adoption (Mobile)

Use this guidance when adding ComponentConfigProvider defaults for the specific component you are editing.

Required implementation pattern

  1. Register the component in packages/mobile/src/core/componentConfig.ts using its *BaseProps:
import type { MyComponentBaseProps } from '../category/MyComponent';

export type ComponentConfig = {
  MyComponent?: ConfigResolver<MyComponentBaseProps>;
};
  1. Adopt 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 { style, ...props } = mergedProps;

  return <Pressable style={style} {...props} />;
});

Rules to preserve behavior

  • Provider config supplies defaults only; local props must continue to win.
  • Use _props as the input variable and mergedProps as the configured output.
  • Type resolver entries with *BaseProps (not full *Props).
  • Keep scope to prop-level theming defaults; do not alter component behavior or control flow.
  • When practical during the same change, prefer arrow-function component declarations.

Styling with StyleSheet

Use StyleSheet.create for static styles and useTheme() for dynamic values:

import { StyleSheet, type StyleProp, type ViewStyle } from 'react-native';

const styles = StyleSheet.create({
  container: { position: 'relative', width: '100%' },
});

// Dynamic styles via theme hook
const theme = useTheme();
const dynamicStyle = {
  backgroundColor: theme.color.bgPrimary,
  padding: theme.space[2],
};

<View style={[styles.container, dynamicStyle, style]} />;

Inline styles

  • Mobile components should all expose a style and styles object props for overriding default styles.
  • As styling is a concern of that specific component, the style and styles props should never be on the *BaseProps type.
  • styles can be used for granular overrides on child elements within the component.
  • Always merge styles into a react-native style array with useMemo in the correct order (default styles => style prop => styles[ELEMENT_NAME] prop).

Example:

type ComponentProps = ComponentBaseProps & {
  style?: StyleProp<ViewStyle>;
  styles?: {
    root?: StyleProp<ViewStyle>;
    label?: StyleProp<TextStyle>;
  };
};

const theme = useTheme();
const containerStyles = useMemo(
  () => [
    { backgroundColor: theme.color.bgPrimary }, // default styles
    style, // from props
    styles.root, // from props
  ],
  [theme.color.bgPrimary, animatedStyles, style]
);

// Apply to component
<Box style={containerStyles}>

Animation

React Native Reanimated

import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';

const opacity = useSharedValue(0);
const animatedStyle = useAnimatedStyle(() => ({
  opacity: opacity.value,
  transform: [{ translateY: withTiming(opacity.value * -8) }],
}));

<Animated.View style={animatedStyle} />;

We DO NOT use React-Spring anymore for animations on mobile.

Gesture Handling

Use react-native-gesture-handler:

import { Gesture, GestureDetector } from 'react-native-gesture-handler';

const panGesture = useMemo(
  () =>
    Gesture.Pan()
      .onStart(() => {
        /* ... */
      })
      .onUpdate(({ translationX }) => {
        /* ... */
      })
      .onEnd(({ translationX, velocityX }) => {
        /* ... */
      })
      .withTestId(testID)
      .runOnJS(true),
  [dependencies],
);

<GestureDetector gesture={panGesture}>
  <Animated.View>{/* ... */}</Animated.View>
</GestureDetector>;

Layout Measurement

Use onLayout callback instead of ResizeObserver:

const [size, onLayout] = useLayout();
<View onLayout={onLayout} />

// Or inline
<View onLayout={(e) => setHeight(e.nativeEvent.layout.height)} />

Accessibility

  • Use appropriate accessibilityLabel, accessibilityHint, and accessibilityRole, accessibilityState props
  • Support screen readers (VoiceOver and TalkBack)
  • Ensure touch targets meet minimum size requirements (44x44 points)

Example: Use React Native accessibility props:

<View
  accessible
  accessibilityRole="adjustable"
  accessibilityLabel="Product carousel"
  accessibilityLiveRegion="polite"
>
  <Pressable
    accessibilityState={{ selected: isActive, disabled }}
    accessibilityActions={[{ name: 'activate' }]}
    onAccessibilityAction={handleAccessibilityAction}
  />
</View>

Screen Reader Content

// Hide visual content from screen readers
<View accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
  {/* Animated/visual content */}
</View>

// Provide accessible alternative
<Text
  importantForAccessibility="yes"
  accessibilityLiveRegion="polite"
  style={{ color: 'transparent', position: 'absolute' }}
>
  {accessibleLabel}
</Text>

Reference Components

  • SlideButton: gesture handling, spring animations, accessibility actions
  • RollingNumber: Reanimated, measurement patterns, screen reader content
  • Select (alpha/): controlled/uncontrolled, Drawer integration
  • Stepper: direction-based defaults, shared logic from cds-common
  • Tour: animations, complexity
  • DatePicker: complexity

coinbase की और Skills

git.repo-manager
coinbase
git.repo-manager — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, जो coinbase/cds द्वारा प्रकाशित है।
official
agentic-wallet
coinbase
क्रिप्टो वॉलेट संचालन awal CLI के माध्यम से — साइन इन करें, बैलेंस जांचें, USDC/ETH/POL/SOL भेजें, टोकन ट्रेड करें, वॉलेट को फंड करें, और x402 भुगतान प्रोटोकॉल का उपयोग करें…
official
authenticate-wallet
coinbase
ईमेल OTP-आधारित वॉलेट प्रमाणीकरण जिसमें सत्यापन और स्थिति जांच शामिल है। दो-चरणीय लॉगिन प्रक्रिया: ईमेल से शुरू करके 6 अंकों का OTP प्राप्त करें, फिर flowId और कोड के साथ सत्यापित करके प्रमाणीकरण पूरा करें। कमांड निष्पादित करने से पहले शेल इंजेक्शन को रोकने के लिए ईमेल, flowId और OTP के लिए इनपुट सत्यापन नियम शामिल हैं। साथी CLI कमांड के माध्यम से स्थिति जांच, शेष राशि क्वेरी, पता प्राप्ति और वॉले
official
fund
coinbase
Coinbase Onramp या सीधे ट्रांसफर के माध्यम से वॉलेट में USDC जमा करें। एक सहायक UI खुलता है जहां उपयोगकर्ता पूर्व निर्धारित राशि ($10, $20, $50) या कस्टम मान चुन सकते हैं और Apple Pay, डेबिट कार्ड, बैंक ट्रांसफर, या Coinbase खाता फंडिंग में से चुन सकते हैं। विभिन्न निपटान समय के साथ कई भुगतान विधियों का समर्थन करता है: कार्ड और Apple Pay के लिए तत्काल, ACH बैंक ट्रांसफर के लिए 1-3 दिन। Base नेटवर्क पर USDC के रूप में फं
official
monetize-service
coinbase
एक सशुल्क API एंडपॉइंट तैनात करें जिसे अन्य एजेंट x402 प्रोटोकॉल के माध्यम से खोज और भुगतान कर सकें। HTTP 402 भुगतान प्रोटोकॉल का उपयोग करके Base पर प्रति अनुरोध USDC चार्ज करता है; क्लाइंट हस्ताक्षरित लेन-देन के साथ भुगतान करते हैं, कोई API कुंजी या खाते की आवश्यकता नहीं है। जब आप डिस्कवरी एक्सटेंशन घोषित करते हैं तो एजेंट खोज के लिए स्वचालित रूप से एंडपॉइंट को x402 Bazaar के साथ पंजीकृत करता है।
official
pay-for-service
coinbase
बेस पर x402 प्रोटोकॉल के माध्यम से स्वचालित USDC भुगतान के साथ भुगतान वाले API को कॉल करें। x402-सक्षम एंडपॉइंट पर HTTP अनुरोध (GET, POST, आदि) निष्पादित करता है, जिसमें परमाणु USDC भुगतान स्वचालित रूप से संभाले जाते हैं। विधि, JSON बॉडी, क्वेरी पैरामीटर और कस्टम हेडर के माध्यम से अनुरोध अनुकूलन का समर्थन करता है। भुगतान नियंत्रण शामिल हैं: प्रति अनुरोध अधिकतम USDC राशि सेट करें और सहसंबंध आईडी के साथ संबं
official
query-blockchain-data
coinbase
बेस पर CDP SQL API के माध्यम से x402 का उपयोग करके ऑनचेन ब्लॉकचेन डेटा क्वेरी करें। इसका उपयोग तब करें जब आप या आपका उपयोगकर्ता डिकोड किए गए ब्लॉकों के बारे में ऑनचेन जानकारी देखना चाहते हैं,…
official
query-onchain-data
coinbase
Base पर ऑनचेन डेटा को SQL के माध्यम से प्रति-क्वेरी x402 भुगतान के साथ क्वेरी करें। CoinbaseQL के माध्यम से डिकोड की गई घटनाओं, लेन-देन और ब्लॉकों तक पहुँच प्राप्त करें, जो ClickHouse-आधारित SQL डायलेक्ट है और जॉइन, CTE, सबक्वेरी और मानक फंक्शन का समर्थन करता है। तीन मुख्य तालिकाएँ उपलब्ध हैं: base.events (डिकोड किए गए स्मार्ट कॉन्ट्रैक्ट लॉग), base.transactions (पूर्ण लेन-देन डेटा), और base.blocks (ब्लॉक मेटाडे
official