Review frontend

From sazardev/networking-with-go · View interactive version

Review frontend is an AI agent skill from the GitHub repository sazardev/networking-with-go. Use when reviewing, debugging, or improving frontend code in this repo (website/ HTML, CSS, JS, service workers, PWA assets) or when asked to "review frontend", "revisa el html/css", "review JS", or "audita el frontend". Reviews for correctness, browser compatibility, accessibility, performance, sec

How to use this skill

Skill file

Frontend Review (HTML / CSS / JavaScript)

You review frontend code like a user, a screen-reader user, a security

reviewer, and a mobile browser all at once. You assume the site will be opened

on a slow phone with a screen reader, and that every input is hostile.

Steps

  1. Read all files in scope (HTML, CSS, JS, service worker) as a unit —

the bug is usually in the interaction between them.

  1. Check the structure mechanically — for JS, node --check file.js for

syntax; look for unbalanced tags, missing closing braces, undefined

functions used. Note the repo has no build step: the browser runs these

files as-is.

  1. Review the dimensions below.
  2. Scenario pass — think like a user on a phone, on an old browser, with

JS disabled, offline, with a screen reader.

  1. Report in the output format at the bottom.

Review dimensions

  1. Correctness — does the JS do what it claims? Right element selected,

right event wiring, no null/undefined access, no stale references after

DOM changes. Watch for code that only works when scripts load in one order.

  1. Security (XSS and injection) — never insert untrusted text into the DOM

via innerHTML/outerHTML/insertAdjacentHTML or document.write.

Use textContent for data. Escape URLSearchParams/location.hash values

before rendering. Check every place user/URL/query data reaches the DOM.

  1. Accessibility — semantic HTML (<nav>, <main>, headings in order),

alt text on images, labels tied to inputs, keyboard navigability, focus

states visible, aria used correctly and not overused, contrast meets

WCAG AA, no content-only-on-hover. A screen reader must be able to use the

site.

  1. Performance — render-blocking scripts, image sizes, no layout thrash

(DOM writes between reads), passive listeners for scroll/touch, no

unbounded DOM growth, requestAnimationFrame for visual work, caching

headers/service-worker strategies sensible for static content.

  1. Responsive/mobile — viewport meta present, no fixed pixel widths that

break on small screens, touch targets large enough, media queries testable,

horizontal overflow from long content.

  1. Browser compatibility — features used are supported or guarded

(IntersectionObserver, optional chaining ?., fetch) with graceful

fallbacks; old browsers degrade, not crash.

  1. Service worker / PWA correctness — correct scope, cache versioning

(bump or the new version never ships), no stale-cache-after-update bug,

offline fallback sane, no aggressive cache-first for HTML that goes stale,

sw-precache.js/sw.js strategy matches the asset list.

  1. Robustness — JS fails gracefully if an element or API is missing; no

try/catch that swallows real errors; network errors handled (not just

.catch(console.error)).

Scenario checklist (the superpower)

first-paint?

and URL param: does it render or execute?

Output format

content forever, inaccessible core path.

unhandled errors.

Each with file:line, the problem, and the fix as a code snippet.

re-trace the scenario) before reporting done.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.