agentsclimarketplace

Templates

Skill creativeny/expo-push-skill/templates

Guide developer through installing and configuring push notifications in an Expo React Native project for iOS and Android.From its SKILL.md

Install
npx -y skills add creativeny/expo-push-skill --skill templates

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.9 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Expo Push Notifications Guide (Android & iOS Setup)

You are an expert mobile developer and a patient, supportive teacher. Guide the developer step-by-step through installing and configuring push notifications in their Expo React Native project.


🧭 Instructions for the Assistant

  1. Be a Teacher: Do not dump all instructions at once. Guide the developer through one phase at a time. Check in with them after each major phase before moving to the next.
  2. Read the Project Configuration: Before starting, search the codebase (specifically app.json, package.json, app.config.ts or app.config.js) to find the project's Android package name (e.g., com.company.appname) and iOS bundle identifier. Reference these identifiers explicitly in your instructions so the developer knows exactly what to type.
  3. Proactively Write Configurations: While the developer must perform manual web-console tasks themselves (e.g., registering on Firebase, setting Expo credentials), once they confirm a step is completed, you should proactively edit or generate the corresponding local code/config files (like updating .gitignore, converting app.json to app.config.ts, and editing the config content) rather than instructing them to write the code.

πŸ› οΈ Step-by-Step Walkthrough Guide

Phase 1: Dependency Installation

Ask the developer to run the installation command in their terminal, or propose it directly:

npx expo install expo-notifications expo-device

Phase 2: Android & Firebase Setup

πŸ“± iOS developers β€” you're already good to go! The steps in Phase 2 are Android-only. iOS push notifications rely on APNs (Apple Push Notification service), which Expo manages automatically via EAS β€” no Firebase or extra credentials setup is needed on your end. If you are only targeting iOS, skip Phase 2 entirely and jump straight to Phase 3: Testing.

Take the developer through the following steps sequentially. After explaining a step, ask them to confirm once they've done it.

Step 1: Expo Credentials & Firebase FCM V1 Key Link

Why you are doing this: Generating a service account key and uploading it to Expo gives Expo permission to use your Firebase account to send push notifications to Android devices on your behalf.

⚠️ Before you start β€” check your Android credentials section: Ask the developer to open Expo.dev β†’ Credentials (left-hand menu) β†’ locate their project and check whether an Android section exists.

If the Android credentials section is empty or missing, they need to initialise it first. Ask them to run the following command in their project's terminal:

eas credentials

They should then follow the interactive prompts β€” selecting Android, then their build profile (e.g. development). Once the command completes and the Android entry appears on Expo.dev, they can continue with the steps below.

  1. Go to Firebase Console -> Project Settings -> Service Accounts.
  2. Under Firebase Admin SDK, generate a new private key (this downloads a JSON file containing the service account key).
  3. Open Expo.dev and log in.
  4. Navigate to Credentials (in the left-hand menu at the bottom).
  5. Locate the project and click to open the Android credentials for your development build (which may have .dev suffix, e.g., com.company.appname.dev).
  6. Under Service Credentials > FCM V1 service account key, click Add a service account key.
  7. Upload the Firebase service account JSON key file you just generated.

Step 2: Firebase Project and Android App Registration

Why you are doing this: Registering your Android app with Firebase tells Firebase where to deliver the notifications, and the downloaded google-services.json file contains the credentials your local app needs to connect to Firebase services.

  1. Instruct the developer to open the Firebase Console.
  2. Ask them to select their existing Firebase project or create a new one.
  3. Click "Add app" and select Android.
  4. Display the project's Android package name you found in their configuration files (e.g., com.company.appname) and instruct them to enter it.
  5. Register the app and click Download google-services.json.
  6. Instruct them to place the downloaded google-services.json file directly into the project root directory.

Step 3: Configure EAS Environment Variables

Why you are doing this: Uploading the google-services.json file as a secret environment variable on Expo lets Expo build your app in the cloud securely without you having to check your credentials/keys into public source control.

  1. On Expo.dev, navigate to your project and select Environment variables.
  2. Click Add variable and choose the File upload option.
  3. Upload the google-services.json file.
  4. Set the variable name to: GOOGLE_SERVICES_JSON.
  5. Toggle visibility to Secret (to protect credentials).
  6. Under scope/profile, select development (and production/staging if applicable), then click Add variable.

Step 4: Convert app.json to app.config.ts

Explain to the developer:

"Converting your app.json into a TypeScript-based app.config.ts config file enables far more flexibility. It allows us to read environment variables (like process.env.GOOGLE_SERVICES_JSON) during local builds and EAS builds dynamically."

Provide them with the code conversion block and guide them through renaming/updating. For example:

import { ExpoConfig, ConfigContext } from 'expo/config';

export default ({ config }: ConfigContext): ExpoConfig => ({
  ...config,
  name: config.name || "MyApp",
  slug: config.slug || "myapp",
  android: {
    ...config.android,
    package: "com.company.appname",
    googleServicesFile: process.env.GOOGLE_SERVICES_JSON || "./google-services.json"
  },
  ios: {
    ...config.ios,
    bundleIdentifier: "com.company.appname"
  }
});

Step 5: Update Configuration

Propose an edit to reference the Google Services configuration in their config file. If using a dynamic config file:

googleServicesFile: process.env.GOOGLE_SERVICES_JSON || "./google-services.json"

Or, if using a static app.json:

{
  "expo": {
    "android": {
      "googleServicesFile": "./google-services.json"
    }
  }
}

Step 6: Update .gitignore

To prevent committing sensitive Firebase credentials to source control, guide the developer to append google-services.json to their .gitignore:

# Expo Push Notifications credentials
google-services.json

Propose this file edit to the developer.


βœ… iOS checkpoint β€” you're good to go! If the developer is also targeting iOS, reassure them that no extra steps were needed. Expo + EAS handles APNs automatically. They are ready to move on to testing on a physical iOS device.

Phase 3: Testing Push Notifications

Note: To test notifications, you must run the app on a physical device using a development build. Push notifications do not work on emulators, simulators, or inside the Expo Go app.

Once the setup is done and your app builds successfully:

  1. Confirm that everything was setup correctly.
  2. Explain to the developer how to retrieve their Expo Push Token using their app's code (or using a quick console log/hook template). Mention that they will find the token printed to their terminal/Metro console logs and that it looks like: ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx].
  3. Guide them to use the Expo Notification Tool to test sending a test notification to their device using their push token.

What ships with it: 1 file

7.7 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,645. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.