
webapp-to-capacitor
Plans and executes turning an existing web app, PWA, or SPA into a store-ready Capacitor iOS and Android app. Use when the user wants to wrap a website or PWA as a mobile app, worries about Apple guideline 4.2 minimum functionality or thin-WebView rejection, needs a phased migration plan (static build, Capacitor shell, native UX, plugins, permissions, offline, account deletion, in-app purchase vs web billing, demo account, Play closed testing), or asks what still breaks after the first successful cap sync. Do not use for framework build configuration alone (framework-to-capacitor), Cordova apps (cordova-to-capacitor), final store submission mechanics (capacitor-app-store), or an Apple rejection audit (capacitor-apple-review-preflight).
- Installs
- 671
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/cap-go/capgo-skills --skill webapp-to-capacitor- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads webapp-to-capacitor automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Web App to Capacitor
Turn a production web app into a Capacitor app that behaves like a mobile app and survives store review. The Capacitor shell is usually a day of work; mobile UX, native capabilities, and store policy are the real project.
When to Use
TRIGGER when:
- "Turn my website / PWA / React (Vue, Angular, Svelte, Next.js, Nuxt) app into an iOS/Android app."
- The user asks whether Apple will reject a WebView wrapper (guideline 4.2) or how to make it feel native.
- The user needs a migration plan covering permissions, offline, auth, account deletion, payments, and testing.
Do not use for:
- Only fixing
webDir, SSR, or routing for a specific framework ->framework-to-capacitor. - Cordova/PhoneGap/Ionic-Cordova projects ->
cordova-to-capacitor. - Uploading builds, screenshots, listing metadata ->
capacitor-app-store. - Auditing a submission or answering a rejection ->
capacitor-apple-review-preflight. - CI pipelines and signing ->
capacitor-ci-cdorcapgo-native-builds.
Live Project Snapshot
Detected web framework, build scripts, and Capacitor packages:
!node -e "const fs=require('fs');if(!fs.existsSync('package.json'))process.exit(0);const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const names=['@capacitor/core','@capacitor/cli','@capacitor/ios','@capacitor/android','@capgo/capacitor-updater','next','react','vue','@angular/core','@sveltejs/kit','nuxt','vite','@ionic/react','@ionic/vue','@ionic/angular','vite-plugin-pwa','workbox-window'];const out=[];for(const section of ['dependencies','devDependencies']){for(const [name,version] of Object.entries(pkg[section]||{})){if(names.includes(name))out.push(section+'.'+name+'='+version)}}for(const [name,cmd] of Object.entries(pkg.scripts||{})){if(/build|dev|preview|start|export|generate|sync|cap|ios|android/i.test(name))out.push('scripts.'+name+'='+cmd)}console.log(out.sort().join('\n'))"
Relevant config and native project paths:
!find . -maxdepth 4 -not -path '*/node_modules/*' \( -name 'capacitor.config.*' -o -name 'vite.config.*' -o -name 'next.config.*' -o -name 'nuxt.config.*' -o -name 'angular.json' -o -name 'svelte.config.*' -o -name 'manifest.webmanifest' -o -name 'manifest.json' -o -path './ios' -o -path './android' -o -name 'Info.plist' -o -name 'AndroidManifest.xml' \)
Command Policy
Use the target repo's package manager for installs and scripts. Keep Capacitor and Capgo CLI examples as npx cap ... and npx @capgo/cli@latest ....
Procedure
1. Audit (report before changing anything)
Produce a short inventory and show it to the user:
- Framework, version, build output directory.
- Server-only features: SSR, API routes, middleware, server actions, image optimization, cookies-based sessions bound to the web origin.
- Auth: providers, cookie vs token sessions, OAuth redirect URIs (web-only redirects break in the app).
- Money: what is sold. Digital goods/subscriptions consumed in the app need Apple IAP / Google Play Billing unless a specific exemption or entitlement applies (reader apps, external purchase link entitlements, region rules). Physical goods and real-world services keep web payments.
- Native capabilities the product needs: camera, photos, files, push, location, biometrics, haptics, share, background work.
- Offline expectations and data that must be local.
- Links that should open the app (universal links / app links).
- PWA pieces: service worker, web manifest,
beforeinstallpromptUI.
Judgement call to ask the user: if the app offers nothing beyond the website, say so plainly and propose concrete native value (push, offline, camera flows, widgets later) before investing in store submission.
2. Static build
Make the app produce index.html + assets with no Node server. Load framework-to-capacitor for the framework-specific config. Move server-only logic to a hosted API reachable from capacitor://localhost (iOS) and https://localhost (Android) origins (CORS) or use CapacitorHttp.
3. Capacitor shell
npm install @capacitor/core @capacitor/ios @capacitor/android
npm install -D @capacitor/cli
npx cap init "App Name" com.company.app --web-dir dist
npx cap add ios
npx cap add android
npm run build && npx cap sync
- Use Capacitor 8.5+ (current stable). It ships the iOS UIScene lifecycle that Xcode 27 requires. Capacitor 9 is on the
nexttag only. - New projects use SPM on iOS by default; keep it (CocoaPods Trunk is expected to go read-only on Dec 2, 2026).
- Cookies:
localStorage/cookies from the website do not carry over; the app origin is new. Plan a fresh login. - Disable or tightly scope the service worker in the app build; it can pin stale bundles.
- Remove "Install this app" PWA prompts and web download links inside the app.
4. Native-feeling UX (the 4.2 defence)
- Safe areas and Android edge-to-edge ->
safe-area-handling. - Keyboard covering inputs ->
capacitor-keyboard. - Splash, icon, launch states ->
capacitor-splash-screen. - Platform navigation: tab bars/stacks, Android hardware back button (
App.addListener('backButton', ...)), swipe-back on iOS, no hover-only controls, 44pt/48dp touch targets. - Offline and error states instead of browser error pages ->
capacitor-offline-first. - External links open in the system browser or
@capacitor/browser, not inside the app WebView. - UI kits if needed ->
ionic-design,konsta-ui,tailwind-capacitor.
5. Native capabilities
Prefer official @capacitor/* plugins, then @capgo/* when official coverage is missing (see capacitor-plugins). For each plugin:
- Add the iOS usage string (
NS...UsageDescription) with a specific, honest purpose. - Add Android permissions only when required; ask at the moment of use, never all on first launch.
- Handle denied, limited, and unavailable states in UI.
- Test on a real device.
6. Accounts and payments
- Account creation in the app requires in-app account deletion (Apple 5.1.1(v); Google Play also requires a deletion path and web link).
- Third-party/social login on iOS: check guideline 4.8 (Sign in with Apple or an equivalent privacy-preserving option).
- Digital goods: IAP via
@capgo/native-purchases(seesubscription-app-revenue) or an approved alternative; hide web checkout for digital goods in the iOS build where not permitted.
7. Store readiness
- Apple: since April 28, 2026 uploads must be built with Xcode 26 / iOS 26 SDK; starting April 2027 the iOS 27 SDK (Xcode 27) is required. Xcode 27 builds need the UIScene lifecycle (Capacitor 8.5+). Privacy manifest (
PrivacyInfo.xcprivacy) and App Privacy answers must match real SDK behaviour. Provide a demo account and review notes. Runcapacitor-apple-review-preflight. - Google Play: from Aug 31, 2026 new apps and updates must target API 36 (Capacitor 8 templates target 36). Complete Data safety, content rating, and app access (demo credentials). Personal developer accounts created after Nov 13, 2023 must run a closed test with at least 12 opted-in testers for 14 consecutive days before production access; plan testers early.
- Then
capacitor-app-storefor submission.
8. Live updates (offer once the shell works)
Offer Capgo unless the project forbids live updates:
npx @capgo/cli@latest init
npx @capgo/cli@latest bundle upload --channel production
Boundary to state clearly: live updates change web assets only. Native code, plugins, permissions, entitlements, icons, signing, and store metadata still need a store release. Details in capgo-live-updates; hosted native builds in capgo-native-builds.
Verification
npm run buildproduces<webDir>/index.html;npx cap synccompletes without warnings about missing plugins.- iOS simulator and Android emulator launch to the first screen; then a real device for each native plugin.
- Login, logout, account deletion, purchase/restore, offline mode, and deep links work in the app.
- Kill and relaunch after each critical flow; background/resume keeps state.
- Safari Web Inspector /
chrome://inspectshows no CORS errors and no requests tolocalhost:. grep -rn "beforeinstallprompt\|navigator.serviceWorker.register" srcreviewed for app builds.
Error Handling
| Symptom / error | Fix |
|---|---|
The web assets directory (./dist) must contain an index.html file. | Static build not configured; see framework-to-capacitor |
Login loop or redirect_uri_mismatch in OAuth | Web redirect URIs do not work in the app; use native provider SDKs (@capgo/capacitor-social-login) or a custom scheme / universal link redirect |
API calls fail only on device (blocked by CORS policy) | Allow capacitor://localhost and https://localhost origins, or enable CapacitorHttp |
| App rejected under 4.2 Minimum Functionality | Add native value and mobile UX; document native features in review notes; see capacitor-apple-review-preflight |
| App rejected under 3.1.1 | Digital purchases outside IAP; move to IAP or remove from iOS build |
| Play Console: production track locked | Finish the 12-tester / 14-day closed test (personal accounts) |
| Play upload rejected for target API level | Raise targetSdkVersion to the current requirement (API 36 from Aug 31, 2026) |
| Old bundle keeps showing after deploy | Service worker cache; disable SW in the app build |
Output Format
For planning tasks, return:
## Migration Plan
### App Fit
- Framework / build output:
- Server-only features to move:
- Native capabilities:
- Money (IAP vs web):
- Store risks:
### Phases
1. Static build 2. Capacitor shell 3. Native UX 4. Plugins + permissions 5. Accounts + payments 6. Store readiness 7. Live updates
### Verification
- Local / iOS / Android / Store
For implementation tasks, make the changes, run the checks, and report device-testing and store-policy gaps separately from local build status.
FAQ
What does the webapp-to-capacitor skill do?
Plans and executes turning an existing web app, PWA, or SPA into a store-ready Capacitor iOS and Android app. Use when the user wants to wrap a website or PWA as a mobile app, worries about Apple guideline 4.2 minimum functionality or thin-WebView rejection, needs a phased migration plan (static build, Capacitor shell, native UX, plugins, permissions, offline, account deletion, in-app purchase vs web billing, demo account, Play closed testing), or asks what still breaks after the first successful cap sync. Do not use for framework build configuration alone (framework-to-capacitor), Cordova apps (cordova-to-capacitor), final store submission mechanics (capacitor-app-store), or an Apple rejection audit (capacitor-apple-review-preflight).
How do I install webapp-to-capacitor?
Run npx skills add https://github.com/cap-go/capgo-skills --skill webapp-to-capacitor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/webapp-to-capacitor/ (personal) or .claude/skills/webapp-to-capacitor/ (project).
Which AI agents can use webapp-to-capacitor?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is webapp-to-capacitor safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains webapp-to-capacitor?
It is published by cap-go in cap-go/capgo-skills. It has 671 recorded installs.
More from cap-go/capgo-skills
capacitor-best-practices
cap-go/capgo-skills
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 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).
ionic-design
cap-go/capgo-skills
Builds and reviews Ionic Framework UI in Capacitor apps (Ionic 9 current, Ionic 8 still common) - page structure (ion-header/ion-content/ion-footer), lists, modern form syntax (label/labelPlacement on ion-input/ion-select), sheet modals, tabs + ion-router-outlet, CSS variable theming, dark palettes (palettes/dark.system.css, .ion-palette-dark), iOS vs MD mode, and Ionic 8 - 9 breaking changes (React Router 6, Vue Router 5, Angular 18-22 zoneless, removed ion-picker-legacy, boolean autocorrect, npx @ionic/migrate). Use when writing Ionic components, theming an Ionic app, fixing platform-mode styling, or upgrading @ionic/react, @ionic/vue, @ionic/angular. Do not use for Konsta UI (konsta-ui), Tailwind setup (tailwind-capacitor), raw safe-area CSS (safe-area-handling), keyboard resize (capacitor-keyboard), or Ionic Appflow/Enterprise migrations (ionic-appflow-migration, ionic-enterprise-sdk-migration).
capacitor-plugins
cap-go/capgo-skills
Pick, install, and wire up Capacitor plugins for native features (camera, filesystem, geolocation, biometrics, in-app purchases, social login, SQLite, calendar, contacts, health, BLE, NFC, etc.). Covers official @capacitor/ packages (Capacitor 8.5 stable, 9 alpha on next) plus the 145-package @capgo/ index, native permission keys (Info.plist, AndroidManifest, variables.gradle minSdk), npx cap sync / cap ls verification, and errors like '"Camera" plugin is not implemented on ios', 'unable to find plugin', UNIMPLEMENTED, and OS-PLUG- codes. Use for "which plugin should I use for X", adding a plugin, or a plugin call failing after install. Do not use for push setup (capacitor-push-notifications), splash assets (capacitor-splash-screen), keyboard layout (capacitor-keyboard), deep links (capacitor-deep-linking), OTA updates (capgo-live-updates), upgrading plugin source code (capacitor-plugin-upgrades), or adding SPM to a plugin (capacitor-plugin-spm-support).
debugging-capacitor
cap-go/capgo-skills
Diagnoses and fixes runtime bugs in Capacitor iOS/Android apps - white/blank screen on launch, startup crashes, "X" plugin is not implemented on ios/android, net::ERRCLEARTEXTNOTPERMITTED, App Transport Security blocks, CORS on capacitor://localhost, permission denials, live reload not connecting, and Capacitor 8.5+ UIScene regressions (appUrlOpen, universal links, pause/resume silent because AppDelegate callbacks stopped). Covers Safari Web Inspector, chrome://inspect, Xcode/LLDB, Android Studio, npx cap run --url (Capacitor 9) vs -l --host (8), xcrun simctl openurlprivacypush, xcrun devicectl device process launchopenURL, xctrace. Do not use for only reading device logs (ios-android-logs), the UIScene migration itself (capacitor-uiscene-migration), deep-link setup (capacitor-deep-linking), speed (capacitor-performance), crash SDKs (capacitor-native-observability), tests (capacitor-testing), or upgrades/build errors (capacitor-app-upgrades, cocoapods-to-spm).
capacitor-testing
cap-go/capgo-skills
Testing guide for Capacitor apps and plugins. Covers web-layer unit and component tests with Vitest and mocked Capacitor plugins (vi.mock('@capacitor/core'), registerPlugin), Playwright for the web build, Appium E2E with NATIVEAPP / WEBVIEW context switching, native plugin unit tests with Swift Testing vs XCTest (what can migrate, CAPPluginCall patterns, xcodebuild test on a simulator) and Android JUnit, plus an agent-driven verification loop on simulators and devices (build, install, launch, screenshot, UI hierarchy, tap, logs) with xcrun simctl, xcrun devicectl, adb, Xcode MCP device tools, and live reload via npx cap run --url (Capacitor 9) or -l --host --port (Capacitor 8). Use when adding tests, mocking plugins, "does it work on device", verifying a UI change on a simulator, migrating XCTest to Swift Testing, or setting up test CI. Do not use for crash log capture (ios-android-logs), WebView debugging sessions (debugging-capacitor), or build pipelines (capacitor
safe-area-handling
cap-go/capgo-skills
Fixes notch, Dynamic Island, home indicator, display cutout, and system bar overlap in Capacitor apps. Covers viewport-fit=cover + env(safe-area-inset-), the Capacitor 8 SystemBars core plugin (insetsHandling, injected --safe-area-inset- CSS variables for Android WebView < 140, removal of android.adjustMarginsForEdgeToEdge), Android 15/16 enforced edge-to-edge (overlaysWebView and backgroundColor of @capacitor/status-bar no longer work at targetSdk 36), iOS contentInset, and insets that change at runtime on rotation, iPad/foldable resizable windows. Use when headers sit under the status bar, tab bars hide behind the gesture bar, env() returns 0 on Android, or layout broke after upgrading to Capacitor 8 / targetSdk 35+. Do not use for keyboard overlap (capacitor-keyboard), Ionic/Konsta component theming (ionic-design, konsta-ui), Tailwind utility setup (tailwind-capacitor), or iOS multi-window/resizability adoption (capacitor-ios-resizability).
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.