Index of every page on this site: llms.txt
All skills
neha avatar

/native-integration

@eb9f097
Run it yourself

Review React Native native-module, permission, and background-task work. Use when integrating platform APIs, camera, biometrics, files, or reviewing a bridge or Turbo Module boundary.

Use this Skill: https://skilld.dev/gh/neha/rn-developer-skills/native-integration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈51 tokens for metadata: the name and description. ≈1k when used: this file.

Description uses 2.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈204 characters, or 2.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Native Integration Skill

Applicability

  • Platforms: iOS and Android
  • React Native: 0.76+ (New Architecture interop assumed unless a checklist item says otherwise)

When to Use

  • Integrating a native module, Turbo Module, or platform API
  • Requesting permissions, or handling camera, biometrics, files, or location
  • Adding a background task or a native listener
  • Reviewing a change that crosses the JavaScript and native boundary

Severity

  • Merge-blocking: a permission prompt this diff adds loops after denial, or a listener this diff adds is not removed on unmount.
  • Should-fix: usage-string wording and when the prompt appears, as long as denial does not crash.

Guidance

Permissions

This skill owns when the prompt is shown and what denial looks like. Analytics consent is owned by security.

  • Permission is requested at the moment of use, not on app launch or screen mount
  • Denied, restricted, and revoked states have a path that does not crash or loop the prompt
  • The user can continue without the permission, or is told what is blocked and how to enable it in Settings
  • iOS usage strings explain the specific purpose; Android declares only the permissions the feature uses

Incorrect:

useEffect(() => {
  requestCameraPermission();
}, []);

Correct:

async function onTakePhoto() {
  const status = await getCameraPermission();
  if (status === 'denied') {
    const next = await requestCameraPermission();
    if (next !== 'granted') {
      setNeedsSettings(true);
      return;
    }
  }
  if (status === 'blocked') {
    setNeedsSettings(true);
    return;
  }
  await openCamera();
}

Native boundary

  • The JavaScript API returns a result or a typed error; it does not throw an unstructured native exception into the screen
  • A missing or old native implementation has a fallback (hide the feature, or use a supported path)
  • Values crossing the bridge are serialisable; functions, class instances, and cyclic objects are not passed through
  • Platform differences are explicit (Platform.OS or separate files), not assumed to match
  • New Architecture interop is used when the app is on the New Architecture; the old bridge is not added for a new module without a reason

Lifecycle

  • Native listeners, sensors, and subscriptions are removed on unmount
  • Background work respects OS limits (time, network, and user-visible purpose) and can be cancelled
  • Work that must finish (upload, payment) is confirmed on the server, not only by a native callback
  • Native UI that presents a modal or activity restores the React Native screen when it dismisses

Anti-Patterns

Anti-Pattern Risk Fix
Requesting permission in useEffect on mount Prompt before the user understands why; denial with no recovery Request from the action that needs it, and handle denial
Treating "granted once" as permanent Revoked or limited permission crashes the next call Check status before every use
Passing a JS callback object into native and never removing it Leak and calls after unmount Subscribe with a cleanup function
Swallowing native errors as catch {} The screen looks idle while the feature failed Surface a typed error and a retry or fallback

Pitfalls

  • Android may deliver a permission result after the activity restarts. Do not assume the component that called request is still mounted.
  • iOS limited photo access is not the same as full access. Handle the limited set instead of treating it as denied or granted.
  • Biometric success proves the device unlocked a key; it does not by itself prove the server accepted the user. Confirm the session server-side.
  • A native module that touches UI or sensors must run on the platform's main thread. A background-thread call can crash or silently drop the event.
  • File URIs from the camera or picker are often temporary. Copy what you must keep, and do not log the path if it contains user content.

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 alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides a set of guidelines and checklists for reviewing React Native native integrations, focusing on permissions, background tasks, and native module boundaries. It promotes secure and robust mobile development practices such as granular permission handling and server-side verification of biometrics. No security issues were detected.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

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

Last checked against GitHub last month.

Steadyupdated 2 months ago
version
1.1.0
platforms
[
  "ios",
  "android"
]
react-native-version
0.76+
Other metadata
tags
[
  "react-native",
  "native",
  "permissions",
  "turbo-modules"
]

README badge

README badge for neha/rn-developer-skills/native-integration