muratcakmak/shipwright/push-notifications

Claude Code and agent skill by muratcakmak/shipwright

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Set up push notifications for a React Native iOS app using expo-notifications. Configures APNs, permission flows with provisional auth, foreground/background/quit handling, and notification categories with actions.

Install

npx vskill@latest install muratcakmak/shipwright/push-notifications

SKILL.md

The same SKILL.md was published earlier as muratcakmak/shipwright/push-notifications.

Push Notifications

Set up iOS push notifications for this React Native app.

MANDATORY PREPARATION

  1. Read Shipwright Context from CLAUDE.md
  2. Check if `expo-notifications` is installed in package.json
  3. Check `app.json` for existing notification config

SETUP

Step 1: Install
bash
npx expo install expo-notifications expo-device expo-constants
Step 2: Configure (app.json)
json
{
"expo": {
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/notification-icon.png",
"color": "#ffffff",
"sounds": ["./assets/notification-sound.wav"]
}
]
],
"ios": {
"bundleIdentifier": "com.example.myapp"
}
}
}
Step 3: Permission Flow
typescript
import * as Notifications from 'expo-notifications';
import * as Device from 'expo-device';
async function registerForPushNotifications() {
if (!Device.isDevice) {
// Push notifications don't work on simulator
return null;
}
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
// iOS 12+ supports provisional authorization (delivers quietly)
const { status } = await Notifications.requestPermissionsAsync({
ios: {
allowAlert: true,
allowBadge: true,
allowSound: true,
allowProvisional: true, // Delivers to Notification Center without prompting
},
});
finalStatus = status;
}
if (finalStatus !== 'granted') {
return null;
}
const token = await Notifications.getExpoPushTokenAsync({
projectId: Constants.expoConfig?.extra?.eas?.projectId,
});
return token.data;
}
Step 4: Notification Handlers
typescript
// Set how notifications are handled when app is in foreground
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: true,
}),
});
// Listen for notifications received while app is foregrounded
const notificationListener = Notifications.addNotificationReceivedListener(
(notification) => {
// Handle foreground notification
}
);
// Listen for notification taps (works for foreground, background, and quit states)
const responseListener = Notifications.addNotificationResponseReceivedListener(
(response) => {
const data = response.notification.request.content.data;
// Navigate to relevant screen based on data
}
);
// Cleanup
return () => {
notificationListener.remove();
responseListener.remove();
};
Step 5: Notification Categories (Actionable Notifications)
typescript
Notifications.setNotificationCategoryAsync('message', [
{
identifier: 'reply',
buttonTitle: 'Reply',
options: { opensAppToForeground: false },
textInput: { submitButtonTitle: 'Send', placeholder: 'Type a reply...' },
},
{
identifier: 'markRead',
buttonTitle: 'Mark as Read',
options: { opensAppToForeground: false },
},
]);
Step 6: Badge Management
typescript
// Set badge count
await Notifications.setBadgeCountAsync(5);
// Clear badge
await Notifications.setBadgeCountAsync(0);
// Clear all delivered notifications
await Notifications.dismissAllNotificationsAsync();

TESTING

Push notifications don't work on the iOS Simulator. For testing:

  1. Local notifications (work on simulator):
typescript
await Notifications.scheduleNotificationAsync({
content: {
title: 'Test Notification',
body: 'This is a test',
data: { screen: 'product', id: '123' },
categoryIdentifier: 'message',
},
trigger: { seconds: 5 },
});
  1. Remote notifications: Use a physical device with EAS Build dev client

CHECKLIST

  • [ ] expo-notifications installed and configured
  • [ ] Permission flow implemented with provisional auth
  • [ ] Push token retrieval and server registration
  • [ ] Foreground notification handler configured
  • [ ] Notification tap handler with deep navigation
  • [ ] Notification categories defined (if actionable)
  • [ ] Badge management implemented
  • [ ] Local notification testing verified
  • [ ] Clean up listeners on unmount

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/muratcakmak/shipwright/push-notifications/badge)](https://verified-skill.com/skills/muratcakmak/shipwright/push-notifications)

Something wrong with this skill or its page? Tell us.