Setup React Native App
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold a new React Native app (New Architecture only, Cordova-free) on one of two toolchains, chosen with the
toolchain argument. expo runs create-expo-app’s `blank-typescript template (a managed Expo app); metro runs
the React Native Community CLI’s default TypeScript template (a bare app with committed android/ and ios/
projects). In both cases this catalog’s standard test, lint, build and Sonar tooling is layered on top using explicit
example templates kept in the skill’s reference/ directory.
Purpose
iru-setup-react-native-app bootstraps a React Native app’s scaffold plus its tooling, per toolchain:
-
Expo (
reference/expo-templates.md) — ajest-expo+@testing-library/react-nativetest setup, aneslint-config-expoflat config (generated bynpx expo lint), Prettier, aneas.jsonwithdevelopment/preview/productionbuild profiles, and anative-buildschoice (easorlocal). No committedios//android/folders; native projects are generated on demand (Continuous Native Generation). -
Metro (
reference/metro-templates.md) — the template’s committedandroid/(Gradle) andios/(Xcode
CocoaPods) projects, React Navigation instead of Expo Router, no EAS. The bundle identifier (app-id) is required up front, identity values the CLI gets wrong are fixed, the template’s@react-native/jest-preset,.eslintrc.jsand.prettierrc.jsare kept, and React Native Testing Library, lcov coverage with a safe-area mock, the sharedtest/coverage/lint/format/typecheckscripts and ESLint/Prettier ignores for native build output are added. The skill then builds both native projects (./gradlew assembleDebug, and on macOSbundle exec pod installplus a simulatorxcodebuild), marking whatever cannot run locally as unverified.
Both toolchains also get a Maestro smoke flow (.maestro/smoke.yaml), the catalog’s UI contract wiring (see Building user interfaces; templates in reference/ui-templates.md) and, when opted in,
sonar-project.properties (TypeScript only; native sources are excluded). Expo is also bundled with Metro under the
hood — the argument names the two toolchains a user actually chooses between. Only the reference file for the
resolved toolchain is loaded, plus reference/ui-templates.md for both. A project whose detected toolchain disagrees with the toolchain argument is warned
about and asked; the skill never converts an app between toolchains. For a Capacitor-based hybrid app,
Setup Ionic App is used instead.
The UI contract wiring is: .ui-quality.yml at the repository root (accessibility: enforce|report|off|none, directions, themes); eslint-plugin-react-native-a11y in the ESLint config at that level (React Native has no automated native contrast or touch-target audit, so the check is that lint plus the tests' role/label queries); a dev-only UI gallery (src/dev/ui-gallery/, reached by a <app-slug>://ui-gallery deep link and stripped from production bundles by DEV) with its Jest test; and the Maestro screenshot helper .maestro/subflows/ui-capture.yaml plus a capture flow for the root screen that writes .ui-screenshots/screen/App/default--<ltr|rtl>--<light|dark>--<platform>.png. On a new scaffold the entry file (index.ts or index.js) wraps the app with the gallery and the deep-link scheme is registered; on an existing app those edits are printed for the user instead.
Plugin
Shipped by the iru-react-native plugin of the ai-catalog marketplace (install with /plugin install iru-react-native@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved parameters passed by an orchestrating skill (e.g. Setup TypeScript Repository)
as newline-separated |
None — if absent or unrecognized, every field is asked interactively. |
|
Yes (unless supplied via |
|
None — asked, or detected from an existing |
app-name |
Yes (unless supplied via |
Display name: |
None |
app-slug |
No |
Kebab-case slug written to |
A slugified |
|
Required for |
Reverse-DNS bundle identifier / Android application id (e.g. |
Suggested from |
app-directory |
No |
Subdirectory to scaffold into (or |
Resolved |
license |
Yes (unless supplied via |
Resolved via |
None — user must choose |
developer-name / developer-email / organization-url |
Yes (unless supplied via |
Developer identity fields recorded in the report; no build file uses them directly. |
None |
open-source |
No |
Whether the repository is open source ( |
Asked first when invoked stand-alone |
sonar (+ sonar-organization/sonar-project-key/sonar-host-url) |
No |
Whether to wire up SonarQube/SonarCloud ( |
|
native-builds |
No (expo only) |
How native builds run: |
|
distribution |
No |
|
|
|
No |
|
|
|
No |
|
Resolved only when the |
|
No |
|
|
|
No |
|
|
|
No |
|
|
Outputs
-
A scaffolded app at
app-directory— Expo viacreate-expo-app@latest --template blank-typescript, or Metro via@react-native-community/cli@latest init(committedandroid/andios/projects, the template’s ownREADME.mdand.gitignoreinsideapp-directory) — or only the missing tooling files when gap-filling an existing scaffold. Application source is never touched. -
package.jsonmerged withtest/coverage/lint/format/typecheckscripts and this skill’s devDependencies (metro keeps the template’s own pins forjest,eslint8 andprettier2.8.8), withversion0.1.0-dev.0on new scaffolds. -
Expo:
jest.config.js, atsconfig.jsonmerge (types: ["jest"]),tests/App.test.tsx,eslint.config.js(generated bynpx expo lint),.prettierrc/.prettierignore, andeas.jsonwithdevelopment/preview/productionbuild profiles (plus asubmit.productionblock whendistribution: store). -
Metro: identity fix-ups (
package.jsonname, Gradle root project name, display names),jest.config.jsandjest.setup.js, a replacementtests/App.test.tsx,.eslintrc.jsignore patterns,.prettierignore, and a rootLICENSEonly whenapp-directoryis.. -
.maestro/smoke.yamlsmoke-test skeleton (both toolchains). -
UI contract files (both toolchains):
.ui-quality.yml,src/dev/ui-gallery/**(gallery host, registry and test),.maestro/config.yaml,.maestro/subflows/ui-capture.yamland.maestro/ui/App.yaml;eslint-plugin-react-native-a11yadded as a devDependency; for a new scaffold the gallery-wrapping entry file and the deep-link scheme (expo.schemefor Expo; Androidintent-filterand iOSCFBundleURLTypesfor Metro). Screenshots land in.ui-screenshots/when the Maestro capture flow runs. -
sonar-project.properties(only whensonaris notnone). -
Metro only: the outcome of each native verification —
./gradlew assembleDebug,bundle install,bundle exec pod installand the simulatorxcodebuild— each passed, failed or unverified locally. -
A report that opens by repeating the resolved toolchain and the announced mode (from scratch or updating an existing setup), the
accessibilitylevel and.ui-quality.ymlaction, whether the UI gallery is wired into the entry, the Maestro capture flow’s status (unverified without a simulator, emulator or debug build), lists per tooling file the action taken (created / updated / replaced / kept as is / removed) and each mismatch a kept artifact leaves with this run’s choices, thevisibilityused for Sonar and where it came from, unresolved<placeholder>values still needing manual fill-in (e.g.app.json’s bundle identifiers, the Maestro `<app-id>), and required warnings before building, committing, or submitting to a store.
Execution flow
Dependencies
Invokes
None — iru-setup-react-native-app is a leaf skill in the TypeScript/Node bootstrap pipeline; it does not call
any other skill in this catalog. Its Step 8 report mentions Check License,
Setup TypeScript Gitignore, and Setup TypeScript GitHub Workflows
as follow-up work for the user, but never invokes them itself.
Invoked by
-
Setup TypeScript Repository — Step 5, flavor react-native scaffold (forwarding
toolchain,app-idand the other shared inputs), via theiru-isolated-skill-executoragent.
Source
SKILL.md on GitHub — the file this page was generated from.