Skip to main content

Project rules & workflow

How to combine the installable skill with optional project rules so any coding agent (Cursor, Claude Code, Copilot, Windsurf, etc.) stays aligned with this library.

1. Install the skill​

Install once per machine or per repo — see Install the agent skill for your provider (-a cursor, -a claude-code, -a github-copilot, …).

npx skills add react-native-nitro-google-sign-in/google-signin -g -y

Restart your editor or agent after install.

2. Optional project rules​

Skills load automatically when relevant. Project rules add always-on hints for your repo (globs, stack, conventions). Use one or more of the formats below.

Shared rule content​

Copy these bullets into whichever file your tool supports:

- Use skill `react-native-nitro-google-signin` for setup, API, and troubleshooting.
- Package: `react-native-nitro-google-signin` + peer `react-native-nitro-modules`.
- Expo: development build only — not Expo Go.
- Android `webClientId: 'autoDetect'`: `google-services.json` + Google Services Gradle plugin + SHA-1.
- Android explicit `webClientId`: SHA-1 still required; JSON/Gradle optional.
- iOS: `REVERSED_CLIENT_ID` URL scheme required; `GoogleService-Info.plist` for `autoDetect`.
- iOS scene lifecycle: for UIKit scenes (`UISceneDelegate` or Expo `enableSceneSupport`), handle OAuth redirects in `SceneDelegate.swift`; for bare RN without scenes, recommend `GIDSignIn.sharedInstance.handle(url)` in `AppDelegate.swift`.
- Expo SDK 57 on iOS 27 / Xcode 27: configure `expo-build-properties` with `ios: { enableSceneSupport: true }` to resolve `UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption` crash on launch.
- After native dependency or config plugin changes: rebuild the app (Metro reload is not enough).
- iOS pods: `bundle exec pod install --project-directory="ios"` from app root.

Works with: Cursor, Claude Code, Copilot, Codex, and other agents that read repo-root agent files.

Add or extend AGENTS.md at your app root:

# App agent instructions

## Google Sign-In

- Use skill `react-native-nitro-google-signin` for setup and API.
- Expo: dev client only; not Expo Go.
- Android autoDetect: google-services.json + Google Services plugin.
- iOS: REVERSED_CLIENT_ID URL scheme; SceneDelegate / AppDelegate `handle(url)` when needed (SceneDelegate required if scene lifecycle is enabled).

This library’s own repo uses AGENTS.md for contributors.

3. Invoke in chat​

After the skill is installed, ask directly:

Add Google One Tap sign-in to this Expo app with webClientId autoDetect.

Or name the package — the skill description should trigger automatic use:

Use the react-native-nitro-google-signin skill to fix DEVELOPER_ERROR on Android.

More copy-paste prompts: Prompt templates.

4. MCP and other extensions​

Expo MCP (or similar) helps with prebuild and native project inspection. It does not replace:

  • Google Cloud OAuth clients and SHA-1
  • google-services.json / plist when using autoDetect
  • Rebuilding the dev client after plugin or native changes

See Expo setup.

5. After the agent edits native code​

bundle exec pod install --project-directory="ios"
bunx expo prebuild --clean # when Expo native config changed

Then rebuild and run the app — Metro reload alone is not enough for new native modules or Gradle changes.