Scaffolding React Native Expo (arc-skill)

VérifiéSûr

Scaffolding d'un projet React Native Expo avec l'architecture arc-skill, incluant navigation, thème, API, et design mobile.

Spar Skills Guide Bot
DeveloppementIntermédiaire
25/07/2026
Claude Code
#react-native#expo#scaffolding#mobile-development

Recommandé pour

Synthèse automatique

Ce skill génère un projet React Native (Expo) complet en posant des questions sur le nom, la description, les plateformes, l'authentification, la navigation et l'internationalisation, puis en lisant des fichiers d'architecture et en utilisant Context7 pour obtenir les dernières versions des bibliothèques.

Points forts

  • Automatise la configuration initiale avec des choix guidés
  • Intègre les meilleures pratiques de conception mobile et d'architecture
  • Utilise Context7 pour garantir des API à jour
  • Inclut des vérifications de design mobile obligatoires

Limites

  • Nécessite que Context7 soit configuré ou l'utilisateur doit fournir les docs à la main
  • La génération de code dépend de la lecture de nombreux fichiers de référence, ce qui peut être lent
  • Ne couvre pas la configuration de déploiement ou de CI/CD
Quand l'utiliser

Utilisez ce skill lorsque vous démarrez un nouveau projet React Native (Expo) et que vous souhaitez une base solide avec une architecture éprouvée.

Quand l'éviter

Ne l'utilisez pas pour ajouter des fonctionnalités à un projet existant, car il est conçu pour le scaffolding complet.

Analyse de sécurité

Sûr
Score qualité88/100

The skill contains only standard project initialization commands (npx create-expo-app, npm install, etc.) and no destructive, exfiltrating, or obfuscated instructions. It prompts the user for input and suggests optional tools like Context7 MCP, but does not execute any risky operations automatically.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Scaffold grocery app
Scaffold a new React Native Expo project called 'FreshCart' for a grocery delivery app targeting both iOS and Android. Include authentication, tabs+stack navigation, internationalization, and use Context7 for fetching the latest library docs.
Quick scaffold without auth
Scaffold a React Native Expo project named 'MyApp' for learning purposes, targeting only iOS, no authentication, stack-only navigation, and no i18n. I don't have Context7 set up, so proceed with the architecture reference files.
Scaffold with drawer navigation
Create a new React Native Expo project 'TaskMaster' for a task management app targeting Android only. Use drawer+stack navigation, include authentication and internationalization. Use Context7 for latest docs.

React Native Arc — Project Scaffolding Skill

You are scaffolding a new React Native (Expo) project using the arc-skill architecture.

Pre-Flight

  1. Ask the user for:

    • Project name (used in app.json, package name, display name)
    • Brief description of the app (to inform screen/feature choices)
    • Target platforms: iOS only, Android only, or both
    • Whether they need i18n (internationalization) — default: yes
    • Whether they need authentication flow — default: yes
    • Which navigation pattern: tabs + stack (default) or stack only or drawer + stack
  2. Context7 (mandatory): Ask the user to connect Context7 MCP server if not already configured. Use it to fetch the latest docs for:

    • react-native — core APIs and New Architecture
    • expo — SDK setup and latest modules
    • @react-navigation/native — navigation
    • @tanstack/react-query — server state
    • react-native-mmkv — storage
    • react-native-reanimated — animations

    Tell the user: "Do you have Context7 MCP connected? It fetches up-to-date library docs so the generated code uses the latest APIs. If not, add it: https://github.com/upstash/context7" If the user confirms they don't have it and don't want to add it, proceed with the architecture reference files.

  3. Expo Skills (recommended): Check if the user has Expo community skills installed. If not, suggest they look into Expo's official documentation for AI-assisted development patterns covering native UI, deployment, and SDK upgrades.

  4. Mobile Design Checkpoint (mandatory): Before writing any code, read skills/arc-skill/mobile-design/GUIDE.md and complete:

    Platform:   [iOS / Android / Both]
    Framework:  React Native (Expo)
    
    3 Principles I Will Apply:
    1. Touch-first (44pt+ targets, thumb zone aware)
    2. Platform-respectful (iOS HIG / Material Design 3)
    3. Performance-first (FlatList, Reanimated, memo)
    
    Anti-Patterns I Will Avoid:
    1. ScrollView for lists
    2. Hardcoded pixel values
    3. Inline styles / anonymous functions in render
    

Architecture Reference Files

Read the following skill files from skills/arc-skill/ to understand the full architecture before generating code:

Core Architecture:

  1. project-structure.md — Complete folder structure
  2. navigation.md — React Navigation patterns
  3. theme.md — Theme system with color schemes
  4. components.md — Component file structure & patterns
  5. api-services.md — Axios HTTP client & API layer
  6. storage.md — MMKV storage wrapper
  7. state-management.md — React Query setup & patterns
  8. performance.md — React Native performance best practices
  9. providers.md — Provider stack architecture
  10. typescript.md — TypeScript conventions
  11. linting.md — ESLint, Prettier, Husky, lint-staged
  12. i18n.md — Internationalization with Lingui

Mobile Design System (ALWAYS read — these are mandatory, not optional): 13. mobile-design/GUIDE.md — Master checklist & anti-patterns 14. mobile-design/touch-psychology.md — Touch targets, thumb zones, haptics 15. mobile-design/mobile-performance.md — Deep performance optimization 16. mobile-design/mobile-navigation.md — Navigation UX patterns 17. mobile-design/mobile-typography.md — Type scales, Dynamic Type 18. mobile-design/mobile-color-system.md — OLED, dark mode, contrast 19. mobile-design/platform-ios.md — iOS HIG specifics (read if targeting iOS) 20. mobile-design/platform-android.md — Material Design 3 specifics (read if targeting Android) 21. mobile-design/mobile-backend.md — Offline sync, push, auth patterns 22. mobile-design/decision-trees.md — Framework & architecture decisions 23. mobile-design/mobile-design-thinking.md — Anti-memorization, forces context-based thinking

Template Files

Read templates from skills/arc-skill/templates/ for code generation patterns:

  • component.md — Component file templates
  • screen.md — Screen file templates
  • hook.md — Custom hook templates
  • api-service.md — API service module templates

Execution Steps

Step 1: Initialize Expo Project

npx create-expo-app@latest <project-name> --template blank-typescript
cd <project-name>

Step 2: Install Core Dependencies

Always use npx expo install for Expo-compatible packages (resolves correct versions). Use latest — do NOT pin versions. Install in this order (groups can be parallel):

Navigation:

npx expo install @react-navigation/native @react-navigation/native-stack @react-navigation/bottom-tabs react-native-screens react-native-safe-area-context

State & Storage:

npx expo install @tanstack/react-query @tanstack/react-query-persist-client react-native-mmkv

HTTP:

npx expo install axios

UI & Animations:

npx expo install react-native-reanimated react-native-gesture-handler react-native-size-matters expo-blur expo-haptics expo-status-bar expo-image expo-splash-screen expo-font @expo/vector-icons react-native-keyboard-controller

Forms (if auth flow):

npx expo install formik yup

i18n (if enabled):

npm install @lingui/react @lingui/core
npm install -D @lingui/cli @lingui/macro @lingui/babel-plugin-lingui-macro
npx expo install expo-localization

Dev tools:

npm install -D typescript @types/react eslint prettier eslint-config-expo husky lint-staged babel-plugin-module-resolver

Verify compatibility:

npx expo doctor

Fix any version mismatches before proceeding. Follow expo doctor recommendations.

Step 3: Generate Project Structure

Create the full src/ directory structure as defined in project-structure.md.

Step 4: Generate Core Files

Generate files in this order (respecting dependencies):

  1. Types (src/types/) — Base type definitions
  2. Constants (src/constants/) — App constants, keys, platform utils
  3. Theme (src/theme/) — Theme definitions, interfaces, fonts
  4. Storage (src/store/storage/) — MMKV storage wrappers
  5. API Client (src/api/http/index.ts) — Axios instance with interceptors
  6. API Modules (src/api/http/) — Auth, profile, etc.
  7. Store Services (src/store/services/) — React Query client, hooks
  8. Hooks (src/hooks/) — useAppTheme, useAppNavigation, useStyles
  9. Providers (src/providers/) — AppInitialization, i18n
  10. Components (src/components/) — Shared UI components
  11. Screens (src/screens/) — App screens
  12. Navigation (src/navigation/) — Navigator setup
  13. App Entry (src/app.tsx) — Root component with provider stack
  14. i18n (src/locale/) — If i18n enabled

Step 5: Configure Build Tools

  • Update tsconfig.json with path aliases (see typescript.md)
  • Update babel.config.js for reanimated + lingui + module-resolver plugins
  • Create ESLint config, .prettierrc, .prettierignore (see linting.md)
  • Set up Husky + lint-staged for pre-commit hooks (see linting.md)
  • Add lint, format, typecheck, check scripts to package.json
  • Create .env.example
  • Update app.json with project metadata + enable React Compiler:
    { "expo": { "experiments": { "reactCompiler": true } } }
    

Step 6: Verify

npx react-compiler-healthcheck@latest
npx expo doctor
npx expo start

Important Rules

Architecture:

  • Always use the component file structure from components.md — separate files for styles, types, constants
  • Always use react-native-size-matters moderateScale — never hardcode pixel sizes
  • Always type navigation — use typed useAppNavigation() hook
  • Always use the useStyles() hook — never call StyleSheet.create directly in components
  • Follow the barrel export pattern — every folder has an index.ts
  • API calls go through React Query — never call API functions directly from components
  • Storage access through typed wrappers — never use MMKV directly in components

Mobile UX (from mobile-design system):

  • Touch targets minimum 44pt (iOS) / 48dp (Android) — see touch-psychology.md
  • Primary CTAs in thumb-friendly zone (bottom of screen)
  • Never gesture-only interactions — always provide visible button alternative
  • Haptic feedback for meaningful interactions
  • Support Dynamic Type / font scaling — use sp on Android
  • Dark mode: use #121212 not pure #000000 for surfaces (avoid OLED smearing)
  • Text contrast minimum 4.5:1 (WCAG AA)
  • Platform-respectful: iOS follows HIG, Android follows Material Design 3

Performance (from performance.md + mobile-performance.md):

  • FlatList for lists — never ScrollView for dynamic/long lists
  • Reanimated for animations (UI thread) — never Animated API for complex animations
  • expo-image instead of React Native Image — with caching and blurhash
  • freezeOnBlur on tab screens
  • Clean up timers, listeners, subscriptions in useEffect cleanup
  • Remove all console.log before production
  • React Compiler handles memoization — do NOT manually add React.memo, useCallback, or useMemo

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/react-native-arc-project-scaffolding-mrx3y06w/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/react-native-arc-project-scaffolding-mrx3y06w' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/react-native-arc-project-scaffolding-mrx3y06w/download' --output '.skill-downloads/react-native-arc-project-scaffolding-mrx3y06w/SKILL.md.part' && mv '.skill-downloads/react-native-arc-project-scaffolding-mrx3y06w/SKILL.md.part' '.skill-downloads/react-native-arc-project-scaffolding-mrx3y06w/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/react-native-arc-project-scaffolding-mrx3y06w/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires