Skip to main content

implement-web-push-notifications

Implement web push with contextual permission, secure subscriptions, user controls, safe delivery, and lifecycle cleanup. Use when timely browser notifications provide clear value after the user leaves a site.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
3
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
implement-web-push-notifications
category
web
description
Implement web push with contextual permission, secure subscriptions, user controls, safe delivery, and lifecycle cleanup. Use when timely browser notifications provide clear value after the user leaves a site.
# implement-web-push-notifications Earn permission and make it easy to withdraw. ## When to use - Use for user-requested alerts whose value cannot be met reliably in the open page or by a less intrusive channel. - Do not prompt on first visit or disguise the browser permission dialog. ## Procedure 1. Define notification purposes, recipients, urgency, frequency, quiet behavior, sensitive-content rules, and success measures. 2. Explain value in context and ask only after a meaningful user action. Record consent separately from the browser's technical permission. 3. Register a scoped service worker and create a subscription with current application-server keys. 4. Bind the subscription to the correct account, device context, topics, locale, and preference version without treating an endpoint as identity. 5. Store endpoints and keys as sensitive data; authorize all preference and send operations. 6. Keep payloads minimal, avoid sensitive lock-screen content, use safe destinations, and implement notification click and close behavior. 7. Handle expired, replaced, denied, and invalid subscriptions from push-service responses. 8. Reconcile logout, shared devices, account deletion, topic changes, and key rotation with server-side subscription removal. 9. Rate limit, deduplicate, honor quiet choices, and provide an in-product notification history when loss matters. 10. Test supported browsers, installed and non-installed states, offline delivery, duplicate events, revoked permission, multiple accounts, shared devices, click navigation, and inaccessible content. ## Failure plan - Stop sending to invalid or unowned subscriptions and remove them through a recorded cleanup path. - If notification delivery is not guaranteed, keep critical state available in the product and do not use push as the sole control. ## Done - A push design records purpose, permission timing, data handling, preferences, delivery behavior, and lifecycle events - Cross-browser tests verify opt-in, send, display, click, failure, revocation, logout, and deletion behavior - An operations report proves invalid endpoints are removed, sensitive content is protected, and users can inspect and change preferences
GitHub에서 보기