.claude/skills/coding-standards/SKILL.md
Expo React Native coding standards — TypeScript strict mode, component patterns, file organization, naming conventions, and anti-patterns. Auto-load when writing or reviewing code.
npx skillsauth add taewoongheo/taste coding-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
any — use unknown and narrow, or define proper types!) — use proper null checksinterface over type for object shapes (extendable)const assertions for config objects// Props — always interface, always exported
export interface ButtonProps {
label: string;
onPress: () => void;
variant?: 'primary' | 'secondary';
disabled?: boolean;
}
// Discriminated unions for state
type AsyncState<T> =
| { status: 'idle' }
| { status: 'loading' }
| { status: 'success'; data: T }
| { status: 'error'; error: Error };
components/
Button.tsx # one component per file
Button.test.tsx # co-located test
| Item | Convention | Example |
|------|-----------|---------|
| Component | PascalCase | ProfileCard |
| Hook | camelCase, use prefix | useAuth |
| Utility function | camelCase | formatDate |
| Constant | UPPER_SNAKE_CASE | MAX_RETRIES |
| Type/Interface | PascalCase | UserProfile |
| File | kebab-case | profile-card.tsx, use-auth.ts |
| Directory | kebab-case | styles/ |
// 1. React / React Native
import { useState } from 'react';
import { View, Text } from 'react-native';
// 2. External libraries
import Animated, { useSharedValue } from 'react-native-reanimated';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
// 3. Internal modules (absolute imports)
import { colors, spacing } from '@/styles';
import { useAuth } from '@/hooks/useAuth';
// 4. Relative imports (sibling components)
import { Avatar } from './Avatar';
// 5. Types (type-only imports)
import type { UserProfile } from '@/types';
src/styles/ for colors, spacing, typography — don't hardcodesrc/styles/src/styles/ files as needed| Don't | Do Instead |
|-------|-----------|
| console.log in production | Remove or use proper logging |
| any type | Define proper type or use unknown |
| Inline styles | StyleSheet.create or Reanimated |
| RN core Animated | react-native-reanimated |
| LayoutAnimation | Reanimated Layout transitions |
| Default exports | Named exports |
| var | const or let |
| Nested ternaries | Early returns or switch |
| useEffect for derived state | useMemo |
| String refs | useRef |
useState / useReduceruseSharedValue (Reanimated)@tanstack/react-query)// TODO(name): format for real todos (should be temporary)Answer in Korean.
development
Visual hierarchy verification — squint test, information density, primary action clarity, and empty state quality for mobile UI. Auto-load when doing design or layout work.
development
Comprehensive design guide for web and mobile applications. Contains 50+ styles, 97 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types.
development
TDD patterns for React Native — Jest setup, React Native Testing Library patterns, mock strategies, and what to test vs skip. Auto-load when writing or running tests.
testing
Spacing, layout, and spatial relationships — consistent scale, proximity grouping, optical alignment, and density control for mobile UI. Auto-load when doing design or layout work.