- Home
- Skills
- Testing & Debugging
- Strict-CSP Static PWA Verification Kit
Strict-CSP Static PWA Verification Kit
None of that shows up in a local server without the policy, or in tests that grep source text.
$29
Works with the AI Agents you already use
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
| Check | Status | File | Finding |
|---|---|---|---|
| no-inline | FAIL | index.html | Inline <style> block detected; violates style-src 'self' |
| service-worker | FAIL | sw.js | ./assets/missing-icon.png does not exist; cache.addAll() will fail |
| manifest | FAIL | manifest.json | icons/icon-192.png actual size 200x200 does not match declared 192x192 |
| selector-ids | PASS | app.js | All getElementById targets exist in DOM |
| relative-paths | PASS | index.html | No root-absolute paths found |
Next steps
- Move the inline CSS in
index.htmlto an external.cssfile to comply with the strict CSP. - Update
sw.jsto remove the 404ing asset from theSHELLarray to enable offline support. - Regenerate the PWA icons to match the dimensions declared in
manifest.json.
index.html
PDF · document
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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+