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

/notifications

@eb9f097
Run it yourself

Handle push and local notifications, permission timing, tap routing, and payload privacy. Use when adding notifications, handling a tap, or reviewing background delivery.

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈46 tokens for metadata: the name and description. ≈760 when used: this file.

Description uses 2.3% 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 ≈186 characters, or 2.3%.

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.

Notifications Skill

Applicability

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

When to Use

  • Registering for push or scheduling a local notification
  • Handling a tap that opens a screen from the background or a killed app
  • Reviewing what the payload contains and when permission is requested

Permission prompts in general belong to native-integration. Whether a deep link target is allowed belongs to security.

Severity

  • Merge-blocking: the payload can navigate to an arbitrary screen, or the background handler is registered inside a component.
  • Should-fix: channel names and when the permission prompt appears.

Guidance

Permission and registration

  • Notification permission is requested when the user asks for alerts, not at first launch
  • Denied and revoked states skip registration and do not loop the prompt
  • The device token is sent to the server after it changes, and removed from the server on sign-out

Delivery

The background handler is registered from the application entry file, not from inside a component. Cold-start order (restore the session, then consume the tap once) is owned by architecture.

  • The background handler is registered at startup, outside the React tree
  • Foreground, background, and killed-app taps all open the same destination
  • The destination is one of the allowed routes (see security)
  • A tap that arrives before navigation is ready is stored and consumed once
  • Android channels exist for the categories the user can tell apart; iOS uses a purpose the user can understand

Incorrect:

function onNotification(remoteMessage) {
  navigation.navigate(remoteMessage.data.screen, remoteMessage.data);
}

Correct:

function onNotification(remoteMessage) {
  const route = parseNotificationRoute(remoteMessage.data);
  if (!route) return;
  navigation.navigate(route.name, route.params);
}

Privacy

  • The visible title and body, and the data payload, contain no payment data, tokens, or more personal detail than the user needs to recognise the alert
  • Marketing or non-essential alerts are not scheduled when consent is off (see security)

Anti-Patterns

Anti-Pattern Risk Fix
Navigating from the raw payload Opens an arbitrary screen or crashes on a missing param Parse into a fixed set of routes
Registering a new token without deleting the old one on logout The previous user receives the next user's alerts Delete the token server-side on sign-out

Pitfalls

  • A killed-app tap is delivered on the next cold start, before navigation exists. Store it and consume it after the session is restored.
  • Background delivery limits differ by platform; a handler that does network work can be suspended before it finishes.

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 security and architectural best practices for handling mobile notifications in React Native. It focuses on preventing vulnerabilities by validating notification payloads and protecting user privacy by excluding sensitive data from alerts. No malicious code, commands, or obfuscation 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",
  "notifications",
  "push"
]

README badge

README badge for neha/rn-developer-skills/notifications