Skip to main content
skill CX Codex

capacitor-plugin-upgrades · capawesome-team — Claude Code skill: upgrade Capacitor

Walks an agent through major-version upgrades of a Capacitor plugin, from 4 through 8, including jumps across several versions at once.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a claude-code
Open on GitHub

What capacitor-plugin-upgrades does

The skill reads the @capacitor/core version from package.json — devDependencies or peerDependencies — and works out the current major. Then it asks for the target version and defaults to 8. Each major jump maps to its own reference file: references/upgrade-v4-to-v5.md, upgrade-v5-to-v6.md, upgrade-v6-to-v7.md, upgrade-v7-to-v8.md.

Multi-version jumps run sequentially, and skipping intermediate versions is not allowed. After every step the agent runs npm install && npx cap sync, builds, and checks the plugin's test app. The guides cover Android SDK targets, Gradle configuration, Java/Kotlin versions and iOS deployment targets, plus a manual fallback for each version when the official migration tools fail.

Node.js and npm are required, and the minimum Node version depends on the target: 16+ for Capacitor 5, 18+ for 6, 20+ for 7, 22+ for 8. The project has to be a plugin, not an app — app projects belong to the separate capacitor-app-upgrades skill. If an Android build breaks after the upgrade, the skill points to **Tools > AGP Upgrade Assistant** in Android Studio.

What it helps with

  • upgrade a Capacitor plugin from 4 to 8
  • move a plugin from Capacitor 5 to 6 without skipping steps
  • fix an Android build that fails after the upgrade
  • apply manual steps where the automated migration tool broke
  • verify the plugin's test app after each version jump

Example prompts for the agent

  • upgrade this Capacitor plugin to version 8
  • move the plugin from Capacitor 5 to 7
  • the Android build fails after the upgrade — what now

How to install capacitor-plugin-upgrades

1Skills CLI (Vercel)

npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a claude-code

2Manually: put the files in place

~/.claude/skills/capacitor-plugin-upgrades/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/capacitor-plugin-upgrades/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about capacitor-plugin-upgrades

How do I install capacitor-plugin-upgrades in Claude?

Run npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a claude-code. The skill lands in ~/.claude/skills/capacitor-plugin-upgrades/SKILL.md.

What does capacitor-plugin-upgrades do?

It guides the agent through upgrading a Capacitor plugin to a newer major version: detecting the current version, applying the guide for each jump, and verifying the build on both platforms.

Can I use it to upgrade the app project itself?

No, it targets plugins. Use capacitor-app-upgrades for the app, and capacitor-plugin-spm-support to add Swift Package Manager support after moving to Capacitor 6+.

Source text

SKILL.md · MIT
---
name: capacitor-plugin-upgrades
description: "Guides the agent through upgrading a Capacitor plugin to a newer major version. Supports upgrades from Capacitor 4 through 8, including multi-version jumps. Covers automated upgrade via official migration tools, Android SDK targets, Gradle configuration, Java/Kotlin versions, iOS deployment targets, and manual step-by-step fallback for each version. Do not use for app project upgrade or non-Capacitor plugin frameworks."
license: MIT
compatibility: "Requires Node.js and npm; the minimum Node.js version depends on the target Capacitor version."
metadata:
  author: capawesome-team
  source: https://github.com/capawesome-team/skills/tree/main/skills/capacitor-plugin-upgrades
---

# Capacitor Plugin Upgrade

Upgrade a Capacitor plugin to a newer major version (4→5, 5→6, 6→7, or 7→8).

## Prerequisites

| Target Version | Node.js |
| -------------- | ------- |
| 5              | 16+     |
| 6              | 18+     |
| 7              | 20+     |
| 8              | 22+     |

The project must be a Capacitor plugin (not an app project).

## Procedures

### Step 1: Detect Current Version

Read `@capacitor/core` version from `package.json` (`devDependencies` or `peerDependencies`). Determine the current major version.

Ask the user for the target version. Default to the latest (8) if not specified.

### Step 2: Execute Upgrade

For each major version jump between the current and target version, apply the corresponding upgrade guide **sequentially**:

| Current → Target | Reference                            |
| ---------------- | ------------------------------------ |
| 4 → 5            | `references/upgrade-v4-to-v5.md`   |
| 5 → 6            | `references/upgrade-v5-to-v6.md`   |
| 6 → 7            | `references/upgrade-v6-to-v7.md`   |
| 7 → 8            | `references/upgrade-v7-to-v8.md`   |

For multi-version jumps (e.g., 5 → 8), apply each upgrade in order:
1. Read and apply `references/upgrade-v5-to-v6.md`
2. Run `npm install && npx cap sync`, build, and verify the plugin's test/example app
3. Read and apply `references/upgrade-v6-to-v7.md`
4. Run `npm install && npx cap sync`, build, and verify the plugin's test/example app
5. Read and apply `references/upgrade-v7-to-v8.md`
6. Run `npm install && npx cap sync`, build, and verify the plugin's test/example app

Do **not** skip intermediate versions.

### Step 3: Final Verification

After completing all upgrade steps:

```bash
npm install
npx cap sync
```

Build the plugin's test/example app on both platforms to verify.

## Error Handling

* If automated upgrade tools fail, check the terminal output for which steps failed and apply those manually using the steps in the corresponding reference file.
* If Android build fails after upgrade, run **Tools > AGP Upgrade Assistant** in Android Studio.
* If iOS build fails, verify the deployment target matches the target version requirements in the reference file.
* If Gradle property syntax warnings appear (v8+), search all `.gradle` files for property assignments without `=` and update them.
* If a multi-version upgrade fails mid-way, fix the current version step before proceeding to the next.

## Related Skills

- **`capacitor-app-upgrades`** — If the app project itself also needs upgrading, use this skill.
- **`capacitor-plugin-spm-support`** — After upgrading a plugin to Capacitor 6+, use this skill to add Swift Package Manager support.
- **`capacitor-plugin-development`** — For creating new Capacitor plugins from scratch, including scaffolding, native implementation, and publishing.

© capawesome-team · MIT · capawesome-team/skills

Similar skills

Everything for Mobile →

capacitor-plugin-upgrades by other authors comes first.

From the same set22

capacitor-push-notifications Walks the agent through Firebase, the @capacitor-firebase/messaging plugin, Android, iOS and Web setup, APNs, FCM tokens and a test send. CX Codex +1 979installs capacitor-app-upgrades Walks the agent through upgrading a Capacitor app to a newer major version, including jumps across several versions. Useful when you finally move from 4 to 8. CX Codex +1 902installs capawesome-cloud The skill walks the agent through Capawesome Cloud setup: cloud builds for iOS and Android, OTA updates, and automated publishing to the App Store and Google Play. CX Codex +1 840installs capacitor-app-creation A skill that walks the agent through building a Capacitor app from scratch: web scaffold, config, native platforms, and running it. CX Codex +1 820installs capawesome-cli A skill that walks the agent through installing, authenticating and running Capawesome CLI: builds, live updates, channels, deployments. CX Codex +1 777installs capacitor-plugin-development Walks the agent through building and maintaining Capacitor plugins: scaffolding, native iOS and Android bridges, the web layer, npm publishing. CX Codex +1 745installs ionic-app-upgrades Walks the agent through a major Ionic upgrade: step-by-step migrations for Angular, React and Vue, plus component and CSS variable breaking changes. CX Codex +1 740installs capacitor-in-app-purchases A skill that walks the agent through in-app purchases in Capacitor apps: store product setup, plugin choice, purchase flows, receipt validation and sandbox testing. CX Codex +1 728installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor