- Home
- Skills
- Mobile Development
- react native clean architecture
react native clean architecture
Architect and build production-ready React Native apps using a domain-driven Clean Architecture.
Free
Works with the AI Agents you already use
react native clean architecture
Example session with this skill installed
Create a new domain for 'Weather' that fetches data from an API and uses geolocation. Follow the clean architecture structure.
- Read your context and instructions
- Compiled the react native clean
- Generated the UI component
I have created the Weather domain following the Clean Architecture contract. This includes a native geolocation adapter in shared, a weather service in domains, and the UI composition in app.
Weather Domain Implementation
src/shared/native/location.ts
import * as Location from 'expo-location';
export const getCurrentPosition = async () => {
const { status } = await Location.requestForegroundPermissionsAsync();
if (status !== 'granted') {
throw new Error('Permission to access location was denied');
}
return await Location.getCurrentPositionAsync({});
};
src/domains/weather/services/weatherService.ts
import { getCurrentPosition } from '@/shared/native/location';
export interface WeatherData {
temp: number;
condition: string;
}
export const fetchLocalWeather = async (): Promise<WeatherData> => {
const pos = await getCurrentPosition();
const response = await fetch(`https://api.example.com/weather?lat=${pos.coords.latitude}&lon=${pos.coords.longitude}`);
if (!response.ok) throw new Error('Weather API failure');
return response.json();
};
src/domains/weather/components/WeatherCard.tsx
import React from 'react';
import { View, Text } from 'react-native';
import { useQuery } from '@tanstack/react-query';
import { fetchLocalWeather } from '../services/weatherService';
export const WeatherCard = () => {
const { data, isLoading, error } = useQuery({
queryKey: ['weather'],
queryFn: fetchLocalWeather
});
if (isLoading) return <Text>Loading weather...</Text>;
if (error) return <Text>Error loading weather</Text>;
return (
<View className="p-4 bg-blue-100 rounded-lg">
<Text className="text-xl font-bold">{data?.temp}°C</Text>
<Text>{data?.condition}</Text>
</View>
);
};
Next steps
- Add
expo-locationto your dependencies usingnpx expo install. - Register the
WeatherCardin yoursrc/app/(tabs)/index.tsxlayout. - Configure the
Locationpermissions in yourapp.jsonfor iOS and Android.
WeatherCard.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Mobile applications often devolve into a "spaghetti" of mixed concerns where UI components handle API calls, business logic, and native device permissions. This skill enforces a strict Clean Architecture for React Native and Expo projects, separating responsibilities into domain-driven folders to ensure long-term maintainability.
What it does
- Enforces architectural boundaries by organizing code into
src/app,src/domains, andsrc/sharedto isolate business logic from UI and infrastructure. - Manages native integrations for geolocation, biometrics, camera, and notifications through platform-aware adapters that handle iOS and Android differences.
- Standardizes state and data using proven patterns with TanStack Query, Zustand, and React Hook Form without over-engineering simple features.
- Automates environment audits by checking Expo SDK versions, native module compatibility, and project configurations like
app.jsonoreas.json. - Guides deployment workflows including EAS Build, App Store/Google Play submission, and OTA update configurations.
How it works
- Inspection. The agent scans your
package.json,app.json, and directory tree to identify the Expo SDK version and navigation setup. - Classification. It determines if the task is a new project, a feature addition, a native integration, or a structural refactor.
- Implementation. It writes functional code across the domain layers, including UI, hooks, and native adapters with proper error and permission handling.
- Validation. It runs
expo-doctor, type checks, and linting to ensure the new code doesn't break the build or violate architectural constraints.
Frameworks & tools
React Native, Expo SDK (including Expo Router and CNG), TypeScript, TanStack Query, Zustand, React Hook Form, Zod, and EAS.
Why this beats prompting it yourself
Generic prompts often result in flat folder structures or logic-heavy components that are hard to test. This skill follows a rigorous domain-functional-responsibility hierarchy that prevents secrets from leaking into logs and keeps your app ready for native prebuilds and automated testing.
Use cases
- Scaffold a new Expo project with strict TypeScript and domain-based folder structures.
- Add a secure biometric authentication flow with proper platform-specific fallbacks.
- Refactor a bloated component by extracting business logic into domain services and shared native adapters.
- Prepare and audit a project for EAS production builds and store submission.
Known limitations
Does not perform live execution on physical devices or simulators. It cannot access .env files, keystores, or private credentials for security reasons.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Mobile Development.
No live execution on physical devices. Cannot access .env files, keystores, or private credentials. Skips rewriting functional code unless explicitly requested.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Mac only
- Software
- expo
Node.jscreate-expo-moduleexpo-doctortscjestinstall-expo-modulesuri-schememadgecreate-expo-app
Permissions
Allowed Hosts