gabelul/stitch-kit / skills/stitch-react-native-components
stitch-react-native-components
VerifiedConverts a Stitch mobile screen, a local HTML file, or a URL into React Native / Expo components — TypeScript, StyleSheet, Expo Router, dark mode via useColorScheme, and proper touch targets. Cross-platform iOS and Android. Only the Stitch route needs an API key.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.6 KB |
| resources/architecture-checklist.md | markdown | 3.4 KB |
| resources/component-template.tsx | other | 2.6 KB |
| scripts/fetch-stitch.sh | script | 1.3 KB |
resources/architecture-checklist.md
View on GitHub# React Native Components — Architecture Checklist
Run through this checklist before marking the task complete.
## Structure
- [ ] Components are in `src/components/` — one file per component
- [ ] Screen files are in `app/(tabs)/` or `app/` (Expo Router conventions)
- [ ] Static content is in `src/data/mockData.ts`, not hardcoded in JSX
- [ ] Shared TypeScript types are in `src/types/index.ts`
- [ ] Theme tokens are in `src/theme/tokens.ts` with `lightTokens` and `darkTokens`
- [ ] `useTheme()` hook is in `src/theme/useTheme.ts`
- [ ] Each component has a `Readonly<ComponentNameProps>` interface
## React Native basics
- [ ] Every string is inside a `<Text>` component — no bare strings in JSX
- [ ] All layout uses `StyleSheet.create` (static values) + inline objects (dynamic theme values)
- [ ] No hardcoded hex colors in `StyleSheet.create` — theme values go inline
- [ ] All `<Image>` components have explicit `width` and `height` in their style
- [ ] `<ScrollView>` is used instead of `overflow-y: scroll` divs
- [ ] Long lists use `<FlatList>` with `keyExtractor`, not `<ScrollView>` + `map()`
## Touch and interaction
- [ ] All interactive elements use `<Pressable>` (not `<TouchableOpacity>` or `<View onPress>`)
- [ ] `hitSlop={8}` or larger on all small tap targets
- [ ] Minimum touch target: 44×44 dp (`minHeight: 44, minWidth: 44`)
- [ ] Press visual feedback: `style={({ pressed }) => [styles.x, { opacity: pressed ? 0.8 : 1 }]}`
- [ ] No nested `<Pressable>` elements (causes gesture conflicts)
## Safe area and platform
- [ ] `<SafeAreaProvider>` wraps the root layout in `app/_layout.tsx`
- [ ] Screen-level components use `useSafeAreaInsets()` for top/bottom padding
- [ ] Bottom navigation doesn't overlap home indicator on iPhone
- [ ] Keyboard handling: `<KeyboardAvoidingView behavior="padding">` on iOS forms
- [ ] Platform differences (if any) are handled with `Platform.OS === 'ios'`
## TypeScript
- [ ] No `any` types
- [ ] Theme tokens typed as `ThemeTokens` (inferred from `typeof lightTokens`)
- [ ] All component props use `Readonly<>`
- [ ] No `@ts-ignore` without explaining why
## Dark mode
- [ ] `useTheme()` hook is used in every component that renders colors
- [ ] No hardcoded `'#FFFFFF'` or `'#000000'` — use `theme.background`, `theme.text`
- [ ] Tested: toggle device to dark mode — no elements disappear or become unreadable
## Accessibility
- [ ] All `<Pressable>` elements have `accessible={true}`, `accessibilityRole`, and `accessibilityLabel`
- [ ] Decorative `<Image>` elements have `accessible={false}`
- [ ] Content images have `accessibilityLabel` describing the image
- [ ] Page titles use `accessibilityRole="header"` on the heading `<Text>`
- [ ] Related elements grouped with `accessibilityViewIsModal` or `.accessibilityElement(children: .combine)` equivalent
## Performance
- [ ] No `console.log` in production code
- [ ] `StyleSheet.create` used for static styles (hoisted outside render)
- [ ] `FlatList` used for any list of 10+ items
- [ ] `useCallback` / `useMemo` used where referential equality matters (event handlers passed to children)
- [ ] `React.memo` on pure leaf components that receive stable props
## Expo Router
- [ ] Navigation uses `router.push('/route')` — no hardcoded `navigation.navigate`
- [ ] Tab layout uses Expo Router `<Tabs>` — not `react-navigation` directly
- [ ] Deep link paths match the file structure in `app/`
- [ ] `app/_layout.tsx` has `<SafeAreaProvider>` and `<Stack>` (or `<Tabs>`)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |