소스 정보
- 저장소
- ffsshhttiikk/opencode-agents-skills
- 최근 소스 활동
- 2026년 2월 28일 22:53
- 감지된 SKILL.md 언어
- 영어
- 스타
- 2
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill push-notifications명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | push-notifications |
| description | Mobile push notification implementation and management |
| category | mobile-development |
| difficulty | intermediate |
| tags | ["mobile","notifications","firebase","apns"] |
| author | OpenCode Community |
| version | 1 |
| last_updated | 2024-01-15T00:00:00.000Z |
I am Push Notifications, a system for delivering time-sensitive messages to mobile devices even when the app is not running. I enable apps to re-engage users with relevant content, alerts, and updates through APNs (Apple Push Notification service) on iOS and Firebase Cloud Messaging on Android. I handle device token registration, notification payload construction, and delivery management. I support rich notifications with images, actions, and custom UI. I integrate with backend services for targeted messaging based on user behavior, demographics, or segments. I provide analytics on delivery rates, open rates, and user engagement. I respect user preferences and permission models, allowing users to opt in or out of notification categories.
Device Tokens: Unique identifiers for each app installation, used to route notifications to specific devices.
Notification Payload: JSON structure containing notification content and configuration options.
Notification Categories: User-configurable groupings for notification preferences.
Rich Notifications: Notifications with images, videos, and custom UI extensions.
Silent Notifications: Background notifications without user-facing alerts for data sync.
Action Buttons: Custom actions from notifications (reply, acknowledge, open).
Local vs Remote: Local notifications scheduled within the app vs remote notifications from servers.
// notification-service.ts
import messaging from '@react-native-firebase/messaging'
import { Permissions, Platform } from 'react-native'
class NotificationService {
async requestPermission(): Promise<boolean> {
try {
const authStatus = await messaging().requestPermission()
const enabled =
authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
authStatus === messaging.AuthorizationStatus.PROVISIONAL
if (enabled) {
console.log('Push notification permission granted')
return true
}
console.log('Push notification permission denied')
return false
} catch (error) {
console.error('Permission request error:', error)
return false
}
}
async getDeviceToken(): Promise<string | null> {
{
hasPermission = .()
(!hasPermission) {
.()
}
token = ().()
.(, token)
token
} (error) {
.(, error)
}
}
(): <> {
authStatus = ().()
(
authStatus === messaging.. ||
authStatus === messaging..
)
}
(: ): <> {
{
().(topic)
.()
} (error) {
.(, error)
}
}
(: ): <> {
{
().(topic)
.()
} (error) {
.(, error)
}
}
}
notificationService = ()
// notification-handler.ts
import messaging from '@react-native-firebase/messaging'
import { AppRegistry } from 'react-native'
import { navigationRef } from './navigation'
class NotificationHandler {
initialize(): void {
// Foreground notification listener
messaging().onMessage(async (remoteMessage) => {
console.log('Foreground notification received:', remoteMessage)
this.showLocalNotification(remoteMessage)
})
// Background notification handler
messaging().setBackgroundMessageHandler(async (remoteMessage) => {
console.log('Background notification received:', remoteMessage)
this.handleBackgroundNotification(remoteMessage)
})
// Notification opened app from quit state
messaging().getInitialNotification().then((remoteMessage) => {
if (remoteMessage) {
console.log('App opened from notification:', remoteMessage)
.(remoteMessage)
}
})
().( {
.(, remoteMessage)
.(remoteMessage)
})
}
(: messaging.): {
: = {
: remoteMessage. || .().(),
: remoteMessage.?. || ,
: remoteMessage.?. || ,
: remoteMessage.,
}
}
(: messaging.): {
(remoteMessage.?. === ) {
.(remoteMessage.)
}
}
(: messaging.): {
{ screen, params } = .(remoteMessage.)
(navigationRef.()) {
navigationRef.(screen, params)
}
}
(: <, >): { : ; : } {
screen = data?. ||
params = { ...data }
params.
{ screen, params }
}
(: <, >): {
.(, data)
}
}
notificationHandler = ()
// notification-service.ts
import admin from 'firebase-admin'
interface NotificationPayload {
token: string
title: string
body: string
data?: Record<string, string>
imageUrl?: string
actions?: NotificationAction[]
channelId?: string
priority?: 'high' | 'normal'
ttl?: number
}
interface NotificationAction {
action: string
title: string
icon?: string
foreground?: boolean
authenticationRequired?: boolean
}
class FirebaseNotificationService {
private admin: admin.app.App
constructor() {
this.admin = admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
})
}
(: ): <> {
: admin.. = {
: payload.,
: {
: payload.,
: payload.,
: payload.,
},
: payload. || {},
: {
: payload. === ? : ,
: {
: payload. || ,
: ,
: ,
},
},
: {
: {
: {
: ,
: payload.?. ? : ,
},
},
: {
: payload.,
},
},
}
(payload. && payload.. > ) {
message.!.!. = payload..( ({
: action.,
: action.,
: action.,
...(action. && { : }),
}))
message.!.!.!. =
}
{
response = ..().(message)
.(, response)
response
} (error) {
.(, error)
error
}
}
(
: [],
: ,
: ,
?: <, >
): <admin..> {
: admin.. = {
tokens,
: { title, body },
: data || {},
}
..().(message)
}
(
: ,
: ,
: ,
?: <, >
): <> {
: admin.. = {
topic,
: { title, body },
: data || {},
}
..().(message)
}
}
firebaseNotificationService = ()
// NotificationCategories.swift
import UserNotifications
struct NotificationCategory {
static let messages = "MESSAGES"
static let orders = "ORDERS"
static let reminders = "REMINDERS"
}
struct NotificationAction {
static let reply = "REPLY_ACTION"
static let view = "VIEW_ACTION"
static let dismiss = "DISMISS_ACTION"
static let accept = "ACCEPT_ACTION"
static let decline = "DECLINE_ACTION"
}
class NotificationManager {
static let shared = NotificationManager()
private init() {}
func registerCategories() {
let messagesCategory = UNNotificationCategory(
identifier: NotificationCategory.messages,
actions: [
(
identifier: .reply,
title: ,
options: [.foreground]
),
(
identifier: .view,
title: ,
options: [.foreground]
),
(
identifier: .dismiss,
title: ,
options: [.destructive]
)
],
intentIdentifiers: [],
options: []
)
ordersCategory (
identifier: .orders,
actions: [
(
identifier: .view,
title: ,
options: [.foreground]
),
(
identifier: .dismiss,
title: ,
options: [.destructive]
)
],
intentIdentifiers: [],
options: []
)
remindersCategory (
identifier: .reminders,
actions: [
(
identifier: .accept,
title: ,
options: [.foreground]
),
(
identifier: .decline,
title: ,
options: [.destructive]
)
],
intentIdentifiers: [],
options: []
)
.current().setNotificationCategories([
messagesCategory,
ordersCategory,
remindersCategory
])
}
}
// local-notifications.ts
import PushNotification from 'react-native-push-notification'
class LocalNotificationService {
configure(): void {
PushNotification.configure({
onRegister: (token) => {
console.log('Local notification token:', token)
},
onNotification: (notification) => {
console.log('Local notification received:', notification)
this.handleNotificationAction(notification)
},
onAction: (notification) => {
console.log('Notification action:', notification.action)
this.handleNotificationAction(notification)
},
permissions: {
alert: true,
badge: true,
sound: true,
},
popInitialNotification: true,
requestPermissions: true,
})
}
createChannel(): void {
.(
{
: ,
: ,
: ,
: ,
: ,
: ,
},
.()
)
.(
{
: ,
: ,
: ,
: ,
: ,
: ,
},
.()
)
}
(
: ,
: ,
: ,
: ,
?:
): {
.({
id,
title,
: body,
date,
: ,
: ,
: data || {},
: ,
: ,
})
}
(
: ,
: ,
: ,
?:
): {
.({
: id,
: title,
: body,
: ,
: ,
: data || {},
})
}
(: ): {
.(id)
}
(): {
.()
}
(: ): {
.(count)
}
(: ): {
(notification. === ) {
.(notification)
} (notification. === ) {
.(notification)
}
}
(: ): {
.(, notification.?.)
}
(: ): {
{ screen, params } = .(notification.)
}
}
localNotificationService = ()