Skip to content
cap-go avatar

Framework To Capacitor

Guide for converting Next.js, Nuxt, Angular, SvelteKit, and Vite apps into Capacitor builds.

CCM score
64 of 100
skills.sh installs
956
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the static build setup per framework, with webDir values for Next.js, Nuxt, Angular, SvelteKit, and Vite projects
  • Inventories SSR, API route, middleware, and server action code that cannot run inside the native app before any changes are made
  • Enforces that index.html exists at the webDir root, and checks deep links and reloads that otherwise land on the home page
  • Designed for web apps being packaged as iOS and Android apps with Capacitor, not for Cordova or Capacitor upgrade work

Install

$ npx -y skills add cap-go/capgo-skills --skill framework-to-capacitor -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Framework to Capacitor

Make a framework emit a static bundle that Capacitor can copy into the native projects, and wire the scripts so build -> cap sync is one step.

When to Use

TRIGGER when:

  • Adding Capacitor to a Next.js, Nuxt, Angular, SvelteKit, Vite (React/Vue/Svelte/Solid), React Router, Qwik, or Astro project.
  • npx cap sync fails with The web assets directory (./dist) must contain an index.html file. or Could not find the web assets directory: ./dist.
  • The app launches to a white screen or loads the wrong page after a reload or deep link.
  • The framework build fails because of SSR-only features (output: 'export' errors, prerender errors, API routes, middleware, server actions).

Do not use for:

  • Store readiness, native UX, permissions, billing, review risk -> webapp-to-capacitor, capacitor-app-store, capacitor-apple-review-preflight.
  • Cordova/PhoneGap apps -> cordova-to-capacitor.
  • Capacitor version upgrades -> capacitor-app-upgrades.
  • Live updates setup -> capgo-live-updates.

Project Inspection

Details

Repository
github.com/cap-go/capgo-skills
Categories
Mobile Apps, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the framework-to-capacitor skill do?

framework-to-capacitor configures a web framework build so Capacitor can ship it as an iOS or Android app. It covers Next.js static export, Nuxt 4, Angular, SvelteKit adapter-static, and React, Vue, Svelte or Solid on Vite, and it makes the build and cap sync run as one step.

How do I install the framework-to-capacitor skill?

Run npx -y skills add cap-go/capgo-skills --skill framework-to-capacitor -y in your project. After that, framework-to-capacitor lets the agent make your framework emit a static bundle that Capacitor can copy into the native projects.

Which frameworks does framework-to-capacitor support?

framework-to-capacitor covers Next.js with static export, Nuxt 4 with ssr false, Angular, SvelteKit with adapter-static, and React, Vue, Svelte and Solid built on Vite. It also handles React Router framework SPA mode, and it gives reference notes for other frameworks such as Qwik and Astro.

Why does my app show a blank white screen after cap sync with framework-to-capacitor?

framework-to-capacitor addresses blank white screens by checking that the webDir mismatch is fixed and that index.html sits at the root of the build output. It also explains that deep-link reloads land on the home page because Capacitor serves the root index.html for extensionless paths, so navigation should stay client-side.

More from cap-go/capgo-skills

All 41

Similar to Framework To Capacitor

More Mobile Apps