Strict-CSP Static PWA Verification Kit

    1

    None of that shows up in a local server without the policy, or in tests that grep source text.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Strict-CSP Static PWA Verification Kit

    Example session with this skill installed

    Audit my PWA in the current directory for CSP violations and service worker shell errors using the pwa-check.json config.

    • Read your context and instructions
    • Compiled the strict-csp static pwa
    • Generated the document

    I have completed the PWA verification audit. The scan checked for inline violations, service worker shell integrity, and manifest consistency against your production CSP.

    PWA Verification Report

    CheckStatusFileFinding
    no-inlineFAILindex.htmlInline <style> block detected; violates style-src 'self'
    service-workerFAILsw.js./assets/missing-icon.png does not exist; cache.addAll() will fail
    manifestFAILmanifest.jsonicons/icon-192.png actual size 200x200 does not match declared 192x192
    selector-idsPASSapp.jsAll getElementById targets exist in DOM
    relative-pathsPASSindex.htmlNo root-absolute paths found

    Next steps

    1. Move the inline CSS in index.html to an external .css file to comply with the strict CSP.
    2. Update sw.js to remove the 404ing asset from the SHELL array to enable offline support.
    3. Regenerate the PWA icons to match the dimensions declared in manifest.json.

    index.html

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Static sites behind a strict Content-Security-Policy fail silently: a page renders unstyled with a 200 and a correct title because its inline style was blocked; a service worker never installs because one shell entry 404ed and cache.addAll is atomic; two apps on one origin delete each other's caches because caches are origin-wide. None of that shows up in a local server without the policy, or in tests that grep source text.

    csp-verify-server.mjs: serves your root with the exact policy from a file you keep byte-identical to your web server's configuration (even 404s carry it), correct media types, traversal blocked, and PORT from the environment first so a preview harness that assigns a port is honoured.

    pwa-invariants.mjs + check-pwa.mjs: a CLI with exit codes and JSON output running seven checks: no inline style, script, handler or javascript: URL; no root-absolute paths; every id a script selects exists in a page that loads that script (per page set, comments ignored); service worker shell entries exist and are relative, no developer tooling in the shell, a cache generation constant, cleanup filtered by prefix and never key !== CACHE; manifest id/start_url/scope consistent, icons exist and PNG IHDR dimensions equal the declared sizes, manifest linked relatively; deploy script excludes tools, tests, docs, README, package.json and .git and aborts on a leaked path; bilingual dictionary parity with every data-i18n and t() key resolved.

    runtime-harness.mjs: loads classic scripts in a vm sandbox with stub elements, localStorage and peek() for top-level constants, so a submit handler can be driven; a temporal-dead-zone reference inside an async handler once made every submit throw while 27 text tests stayed green.

    Templates: pwa-check.json, csp.txt, and a deploy.sh that stages from Git objects, excludes by list and aborts on any leak. Reference: the production failure behind each check and the working method. 9 tests on generated good and broken sites. Node 20+, no packages.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    Optimized for classic scripts and HTML. Bundled code requires scanning the output directory. Runtime harness stubs the DOM for logic testing, not for layout or CSS verification.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 18 days ago

    Software
    Node.js 20+

    Permissions

    Write Files
    Read Files
    Network Access
    Listed18 days ago

    What's inside

    Frequently Asked Questions

    This kit prevents production failures like the "White Screen of Death" by serving your static PWA locally with exact CSP headers, catching blocked scripts and service worker cache errors that standard dev servers miss.

    The kit is designed for any environment running Node 20+, making it compatible with most modern AI agents and CI/CD pipelines that support shell execution and file system access.

    You receive a comprehensive suite of Node.js scripts for static auditing, a CSP-aware local server, a runtime sandbox harness, and template configuration files for your security policies.

    Yes, while optimized for vanilla JS and classic scripts, the kit works with any framework as long as you run the audits against the final production build folder rather than the source directory.

    Setup is straightforward: place the configuration files in your project root, define your production CSP in the provided text file, and trigger the audits using standard Node commands.

    No, this kit is built with zero external dependencies to ensure it remains lightweight, secure, and easy to audit within your own infrastructure.

    New in Testing & Debugging