capacitor-best-practices
БесплатноБез исполняемых скриптовНе проверенReview and set up Capacitor apps against current best practices (Capacitor 8.5 stable, 9 alpha via `@next`). Use for a Capacitor codebase review…
от Cap-go★ 79 звёзд на GitHubОб этом скилле
Capacitor Best Practices
Review a Capacitor app for structural mistakes that cause broken builds, lost edits, production leaks, and plugin crashes. Route deep topics to the sibling skill that owns them.
When to Use
Use the selected project and its installed dependencies. Package installation and migration tools execute code; limit them to the requested setup or upgrade, preserve the lockfile and existing changes, and review generated edits before running changed build scripts.
TRIGGER when:
- The user asks for a general code/architecture review of a Capacitor or Ionic + Capacitor app.
- Setting up a new Capacitor project or adding iOS/Android to an existing web app.
capacitor.config.ts|jsonreview:webDir,server.url,cleartext, plugin config, env-specific config.- Version drift between
@capacitor/core,@capacitor/cli,@capacitor/ios,@capacitor/android, or plugin majors that do not match Capacitor's major. - Plugin usage review: missing
npx cap sync, no availability check, no permission flow, matching on error message strings. - Errors such as
"<Plugin>" plugin is not implemented on ios,Could not find the web assets directory,ios platform has not been added yet. - Pre-release sanity checklist across config, native projects, and live updates.
Do not use:
- Security audit, secrets, storage, pinning, CSP ->
capacitor-security; Xcode hardening ->capacitor-ios-security-hardening. - Bundle size, startup time, memory, bridge profiling ->
capacitor-performance. - Unit/E2E test setup and plugin mocking ->
capacitor-testing. - Crashes, white screen, native logs ->
debugging-capacitor,ios-android-logs. - Major upgrades ->
capacitor-app-upgrades(8 -> 9:capacitor-app-upgrade-v8-to-v9). - CocoaPods -> SPM ->
cocoapods-to-spm; UIScene adoption ->capacitor-uiscene-migration. - Finding or installing a specific plugin ->
capacitor-plugins. - Store submission and review ->
capacitor-app-store,capacitor-apple-review-preflight; CI ->capacitor-ci-cd; live updates ->capgo-live-updates.
Current baseline (October 2026)
Capacitor 8 (stable, latest 8.5.x) |
Capacitor 9 (next, alpha) |
|
|---|---|---|
| Node | 22+ | 24+ |
| iOS min / Xcode | iOS 15 / Xcode 26 (8.5 adopts UIScene so Xcode 27 builds work) | iOS 16 / Xcode 27+ |
| Android | minSdk 24, compile/target 36, AGP 8.13, Gradle 8.14.3 | minSdk 26, compile/target 37, AGP 9.2.1, Gradle 9.5.1 |
| iOS deps | SPM default for new projects | SPM default |
CocoaPods Trunk is expected to go read-only on December 2, 2026. Recommend SPM for every app still on CocoaPods. Install Capacitor 9 only with @next until it reaches GA, and do not recommend it for production apps.
Review workflow
- Inventory (read-only).
npx cap doctor # installed vs latest Capacitor packages npx cap ls # plugins Capacitor detects per platform cat capacitor.config.ts 2>/dev/null || cat capacitor.config.json ls ios/App/Podfile ios/App/CapApp-SPM 2>/dev/null # CocoaPods or SPM grep -nE "minSdkVersion|compileSdkVersion|targetSdkVersion" android/variables.gradle - For large codebases, write a TODO list of areas (config, versions, plugins, native iOS, native Android, live updates, release) and review one at a time.
- Report findings before editing, grouped by severity, each with file:line and the fix. Ask before invasive changes (upgrading a major, migrating to SPM, enabling R8, changing
appId). - Fix, loading the matching reference.
- Run Verification.
Rules that matter most
- Keep Capacitor packages on one version.
@capacitor/core,cli,ios,androidmust match. Plugin majors must match the Capacitor major (official and@capgo/*plugins follow it: v8 plugins for Capacitor 8). npx cap syncafter every plugin install/removal and every config change. Missing sync produces"<Plugin>" plugin is not implemented on <platform>.- Never edit generated web assets.
android/app/src/main/assets/public/andios/App/App/public/are overwritten bycap copy/sync. Editsrc/and rebuild. - Commit
ios/andandroid/. They are source code with your native customizations, not build output. Do commitcapacitor.config.*; do not commitnode_modules,Pods/, build dirs. - No dev settings in release config.
server.url,server.cleartext,allowNavigationto dev hosts,webContentsDebuggingEnabled: true. Gate them on an env var (see references/config-and-project.md). On Capacitor 9, usenpx cap run <platform> --url <dev-url>for live reload. - Feature-detect before calling plugins.
Capacitor.isNativePlatform(),Capacitor.getPlatform(),Capacitor.isPluginAvailable('Name'). Provide a web fallback or hide the feature. - Use the permission API. Call
checkPermissions()thenrequestPermissions()for official plugins that expose them, and handledeniedwith a path to Settings. Add the m
Установить capacitor-best-practices в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл capacitor-best-practices?
Review and set up Capacitor apps against current best practices (Capacitor 8.5 stable, 9 alpha via `@next`). Use for a Capacitor codebase review, `capacitor.config.ts` audit, new project setup, aligning `@capacitor/core`/`cli`/`ios`/`android` and plugin majors, plugin patterns (availability checks, `checkPermissions`/`requestPermissions`, error `code` handling, web fallbacks), or release prep; or on `"<Plugin>" plugin is not implemented on ios`, `Could not find the web assets directory`, `platform has not been added yet`, a dev `server.url` shipped to production, lost edits in `android/app/src/main/assets/public`, SPM vs CocoaPods, or AppDelegate/UIScene drift. Do not use for security audits (capacitor-security), performance (capacitor-performance), tests (capacitor-testing), crashes (debugging-capacitor), major upgrades (capacitor-app-upgrades), SPM migration (cocoapods-to-spm), UIScene adoption (capacitor-uiscene-migration), or live updates (capgo-live-updates).
Как установить скилл capacitor-best-practices?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-best-practices запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic