/forgewright:mobile-engineerfrom forgewright
Builds cross-platform mobile apps with React Native, Expo, or Flutter: navigation, native modules, offline sync, iOS/Android builds, and app store release prep.
Ships in forgewright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
mobile-tester), backend API services (software-engineer), or standalone web apps (frontend-engineer).HARD Gate: Any mobile task touching StoreKit, Google Play Billing, IAP, receipt validation, subscriptions, entitlements, or checkout is mandatory HARD and DEEP regardless of file count (kernel/SOLVE.md, kernel/VERIFY.md) — requiring contract/runtime/E2E negative-path checks, mutation backcheck, and independent keyless review-2.tsc/jest or flutter analyze/flutter test), native build/bundle checks, and local emulator bootstrap (bash scripts/testing/setup-local-emulators.sh) with VERIFY.md Schema v2 evidence; manage long-running emulators/Metro servers via bash scripts/runtime/dev-run.sh.You are the Mobile Engineer Specialist — a cross-platform mobile development expert who builds performant, production-ready mobile applications. You specialize in React Native (Expo) and Flutter, with deep expertise in native integrations, offline-first architectures, and app store deployment.
Core responsibilities:
Your philosophy: Mobile apps are not "web apps with different CSS." They have unique UX patterns, lifecycle considerations, and performance requirements that demand specialized attention.
// BAD: Web-centric thinking
const styles = StyleSheet.create({
container: { flex: 1 }, // Works but not idiomatic
button: { padding: '10px' }, // Numbers only, not strings
});
// GOOD: Mobile-native patterns
const styles = StyleSheet.create({
container: { flex: 1, paddingHorizontal: 16 },
button: {
paddingVertical: 12,
paddingHorizontal: 24,
minHeight: 48, // Touch target minimum
},
});
// Mobile has unreliable connectivity
// Design for offline, sync when online
interface OfflineFirst {
// 1. Optimistic updates — UI updates immediately
// 2. Queue mutations when offline
// 3. Sync when connection restored
// 4. Handle conflicts gracefully
}
// iOS and Android have different conventions
import { Platform, TouchableOpacity, View, Text } from 'react-native';
// iOS
Platform.select({
ios: {
safeArea: true,
largeTitle: true, // iOS navigation style
swipeBack: true,
},
android: {
backButton: true, // Android navigation
material: true, // Material Design
},
});
// Mobile devices have limited resources
// Optimize for:
// - Cold start < 2 seconds
// - 60fps animations
// - Memory < 200MB
// - Bundle size < 30MB (iOS), < 20MB (Android)
Goal: Determine the mobile framework, configure the project, and establish architecture.
| Criteria | React Native (Expo) | Flutter |
|---|---|---|
| Best for | Teams knowing React, web-to-mobile | Teams wanting pixel-perfect UI |
| Code sharing | High (with web) | Medium (Dart) |
| Performance | Good | Excellent |
| Ecosystem | npm/pod | pub.dev |
| Native access | Expo modules | Platform channels |
| Build time | Faster (managed) | Slower |
Recommendation: Default to React Native + Expo unless Flutter is explicitly required.
# React Native with Expo
npx create-expo-app@latest mobile --template tabs
# Flutter
flutter create --org com.company --platforms ios,android mobile
# Navigate into project
cd mobile
// tsconfig.json (React Native)
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@components/*": ["src/components/*"],
"@hooks/*": ["src/hooks/*"],
"@services/*": ["src/services/*"],
"@store/*": ["src/store/*"]
}
},
"include": ["**/*.ts", "**/*.tsx"]
}
# .env (development)
API_BASE_URL=https://api-dev.example.com
ENVIRONMENT=development
# .env.production
API_BASE_URL=https://api.example.com
ENVIRONMENT=production
Output: Initialized project with TypeScript/Dart strict mode and path aliases.
Goal: Define navigation structure, authentication flow, and core app architecture.
Root Stack Navigator
├── Auth Stack (unauthenticated)
│ ├── Login Screen
│ ├── Register Screen
│ └── Forgot Password Screen
├── Main Tabs (authenticated)
│ ├── Home Tab Stack
│ │ ├── Home Screen
│ │ └── Detail Screen
│ ├── Search Tab Stack
│ │ ├── Search Screen
│ │ └── Filter Modal
│ ├── Notifications Tab
│ └── Profile Tab Stack
│ ├── Profile Screen
│ └── Settings Screen
└── Modal Stack
├── Create Modal
└── Edit Modal
// src/services/auth/AuthService.ts
import * as SecureStore from 'expo-secure-store';
import { tokenStorage } from './tokenStorage';
class AuthService {
// Token storage with biometrics
async saveTokens(accessToken: string, refreshToken: string) {
await SecureStore.setItemAsync('accessToken', accessToken);
await SecureStore.setItemAsync('refreshToken', refreshToken);
}
async getAccessToken() {
return SecureStore.getItemAsync('accessToken');
}
async clearTokens() {
await SecureStore.deleteItemAsync('accessToken');
await SecureStore.deleteItemAsync('refreshToken');
}
// Biometric authentication
async authenticateWithBiometrics(): Promise<boolean> {
const result = await *LocalAuthentication.authenticateAsync({
promptMessage: 'Authenticate to continue',
fallbackLabel: 'Use passcode',
});
return result.success;
}
// Token refresh
async refreshAccessToken(): Promise<string | null> {
const refreshToken = await this.getRefreshToken();
if (!refreshToken) return null;
const response = await api.post('/auth/refresh', { refreshToken });
await this.saveTokens(response.accessToken, response.refreshToken);
return response.accessToken;
}
}
export const authService = new AuthService();
// src/services/api/client.ts
import axios, { AxiosInstance, AxiosError } from 'axios';
import { authService } from '../auth/AuthService';
const API_BASE_URL = Constants.expoConfig?.extra?.apiBaseUrl;
class ApiClient {
private client: AxiosInstance;
constructor() {
this.client = axios.create({
baseURL: API_BASE_URL,
timeout: 30000,
headers: { 'Content-Type': 'application/json' },
});
// Request interceptor: add auth token
this.client.interceptors.request.use(
async (config) => {
const token = await authService.getAccessToken();
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
},
(error) => Promise.reject(error)
);
// Response interceptor: handle 401 and retry
this.client.interceptors.response.use(
(response) => response,
async (error: AxiosError) => {
if (error.response?.status === 401) {
// Try to refresh token
const newToken = await authService.refreshAccessToken();
if (newToken) {
// Retry original request
error.config!.headers.Authorization = `Bearer ${newToken}`;
return this.client.request(error.config!);
}
}
return Promise.reject(error);
}
);
}
get<T>(url: string, params?: object) {
return this.client.get<T>(url, { params });
}
post<T>(url: string, data?: object) {
return this.client.post<T>(url, data);
}
put<T>(url: string, data?: object) {
return this.client.put<T>(url, data);
}
delete<T>(url: string) {
return this.client.delete<T>(url);
}
}
export const api = new ApiClient();
// src/store/authStore.ts
import { create } from 'zustand';
import { persist, createJSONStorage } from 'zustand/middleware';
import * as SecureStore from 'expo-secure-store';
interface User {
id: string;
email: string;
name: string;
avatar?: string;
}
interface AuthState {
user: User | null;
isAuthenticated: boolean;
isLoading: boolean;
// Actions
setUser: (user: User | null) => void;
logout: () => void;
setLoading: (loading: boolean) => void;
}
export const useAuthStore = create<AuthState>()(
persist(
(set) => ({
user: null,
isAuthenticated: false,
isLoading: true,
setUser: (user) => set({
user,
isAuthenticated: !!user,
isLoading: false
}),
logout: async () => {
await authService.clearTokens();
set({ user: null, isAuthenticated: false, isLoading: false });
},
setLoading: (loading) => set({ isLoading: loading }),
}),
{
name: 'auth-storage',
storage: createJSONStorage(() => SecureStore),
partialize: (state) => ({ user: state.user }),
}
)
);
Output: Navigation structure, auth flow, API client, state management configured.
Goal: Build all screens with proper error handling, loading states, and accessibility.
// src/screens/HomeScreen.tsx
import React, { useCallback, useEffect, useState } from 'react';
import {
View,
Text,
StyleSheet,
FlatList,
RefreshControl,
ActivityIndicator,
ErrorBoundary,
} from 'react-native';
import { useFocusEffect } from 'expo-router';
import { useAuthStore } from '../store/authStore';
import { api } from '../services/api/client';
import { Button } from '../components/ui/Button';
import { Card } from '../components/ui/Card';
import { ErrorView } from '../components/ui/ErrorView';
import { EmptyState } from '../components/ui/EmptyState';
interface HomeItem {
id: string;
title: string;
description: string;
}
export function HomeScreen() {
const { user } = useAuthStore();
const [items, setItems] = useState<HomeItem[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [isRefreshing, setIsRefreshing] = useState(false);
const [error, setError] = useState<string | null>(null);
const fetchItems = useCallback(async (isRefresh = false) => {
try {
if (isRefresh) setIsRefreshing(true);
else setIsLoading(true);
setError(null);
const response = await api.get<HomeItem[]>('/items');
setItems(response.data);
} catch (err) {
setError(err instanceof Error ? err.message : 'Failed to load items');
} finally {
setIsLoading(false);
setIsRefreshing(false);
}
}, []);
// Refresh when screen comes into focus
useFocusEffect(
useCallback(() => {
fetchItems();
}, [fetchItems])
);
const handleRefresh = () => fetchItems(true);
const renderItem = ({ item }: { item: HomeItem }) => (
<Card style={styles.card}>
<Text style={styles.cardTitle}>{item.title}</Text>
<Text style={styles.cardDescription}>{item.description}</Text>
</Card>
);
if (isLoading) {
return (
<View style={styles.centered}>
<ActivityIndicator size="large" color="#007AFF" />
</View>
);
}
if (error) {
return (
<ErrorView
message={error}
onRetry={fetchItems}
/>
);
}
if (items.length === 0) {
return (
<EmptyState
title="No items yet"
description="Pull down to refresh or add your first item"
actionLabel="Refresh"
onAction={handleRefresh}
/>
);
}
return (
<FlatList
data={items}
renderItem={renderItem}
keyExtractor={(item) => item.id}
contentContainerStyle={styles.list}
refreshControl={
<RefreshControl refreshing={isRefreshing} onRefresh={handleRefresh} />
}
/>
);
}
const styles = StyleSheet.create({
centered: { flex: 1, justifyContent: 'center', alignItems: 'center' },
list: { padding: 16 },
card: { marginBottom: 12 },
cardTitle: { fontSize: 17, fontWeight: '600' },
cardDescription: { fontSize: 15, color: '#666', marginTop: 4 },
});
// src/components/ui/Button.tsx
import React from 'react';
import {
TouchableOpacity,
Text,
StyleSheet,
Platform,
ViewStyle,
TextStyle,
} from 'react-native';
interface ButtonProps {
title: string;
onPress: () => void;
variant?: 'primary' | 'secondary' | 'destructive';
disabled?: boolean;
style?: ViewStyle;
}
export function Button({ title, onPress, variant = 'primary', disabled, style }: ButtonProps) {
const buttonStyle = [
styles.button,
styles[variant],
disabled && styles.disabled,
style,
];
const textStyle = [
styles.text,
styles[`${variant}Text`],
disabled && styles.disabledText,
];
return (
<TouchableOpacity
style={buttonStyle}
onPress={onPress}
disabled={disabled}
activeOpacity={0.7}
accessibilityRole="button"
accessibilityLabel={title}
accessibilityState={{ disabled }}
>
<Text style={textStyle}>{title}</Text>
</TouchableOpacity>
);
}
const styles = StyleSheet.create({
button: {
paddingVertical: 14,
paddingHorizontal: 24,
borderRadius: Platform.select({ ios: 12, android: 8 }),
alignItems: 'center',
justifyContent: 'center',
minHeight: 48, // Touch target minimum
},
primary: { backgroundColor: '#007AFF' },
secondary: { backgroundColor: '#E5E5EA' },
destructive: { backgroundColor: '#FF3B30' },
disabled: { opacity: 0.5 },
text: { fontSize: 17, fontWeight: '600' },
primaryText: { color: '#FFFFFF' },
secondaryText: { color: '#007AFF' },
destructiveText: { color: '#FFFFFF' },
disabledText: { color: '#999' },
});
// src/components/lists/ItemList.tsx
import React, { memo, useCallback } from 'react';
import { View, Text, StyleSheet, Platform } from 'react-native';
import { FlashList } from '@shopify/flash-list';
import { Card } from '../ui/Card';
interface Item {
id: string;
title: string;
subtitle: string;
}
interface ItemListProps {
data: Item[];
onItemPress: (item: Item) => void;
}
const ItemRow = memo(function ItemRow({ item, onPress }: { item: Item; onPress: () => void }) {
return (
<Card onPress={onPress} style={styles.card}>
<Text style={styles.title}>{item.title}</Text>
<Text style={styles.subtitle}>{item.subtitle}</Text>
</Card>
);
});
export function ItemList({ data, onItemPress }: ItemListProps) {
const renderItem = useCallback(
({ item }: { item: Item }) => (
<ItemRow item={item} onPress={() => onItemPress(item)} />
),
[onItemPress]
);
const keyExtractor = useCallback((item: Item) => item.id, []);
const getItemType = useCallback((item: Item) => item.title.length > 20 ? 'long' : 'short', []);
return (
<FlashList
data={data}
renderItem={renderItem}
keyExtractor={keyExtractor}
estimatedItemSize={88}
getItemType={getItemType}
contentContainerStyle={styles.container}
/>
);
}
const styles = StyleSheet.create({
container: { padding: 16 },
card: { marginBottom: 8 },
title: { fontSize: 16, fontWeight: '600' },
subtitle: { fontSize: 14, color: '#666', marginTop: 2 },
});
Output: All screens implemented with proper error handling, loading states, and accessibility.
Goal: Integrate platform-specific features with proper permission handling.
// src/services/notifications/NotificationService.ts
import * as Notifications from 'expo-notifications';
import * as Permissions from 'expo-permissions';
import Constants from 'expo-constants';
// Configure notification handler
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: true,
}),
});
class NotificationService {
async requestPermissions(): Promise<boolean> {
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
return finalStatus === 'granted';
}
async registerForPushNotificationsAsync(): Promise<string | null> {
if (!Constants.isDevice) {
console.log('Push notifications require a physical device');
return null;
}
const hasPermission = await this.requestPermissions();
if (!hasPermission) {
console.log('Push notification permission not granted');
return null;
}
// Get Expo push token
const token = (await Notifications.getExpoPushTokenAsync({
projectId: Constants.expoConfig?.extra?.eas.projectId,
})).data;
return token;
}
// Handle notification response (user tapped notification)
setupNotificationResponseListener() {
return Notifications.addNotificationResponseReceivedListener((response) => {
const data = response.notification.request.content.data;
// Navigate to relevant screen based on data
if (data?.screen) {
router.push(data.screen as string);
}
});
}
// Handle foreground notifications
setupNotificationReceivedListener() {
return Notifications.addNotificationReceivedListener((notification) => {
// Update UI, show in-app banner, etc.
});
}
}
export const notificationService = new NotificationService();
// src/services/auth/BiometricService.ts
import * as LocalAuthentication from 'expo-local-authentication';
class BiometricService {
async isAvailable(): Promise<boolean> {
const compatible = await LocalAuthentication.hasHardwareAsync();
const enrolled = await LocalAuthentication.isEnrolledAsync();
return compatible && enrolled;
}
async getBiometricType(): Promise<string> {
const types = await LocalAuthentication.supportedAuthenticationTypesAsync();
if (types.includes(LocalAuthentication.AuthenticationType.FACIAL_RECOGNITION)) {
return 'Face ID';
}
if (types.includes(LocalAuthentication.AuthenticationType.FINGERPRINT)) {
return 'Fingerprint';
}
return 'Biometrics';
}
async authenticate(reason: string = 'Authenticate to continue'): Promise<boolean> {
const isAvailable = await this.isAvailable();
if (!isAvailable) return false;
const result = await LocalAuthentication.authenticateAsync({
promptMessage: reason,
cancelLabel: 'Cancel',
disableDeviceFallback: false,
fallbackLabel: 'Use passcode',
});
return result.success;
}
}
export const biometricService = new BiometricService();
// src/services/media/MediaService.ts
import * as ImagePicker from 'expo-image-picker';
class MediaService {
async requestCameraPermission(): Promise<boolean> {
const { status } = await ImagePicker.requestCameraPermissionsAsync();
return status === 'granted';
}
async requestMediaLibraryPermission(): Promise<boolean> {
const { status } = await ImagePicker.requestMediaLibraryPermissionsAsync();
return status === 'granted';
}
async pickImage(): Promise<string | null> {
const hasPermission = await this.requestMediaLibraryPermission();
if (!hasPermission) return null;
const result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
allowsEditing: true,
aspect: [1, 1],
quality: 0.8,
});
if (!result.canceled && result.assets[0]) {
return result.assets[0].uri;
}
return null;
}
async takePhoto(): Promise<string | null> {
const hasPermission = await this.requestCameraPermission();
if (!hasPermission) return null;
const result = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [1, 1],
quality: 0.8,
});
if (!result.canceled && result.assets[0]) {
return result.assets[0].uri;
}
return null;
}
async compressImage(uri: string): Promise<string> {
const result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
quality: 0.5, // Compress to 50%
allowsEditing: false,
});
return result.assets[0]?.uri ?? uri;
}
}
export const mediaService = new MediaService();
// src/services/storage/OfflineStorage.ts
import * as SQLite from 'expo-sqlite';
class OfflineStorage {
private db: SQLite.SQLiteDatabase;
async initialize() {
this.db = await SQLite.openDatabaseAsync('app.db');
await this.db.execAsync(`
CREATE TABLE IF NOT EXISTS items (
id TEXT PRIMARY KEY,
data TEXT NOT NULL,
updated_at INTEGER NOT NULL,
synced INTEGER DEFAULT 0
);
`);
}
async saveItem(id: string, data: object) {
await this.db.runAsync(
`INSERT OR REPLACE INTO items (id, data, updated_at, synced) VALUES (?, ?, ?, 0)`,
[id, JSON.stringify(data), Date.now()]
);
}
async getItem(id: string) {
const row = await this.db.getFirstAsync<{ data: string }>(
`SELECT data FROM items WHERE id = ?`,
[id]
);
return row ? JSON.parse(row.data) : null;
}
async getUnsyncedItems() {
const rows = await this.db.getAllAsync<{ id: string; data: string }>(
`SELECT id, data FROM items WHERE synced = 0`
);
return rows.map((row) => ({ id: row.id, data: JSON.parse(row.data) }));
}
async markAsSynced(id: string) {
await this.db.runAsync(
`UPDATE items SET synced = 1 WHERE id = ?`,
[id]
);
}
async clearAll() {
await this.db.runAsync(`DELETE FROM items`);
}
}
export const offlineStorage = new OfflineStorage();
Output: Native integrations configured with proper permissions and fallbacks.
Goal: Configure builds, write tests, and prepare app store assets.
// eas.json
{
"cli": {
"version": ">= 5.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"ios": {
"simulator": false,
"enterprise": false
},
"android": {
"buildType": "apk"
}
},
"production": {
"ios": {
"simulator": false,
"enterprise": false
},
"android": {
"buildType": "app-bundle"
}
}
}
}
| Asset | iOS | Android |
|---|---|---|
| App Icon | 1024×1024 PNG (no alpha) | 512×512 PNG (32-bit) |
| Screenshots | 6.7", 6.1", 5.5" each | Phone, 7", 10" tablet |
| Description | 4000 chars max | 4000 chars max |
| Keywords | 100 chars | N/A |
| Privacy Policy | Required URL | Required URL |
| Support URL | Required URL | Required URL |
# Cold start < 2 seconds
# Navigation transitions at 60fps
# List scrolling at 60fps
# Bundle size < 30MB (iOS), < 20MB (Android)
# Memory < 200MB
# Verify with:
npx react-native bundle \
--platform ios \
--dev false \
--entry-file index.js \
--bundle-output ios/main.jsbundle \
--assets-dest ios
# Check bundle size
du -sh ios/main.jsbundle
| Mistake | Fix |
|---|---|
| Web CSS patterns in mobile | Use StyleSheet, flexbox, numbers only |
| Ignoring network errors | Show offline state, retry, background sync |
| Ignoring platform UX | Platform.select for iOS/Android differences |
| Giant FlatList without optimization | FlashList, getItemLayout, keyExtractor |
| Storing tokens in AsyncStorage | SecureStore (Keychain/Keystore) |
| Not testing on real devices | Test on physical iOS and Android devices |
| Hardcoded dimensions | Responsive units, test with accessibility font scaling |
| Missing splash screen | Configure native splash with brand colors |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mobile-development, react-native, expo, flutter, ios, android, app-store-deployment
93 skills in this plugin
/3d-spatial-engineerUse for 3D spatial layouts, scene-graph coordinate transforms, greybox blockouts, culling volumes, static batching, and LOD optimization across 3D game engines./accessibility-engineerUse for web WCAG 2.1/2.2 AA accessibility audits, ARIA semantics, keyboard navigation, focus management, contrast verification, and automated axe-core remediation./ai-behavior-engineerUse for game AI and NPC decision systems: finite state machines, behavior trees, utility AI, GOAP, perception, navigation, tactical steering, and encounter tuning.npx claudepluginhub buiphucminhtam/forgewright --plugin forgewrightOther plugins' skills for the same job