skills/mobile/cross-platform/SKILL.md
React Native+Expo (EAS), Flutter/Dart (Bloc/Riverpod), Capacitor, KMM — framework selection
npx skillsauth add alphaonedev/openclaw-graph cross-platformInstall 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.
This skill guides the selection and implementation of cross-platform mobile frameworks like React Native with Expo, Flutter with Dart (using Bloc or Riverpod), Capacitor, and Kotlin Multiplatform Mobile (KMM). It focuses on choosing the right framework based on project needs and provides step-by-step integration for efficient mobile app development.
Use this skill for projects requiring multi-platform deployment (iOS/Android) to reduce code duplication. Apply it when building apps with shared business logic, such as e-commerce apps, social networks, or productivity tools. Ideal for teams with limited resources or when rapid prototyping is needed, like integrating native modules or handling state management across platforms.
To select a framework, evaluate based on tech stack: use React Native if the team knows JS; Flutter for high-performance UIs. Start by initializing a project:
expo init MyApp --template blank then add dependencies with npm install @react-navigation/native.flutter create MyApp and set up state: final counterProvider = StateProvider((ref) => 0); in a Dart file.
Always wrap platform-specific code: In KMM, use expect fun platformFunction() {} in common code and implement in iOS/Android modules.
For Capacitor, convert a web app by running npx cap add android after setting up a web project.expo login (requires $EXPO_API_KEY env var), eas build --platform all for multi-platform builds, and API endpoint POST https://api.expo.dev/v2/projects for project management.flutter pub add flutter_bloc for Bloc, or flutter run --device-id emulator-5554 to target a specific emulator; access APIs like BlocProvider.of(context).add(Event()) for state changes.npx cap sync to update native projects, or npx cap open android to launch Android Studio; use Capacitor's Plugins API, e.g., Capacitor.Plugins.Camera.getPhoto() in JavaScript../gradlew build in the shared module, and use KMM Bridge for iOS: import shared.Platform().hello() in Swift.
Config formats: Edit Expo's app.json like { "expo": { "name": "MyApp", "slug": "myapp", "platforms": ["ios", "android"] } }; for Flutter, modify pubspec.yaml with dependencies: flutter_riverpod: ^2.0.0.Integrate these frameworks with backends by setting environment variables for auth, e.g., export $BACKEND_API_KEY for API calls. For React Native, use Expo's Fetch API: fetch('https://api.example.com/data', { headers: { Authorization: Bearer ${process.env.BACKEND_API_KEY} } }). In Flutter, add HTTP packages: http.get(Uri.parse('https://api.example.com/data'), headers: {'Authorization': 'Bearer $envVar'}).then((response) => ...);. For Capacitor, bridge web requests: Install @capacitor/core and use CapacitorHttp.get({url: 'https://api.example.com/data', headers: {Authorization: $BACKEND_API_KEY}});. KMM integration: Share networking code via common module and call from native apps, ensuring Gradle sync for dependencies.
Handle common errors by checking for platform mismatches: In React Native, if expo build fails with "Invalid platform", verify app.json platforms array. For Flutter, if flutter run errors on "No devices", use flutter emulators --launch Pixel_API_33 then retry. Capacitor errors like "Plugin not found" require npx cap sync and verifying package.json. In KMM, resolve build failures with ./gradlew clean for corrupted caches. Always log errors: In Expo, use console.error(e) and check EAS build logs; in Flutter, wrap with try-catch: try { await http.get(...); } catch (e) { print(e.toString()); }. Use env vars for secure keys to avoid exposure.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui