# PWA Audit & Fix: Installable, Offline, iPhone-Ready

> Finds why your web app won't install or breaks on phones, especially iPhone, then fixes it with drop-in templates for a plain service worker, vite-plugin-pwa or Next.js.

PWA Audit & Fix: Installable, Offline, iPhone-Ready is a paid AI agent skill on Agensi by Nate Freed, in Mobile Development. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Nate Freed](https://www.agensi.io/creators/nate-freed)
- Category: [Mobile Development](https://www.agensi.io/skills/mobile-development)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pwa-audit-fix-installable-offline-iphone-ready
- Tags: frontend-web-apps, mobile-development, code-quality-review

## About this skill

This skill audits a PWA and then fixes it, for apps people actually run from a phone's home screen. A read-only Python script checks your project or build folder. It covers the manifest and the real pixel sizes of your icon files, the head tags iPhones need, and the service worker: scope, versioned caches, cleanup, precached files that really exist, offline fallback, page strategy, and API or auth responses that should never be cached. It also flags update flows that reload the page while someone is typing, logouts that leave cached data on a shared device, state lost when iOS kills a backgrounded app, 100vh and safe-area layout bugs, and input zoom. Every finding is ranked by severity, with file:line, why it matters on a phone, and the template that fixes it. With your OK, the agent applies the tested templates: a versioned network-first worker that also works under a base path, an 'Update available' prompt that reloads exactly once, a draft hook that survives the phone locking, a logout cleanup, an iOS-Safari-only add-to-home hint, an offline page and safe-area CSS. It finishes with a real-device test plan: install, airplane mode, lock the phone, update.

## Requires

- Python 3.8+ (standard library only)
- The web app's source or build folder
- Optional: An iPhone and/or Android phone
- Optional: Google Chrome or Safari DevTools
- Optional: vite-plugin-pwa, if the app uses it
- Optional: A preview deploy over HTTPS for phones

## Known limitations

Static heuristics on source text: no runtime, no network, no type information. The templates make the app open offline (app shell or offline page) and keep typed drafts on the device; reading API data offline and queuing submissions made without signal are out of scope. Plugin-generated workers are only fully checked when you scan the build folder. Manifest values built from variables are resolved from the same file, relative or alias imports and workspace packages; anything else is noted in the report and skipped. Logout cache clearing is looked for in the logout file only. Phone-behaviour checks (drafts, install hints, layout) are less reliable on minified build output. It does not judge icon artwork, push notifications or performance. iOS behaviour can only be confirmed on a real device; the skill gives the test plan but cannot run it.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the PWA Audit & Fix: Installable, Offline, iPhone-Ready skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it need my deployed site, an account or network access?

No. The script reads files in the folder you point it at, makes no network calls and skips .env, .dev.vars and key files. Deploying and changing host cache headers stay your steps.

### Which setups does it support?

Hand-written service workers in any framework (plain HTML, React, Vite, and others), vite-plugin-pwa, Next.js (App and Pages Router), next-pwa / @ducanh2912/next-pwa and Serwist options, and built output folders like dist/ or out/.

### Will it change my code without asking?

No. The audit is read-only. The agent proposes fixes, shows each change, and edits files only after you approve. It never commits, pushes or deploys.

### Our manifest values come from a shared brand package. Will it report them as missing?

No. It resolves same-file constants, relative and @/ imports, and workspace packages inside the scanned folder. Anything it cannot resolve is listed in the report notes as not checked, never as missing, and the fixes keep those values computed.

### Does it work in a monorepo or under a base path?

Yes. It picks the app folder with PWA signals (or use --web-root), and it understands Next.js basePath and Vite base, including a worker registered outside the base path. The worker template resolves its paths against its scope.

### Can it confirm iPhone behaviour?

Not by itself. It finds the code causing known iOS problems and gives you a step-by-step real-device test (install, airplane mode, lock the phone, update, logout) to confirm the fixes.

### Does it create icons?

No. It measures your icon files and lists the exact sizes needed (192, 512, 512 maskable, 180x180 apple-touch-icon). If you have a source logo and an image tool, the agent can offer to resize it with your OK.

### Does it add packages?

Not for plain or Next.js setups. The vite-plugin-pwa templates assume the plugin is already installed; if not, the agent asks before adding it as a local dev dependency.

### Can I run it in CI?

Yes. Exit code 1 means findings at or above --fail-on (default high), 0 means clean, 2 means a bad path, and 3 means the script itself hit an error (the report says which part was skipped). Use --format json for machine-readable output.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
