capacitor-push-notifications
Guides the agent through setting up and using push notifications in Capacitor apps using Firebase Cloud Messaging via the @capacitor-firebase/messaging…
от capawesome-team★ 56 звёзд на GitHub
Установить capacitor-push-notifications в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Capacitor Push Notifications
Set up and use push notifications in Capacitor apps using Firebase Cloud Messaging (FCM) via the @capacitor-firebase/messaging plugin.
Prerequisites
- Capacitor 6, 7, or 8 app.
- Node.js and npm installed.
- A Firebase project. Create one at Firebase console if needed.
- For iOS: A paid Apple Developer Program membership and Xcode installed.
- For Android: Android Studio installed.
@capacitor/push-notificationsmust not be installed — it conflicts with@capacitor-firebase/messaging.
Agent Behavior
- Guide step-by-step. Walk the user through the process one step at a time. Never present multiple unrelated questions at once.
- Auto-detect before asking. Check the project for platforms (
android/,ios/), build tools, framework, andpackage.jsondependencies. Only ask the user when something cannot be detected. - One decision at a time. When a step requires user input, ask that single question, wait for the answer, then continue.
- Present clear options. Provide concrete choices (e.g., "Do you want to configure topic subscriptions? (yes/no)") instead of open-ended questions.
MCP Servers
Two hosted MCP servers serve the current documentation, so both are always ahead of the guidance bundled with this skill:
- Capawesome MCP server — the Capawesome plugins, the Capawesome CLI, and Capawesome Cloud.
- Capacitor MCP server (unofficial) — Capacitor itself: the CLI, the
capacitor.configfile, the native Android and iOS projects, and the official plugin APIs.
Both expose search_docs and get_doc_page, so pick the server by topic before calling either.
- If the MCP tools are available, call
search_docson the server that owns the topic and read the matching page withget_doc_pagebefore applying the guidance below. Where the two disagree, follow the documentation. - If they are not available, mention once that the servers can be added with the commands below, then continue with this skill. Never block on it.
claude mcp add --transport http capawesome "https://mcp.capawesome.io/mcp"
claude mcp add --transport http capacitor "https://capacitor-mcp.capawesome.io/mcp"
Neither server needs an account or a token for documentation. See the capawesome-mcp and capacitor-mcp skills for full setup, including the Capawesome Cloud tools.
Procedures
Step 1: Analyze the Project
Auto-detect the following by reading project files — do not ask the user for information that can be inferred:
- Platforms: Check which directories exist (
android/,ios/). These are the platforms to configure. - Build tool / framework: Check for
vite.config.ts,angular.json,webpack.config.js,next.config.js, etc. - Capacitor version: Read
@capacitor/coreversion frompackage.json. - Conflicting plugins: Check if
@capacitor/push-notificationsis inpackage.json. If found, warn the user it must be removed before proceeding:npm uninstall @capacitor/push-notifications
Step 2: Set Up Firebase
Check if Firebase is already configured in the project:
- Android: Check if
android/app/google-services.jsonexists. - iOS: Check if
ios/App/App/GoogleService-Info.plistexists.
If Firebase is not configured for a detected platform, read references/firebase-setup.md and guide the user through the Firebase setup for each missing platform.
Step 3: Install the Plugin
npm install @capacitor-firebase/messaging firebase
npx cap sync
Step 4: Configure Android
Skip if android/ does not exist.
Read references/android-setup.md and apply the Android-specific configuration.
Step 5: Configure iOS
Skip if ios/ does not exist.
Read references/ios-setup.md and apply the iOS-specific configuration. This includes APNs key/certificate setup, AppDelegate.swift modifications, and enabling capabilities.
Step 6: Configure Web (if applicable)
If the project targets the web (detected via build tool config or user confirmation):
Read references/web-setup.md and apply the Web-specific configuration.
Step 7: Configure Capacitor Plugin Options
Ask the user if they want to customize iOS foreground notification presentation. If yes, update capacitor.config.json or capacitor.config.ts:
{
"plugins": {
"FirebaseMessaging": {
"presentationOptions": ["alert", "badge", "sound"]
}
}
}
Available options: badge, sound, alert, criticalAlert. Default is ["alert", "badge", "sound"].
Step 8: Add Push Notification Code
Read references/implementation.md and add the push notification code to the project. Adapt imports and structure to match the user's framework.
The implementation covers: 1.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/android-setup.md
- references/firebase-setup.md
- references/implementation.md
- references/ios-setup.md
- references/testing.md
- references/web-setup.md
FAQ
Что делает скилл capacitor-push-notifications?
Guides the agent through setting up and using push notifications in Capacitor apps using Firebase Cloud Messaging via the @capacitor-firebase/messaging plugin. Covers Firebase project setup, plugin installation, platform-specific configuration (Android, iOS, Web), APNs certificate setup, requesting permissions, retrieving FCM tokens, listening for notifications, topic subscriptions, notification channels, and testing. Do not use for local notifications, non-Firebase push providers, migrating Capacitor apps or plugins, or non-Capacitor mobile frameworks.
Как установить скилл capacitor-push-notifications?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-push-notifications запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…