Index of every page on this site: llms.txt
All skills
Run it yourself

Best practices for integrating and using RNRepo — Software Mansion's infrastructure for pre-built React Native library artifacts that reduces native build times by up to 2×. Use when setting up, configuring, or troubleshooting RNRepo in a React Native or Expo project. Trigger on: 'RNRepo', 'rnrepo', 'slow builds', 'build times', 'prebuilt artifacts', 'prebuilt libraries', '@rnrepo/expo-config-plugin', '@rnrepo/build-tools', 'prebuilds-plugin', 'rnrepo.config.json', 'DISABLE_RNREPO', 'packages.rnrepo.org', 'Maven prebuild', 'CocoaPods prebuild', 'xcframework prebuild', 'prebuild AAR', 'build from source', 'native compilation slow', 'Gradle plugin slow', 'pod install slow', 'CI build times'.

Use this Skill: https://skilld.dev/gh/software-mansion-labs/skills/rnrepo

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesinstallation.md

≈816 tokens on demand. Your agent reads this file only when SKILL.md points to it.

RNRepo Installation

Prerequisites

  • React Native New Architecture enabled.
  • React Native version: 0.77.3, 0.78.3, 0.79.7, or >= 0.80.0.

Expo Prebuild (CNG)

For projects that use expo prebuild to generate native directories.

1. Install the plugin

npx expo install @rnrepo/expo-config-plugin

In a monorepo with hoisted node_modules, also install the build tools explicitly:

npx expo install @rnrepo/build-tools

2. Register in app.config.ts (or app.json / app.config.js)

{
  "expo": {
    "plugins": [
+     "@rnrepo/expo-config-plugin"
    ]
  }
}

3. Add .fingerprintignore (if using Expo Fingerprint / EAS)

**/.rnrepo-cache

That's it — run expo prebuild and the plugin configures both Android and iOS automatically.


Standard React Native (manual native folders)

1. Install build tools

npm install @rnrepo/build-tools@latest

2. Android — edit android/build.gradle

Add the RNRepo Gradle plugin to the buildscript.dependencies block:

buildscript {
  dependencies {
    // ... existing classpath entries
+   def rnrepoDir = new File(
+     providers.exec {
+       workingDir(rootDir)
+       commandLine("node", "--print", "require.resolve('@rnrepo/build-tools/package.json')")
+     }.standardOutput.asText.get().trim()
+   ).getParentFile().absolutePath
+   classpath fileTree(dir: "${rnrepoDir}/gradle-plugin/build/libs", include: ["prebuilds-plugin.jar"])
  }
}

3. Android — edit android/app/build.gradle

Apply the plugin after the existing apply plugin lines:

apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
+ apply plugin: "org.rnrepo.tools.prebuilds-plugin"

4. iOS — edit ios/Podfile

Add the require at the very top and a post_install hook inside your target:

+ require Pod::Executable.execute_command('node', ['-p',
+   'require.resolve(
+   "@rnrepo/build-tools/cocoapods-plugin/lib/plugin.rb",
+   {paths: [process.argv[1]]},
+ )', __dir__]).strip

# ... rest of Podfile

target 'YourProjectName' do
  post_install do |installer|
    # ... existing post_install hooks
+   rnrepo_post_install(installer)
  end
end

Verifying the setup

Android

Run npm run android and look for RNRepo log lines during Gradle preparation:

[📦 RNRepo] Found the following supported prebuilt packages:
📦 react-native-safe-area-context@5.7.0

If working: no compileDebugKotlin tasks for substituted packages.

iOS

Run a build and look for RNRepo log lines during pod install:

[📦 RNRepo] Total React Native dependencies detected: 1
[📦 RNRepo] ⬇ Downloaded from Maven...
[📦 RNRepo] • react-native-safe-area-context
[📦 RNRepo] Added build phase to <package-name>

If working: Xcode compiles only JSI glue code (e.g., safeareacontextJSI-generated.cpp), not library source files.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides standard documentation and installation guidelines for RNRepo, a React Native build optimization infrastructure by Software Mansion. It contains no executable code or security risks.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 43cde80. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 6 months ago

README badge

README badge for software-mansion-labs/skills/rnrepo