From modern-web-guidance
Use when writing HTML, CSS, JavaScript, forms, or web animations — prevents legacy patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/modern-web-guidance:modern-web-guidanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A reference and search tool for modern web platform APIs. Use before implementing any HTML/CSS/JS feature to check whether a standardised, modern pattern exists — web APIs evolve rapidly and training weights contain obsolete patterns.
A reference and search tool for modern web platform APIs. Use before implementing any HTML/CSS/JS feature to check whether a standardised, modern pattern exists — web APIs evolve rapidly and training weights contain obsolete patterns.
systematic-debugging insteadweb-design-reviewer insteadschema-boundary-typing instead| Situation | Use this skill? | Route instead |
|---|---|---|
| Implement a new UI component in HTML/CSS/JS | ✅ Yes | — |
| Review the design of a running website | ❌ No | web-design-reviewer |
| Debug a runtime CSS/JS error | ❌ No | systematic-debugging |
| Type a TypeScript API edge contract | ❌ No | schema-boundary-typing |
| Audit dead CSS/JS code | ❌ No | fallow |
Required before starting
Helpful if present
Static reference files — consult these first for the most common tasks:
| File | Coverage |
|---|---|
references/css.md | Cascade (@layer, :where()), dark mode, container queries, :has(), anchor positioning, reduced-motion |
references/html.md | Semantics, resource prioritisation (fetchpriority), native dialogs/popovers, inert, media elements |
references/accessibility.md | WCAG 2.2, ARIA patterns, .visually-hidden, live regions, focus management, native dialog usage |
references/performance.md | CWV (LCP/INP/CLS), content-visibility, image optimisation, Service Workers (Workbox), code splitting |
references/forms.md | Autofill, validation timing (:user-invalid), branded selects, payment/sign-in/address forms, security |
Dynamic retrieval — for UX patterns, animations, passkeys, security, built-in AI, WebMCP, and any topic not covered by the static files:
# Step 1: Search with an action-oriented query
npx -y modern-web-guidance@latest search "<query>"
# Returns: [{ id, description, category, featuresUsed, tokenCount, similarity }]
# Step 2: Retrieve the guide
npx -y modern-web-guidance@latest retrieve "<id>"
If search returns low-similarity results, use list to browse all guides:
npx -y modern-web-guidance@latest list
Requires Node.js ≥ 20. Works offline after first install (TensorFlow.js local search, no API keys). On Windows: use
npx.cmdinstead ofnpx.
Browser support policy:
AGENTS.md if the developer: mentions a restricted runtime (Electron, Tauri), excludes specific browser targets, or expresses hesitation about polyfill complexity.Framework adaptation:
Never:
:invalid/:valid for form validation UX — use :user-invalid/:user-valid.position: absolute; clip: rect(0,0,0,0) for visually-hidden elements — use the clip-path: inset(50%) pattern from references/accessibility.md.@layer + :where() for cascade management.Example 1 — Static reference (common task)
"Style a branded
<select>element that matches our design system" → Readreferences/css.md→ section on selectors/scoping →appearance: base-select+::picker(select)
Example 2 — Dynamic retrieval (specific UX pattern)
"Animate a dialog sliding in and fading out when it opens/closes"
npx -y modern-web-guidance@latest search "animate dialog open close"
# → id: "animate-to-from-top-layer"
npx -y modern-web-guidance@latest retrieve "animate-to-from-top-layer"
Example 3 — Dynamic retrieval (passkeys)
"Implement passkey registration and conditional login"
npx -y modern-web-guidance@latest search "passkey registration"
# → id: "passkey-registration"
npx -y modern-web-guidance@latest retrieve "passkey-registration"
| PROVENANCE.md | Skill provenance, changelog, and authorship |
references/css.md — CSS cascade, dark mode, container queries, :has(), anchor positioning, transitions; merged from upstream guides/css/css.md + guides/css-layout/css-layout.md (GoogleChrome/modern-web-guidance v0.0.169, Apache-2.0)references/html.md — HTML semantics, resource prioritisation, native dialogs/popovers, inert; from upstream guides/html/html.mdreferences/accessibility.md — WCAG 2.2, ARIA, .visually-hidden, live regions, focus management; from upstream guides/accessibility/accessibility.mdreferences/performance.md — CWV, LCP/INP optimisation, CSS containment, images, Workbox; from upstream guides/performance/performance.mdreferences/forms.md — Autofill, validation, branded controls, security patterns; from upstream guides/forms/forms.mdnpx modern-web-guidance@latest search/retrieve — covers UX animations, passkeys, built-in AI, scroll effects, WebMCP, security, privacyCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin modern-web-guidance