agentleFS
Autocss-comAutocss-com/ai/.agents/skills/pwa/SKILL.md

pwa

Skill1 starsChanged 2 months agoMITView on GitHub

Progressive Web App rules for projects following the air-gapped, declarative-first architecture. Defines the manifest as the entry point and the architectural reasoning for defaulting to PWA. Use whenever a project starts (defaulting to PWA is non-negotiable), or when configuring manifest, service-worker scope, or install behavior.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every project in this architecture defaults to Progressive Web App.

    line 11
  2. Distinctive:

    Update itself on each new shell version

    line 80
  3. Very specific:

    If a project genuinely needs a custom in-page install affordance, the pattern uses the beforeinstallprompt event in the data-layer JS — …

    line 88
  4. Very specific:

    Never depends on a third-party PWA framework (Workbox, etc.) at runtime — see the architecture skill's "no third-party runtime …

    line 92
  5. Distinctive:

    Never embeds secrets in the manifest or in service-worker code

    line 93
  6. Distinctive:

    Never introduces UI logic into the service worker (service worker is data-layer only)

    line 94
  7. Distinctive:

    Never blocks or replaces the native install prompt with a custom UI unless explicitly required and surfaced to the user

    line 95

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PWA

Every project in this architecture defaults to Progressive Web App. The decision is made once, at project start, and not revisited per-project.

Why default to PWA

The architecture's load-bearing property is that the presentation layer is a portable static resource — HTML + CSS only, no JS driving the UI. PWA is the deployment posture that makes that property concrete:

  • A service worker can cache the static shell, so the front-end works offline.
  • A web app manifest lets the browser promote the shell to an installed app.
  • The back-end remains independent. The oninput boundary still defines the data contract.

PWA introduces no new architectural seams. It deepens the ones already present.

Scope

PWA spans multiple disciplines. Each piece has a single home:

ConcernOwned by
Manifest file (manifest.webmanifest)this skill
Manifest <link> in HTML <head>html skill (references/shell-layout.md)
Service worker file and registrationjavascript skill
HTTPS and HSTS headerssecurity skill (references/headers.md)
App icons (brand-bound)assets/images/brand/

This skill owns the PWA-specific surface: manifest format, install behavior, and the rationale. Cross-cutting pieces live in their own skills with pointers from here.

The manifest

A single JSON file at project root, named manifest.webmanifest, linked from <head>:

<link rel="manifest" href="manifest.webmanifest" />

Minimal manifest:

{
  "name": "Project Name",
  "short_name": "Project",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": [
    {
      "src": "assets/images/brand/icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "assets/images/brand/icon-512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

Icons live under assets/images/brand/ because they are brand-bound (the architecture splits brand assets from project-functional assets).

Service worker

A service worker is JavaScript that sits below the oninput boundary, doing data work — specifically, caching the static shell and proxying API requests. It does not drive the UI.

Service worker responsibilities:

  • Cache the static shell (index.html, assets/css/*.css, assets/js/*.js, brand images) for offline use
  • Proxy API requests through to the network with per-route caching strategies
  • Update itself on each new shell version

The implementation file is one of the permitted JS files in assets/js/ and is registered from app.js. The javascript skill catalogues which JS files exist.

Install behavior

The browser provides the install prompt natively when manifest requirements are met. The architecture uses the browser-supplied prompt as-is; no custom install UI is implemented unless explicitly required.

If a project genuinely needs a custom in-page install affordance, the pattern uses the beforeinstallprompt event in the data-layer JS — never the presentation layer.

What PWA never does in this architecture

  • Never depends on a third-party PWA framework (Workbox, etc.) at runtime — see the architecture skill's "no third-party runtime dependencies" rule
  • Never embeds secrets in the manifest or in service-worker code
  • Never introduces UI logic into the service worker (service worker is data-layer only)
  • Never blocks or replaces the native install prompt with a custom UI unless explicitly required and surfaced to the user

Baseline & support

Checked against MDN as of 2026-07-16.

Canonical rules: https://github.com/Autocss-com/ai/blob/main/AGENTS.md

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.