← Back to list

push-notifications
by timequity
Claude Code plugins for developers
⭐ 2🍴 0📅 Jan 24, 2026
SKILL.md
name: push-notifications description: Firebase Cloud Messaging and Apple Push Notification Service setup.
Push Notifications
Expo Notifications
npx expo install expo-notifications expo-device
import * as Notifications from 'expo-notifications';
import * as Device from 'expo-device';
// Configure
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: true,
}),
});
// Request permission
async function registerForPushNotifications() {
if (!Device.isDevice) return null;
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
if (finalStatus !== 'granted') return null;
const token = await Notifications.getExpoPushTokenAsync({
projectId: 'your-project-id',
});
return token.data;
}
Handle Notifications
// Foreground
useEffect(() => {
const subscription = Notifications.addNotificationReceivedListener(
(notification) => {
console.log('Received:', notification);
}
);
return () => subscription.remove();
}, []);
// Tap response
useEffect(() => {
const subscription = Notifications.addNotificationResponseReceivedListener(
(response) => {
const data = response.notification.request.content.data;
// Navigate based on data
navigation.navigate(data.screen, data.params);
}
);
return () => subscription.remove();
}, []);
Backend Integration
// Send from server
await fetch('https://exp.host/--/api/v2/push/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
to: expoPushToken,
title: 'New message',
body: 'You have a new message',
data: { screen: 'Chat', chatId: '123' },
}),
});
Firebase (bare workflow)
import messaging from '@react-native-firebase/messaging';
// Get FCM token
const fcmToken = await messaging().getToken();
// Background handler
messaging().setBackgroundMessageHandler(async (message) => {
console.log('Background message:', message);
});
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon