pwa-scaffold

pwa-scaffold is a command for Claude Code from acaprino/daodan. It costs 56 tokens per session (1,583 once invoked), scanned A, original, MIT.

A project command that adds the files needed for a progressive web app, or PWA. A PWA is a web app that can behave more like an installable app, with features such as an app manifest and service worker.

In plain words
What is it for?
Use it to add PWA support to a Vite, Next.js, Angular, Nuxt, or plain web project.
Why use it?
It avoids manually creating the standard PWA setup and adapts the generated files to the framework already used by the project.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the pwa-expert plugin — 1 skill, 3 commands, 1 agent shipped together

Good fit Use it to add PWA support to a Vite, Next.js, Angular, Nuxt, or plain web project.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/acaprino/daodan/pwa-scaffold
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Made for: Claude Code.

Or install pwa-expert, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwa-scaffold

README.md
[![agentmods](https://agentmods.dev/badge/commands/acaprino/daodan/pwa-scaffold/github.svg)](https://agentmods.dev/commands/acaprino/daodan/pwa-scaffold)
Your own site
<a href="https://agentmods.dev/commands/acaprino/daodan/pwa-scaffold"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/pwa-scaffold/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwa-scaffold

Your own site · 80×15
<a href="https://agentmods.dev/commands/acaprino/daodan/pwa-scaffold"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/pwa-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,583 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01583
Opus 5 $0.00028 $0.00792
Sonnet 5 $0.00011 $0.00317
Haiku 4.5 $0.00006 $0.00158

Measured 4d ago against content hash 437813ef82f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pwa-scaffold scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

exports/claude/plugins/pwa-expert/commands/pwa-scaffold.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pwa-expert:pwa-scaffold

Scaffold a production-ready PWA into the current project. Delegate execution to pwa-architect. The agent reads the relevant references (manifest.md, service-workers.md, frameworks-tooling.md) on-demand.

Framework detection

  1. Parse package.json if present.
  2. Look for vite.config.*, next.config.*, angular.json, nuxt.config.* in the project root.
  3. If $ARGUMENTS is provided, use it (one of: vite, next, angular, nuxt, vanilla).
  4. If detection is ambiguous, ask the user via AskUserQuestion which framework to target.

Inputs to collect

Before generating files, use AskUserQuestion to gather:

  1. App name (full): used for manifest name. Example: "Acme Productivity Suite".
  2. App name (short): used for manifest short_name and the iOS meta apple-mobile-web-app-title. Example: "Acme".
  3. Description: used for manifest description.
  4. Theme color (hex): used for manifest theme_color and the <meta name="theme-color">. Default: #0f172a.
  5. Background color (hex): used for manifest background_color and Android splash. Default: #ffffff.
  6. Two primary shortcuts (name + URL each): for manifest shortcuts. Defaults can be skipped if the user does not have them yet.

Idempotency

Before writing each file, check if it exists. If it does, show a diff and ask via AskUserQuestion whether to overwrite, merge, or skip. Never silently overwrite an existing manifest or SW.

Generated artifacts (per framework)

Vite (vite-plugin-pwa)

  • public/manifest.webmanifest with the full set of members per manifest.md (id, display_override, icons any+maskable, screenshots wide+narrow, shortcuts).
  • vite.config.ts (or .js): add the VitePWA plugin from vite-plugin-pwa with registerType: 'prompt', strategies: 'generateSW', manifest reference, workbox.runtimeCaching with the four canonical strategies (CacheFirst for hashed assets, NetworkFirst for navigation with networkTimeoutSeconds: 3, StaleWhileRevalidate for low-criticality data, NetworkOnly + BackgroundSyncPlugin for POST mutations). If vite.config.* already exists, modify it in-place via Edit. Never overwrite.
  • index.html: insert the iOS meta tag block plus <link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"> and <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">.
  • Registration: vite-plugin-pwa provides virtual:pwa-register. Add import { registerSW } from 'virtual:pwa-register' and the workbox-window banner pattern (see service-workers.md) in src/main.ts(x).
  • public/icons/README.md: explain the icon requirements (192+512 PNG any, 192+512 PNG maskable, 180x180 opaque apple-touch-icon.png, optional SVG any). Include the 40 percent safe-zone rule for maskable icons.
  • public/icons/: empty stub files (icon-192.png, icon-512.png, icon-maskable-192.png, icon-maskable-512.png, apple-touch-icon.png) as 0-byte placeholders to make the manifest valid before real icons are supplied.

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 87 lines · 56 tokens per session scan A 437813ef82f7

Subscribe to this mod's changes

pwa-scaffold is a command published in the GitHub repository acaprino/daodan (9 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 1,583 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.