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.
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/capacitor-plugin-upgrades/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/capacitor-plugin-upgrades/
1Skills CLI (Vercel)
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a codex2Manually: put the files in place
.agents/skills/capacitor-plugin-upgrades/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a cursor2Manually: put the files in place
.cursor/skills/capacitor-plugin-upgrades/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install capawesome-team/skills capacitor-plugin-upgrades2Manually: put the files in place
.github/skills/capacitor-plugin-upgrades/SKILL.md1Skills CLI (Vercel)
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a gemini-cli2Platform CLI
gemini skills install https://github.com/capawesome-team/skills --path skills/capacitor-plugin-upgradesManually: put the files in place
.devin/skills/capacitor-plugin-upgrades/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add capawesome-team/skills --skill capacitor-plugin-upgrades -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.