New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Modern Web Reference

Modern web guidance

by GoogleChrome · Apache-2.0 license · ★ 2,407 on GitHub

Modern web guidance cover

Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks.

---
name: modern-web-guidance
description: |
  Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns.

  Trigger immediately for:
  - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`.
  - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals.
  - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization.
  - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets.
  - Frameworks: Adapting layout/styles in React, Vue, Angular.
  - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc.

  DO NOT trigger for:
  - Backend: Database SQL, ORMs, Express API routes.
  - Pipelines: CI/CD deployment, Docker, Actions.
  - Generic: Local scripts (Python/Go tools), ESLint, Git.
---

Overview

A skill to search for specific web development use cases and retrieve their corresponding best practice guides.

Manual install (npx, ZIP)
Claude Codenpx skills add GoogleChrome/modern-web-guidance --skill modern-web-guidance -g -a claude-code
Claude Code (degit)npx degit GoogleChrome/modern-web-guidance/skills/modern-web-guidance#main ~/.claude/skills/modern-web-guidance
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md6.6 KB
Read SKILL.md here
GoogleChrome/main1 file shown
SKILL.md
Show the full text124 lines

Modern Web Guidance

A skill to search for specific web development use cases and retrieve their corresponding best practice guides.

When to use

Must use this skill:

  • At the start of implementing any web feature.
  • Before creating a new component, to check if a standardized pattern already exists.
  • To avoid implementing ad-hoc solutions or loading large dependencies unnecessarily.

Usage Instructions

Step 1. Search Use Cases

Search with an action-oriented query summarizing what you want to achieve using the search command. Run modern-web-guidance directly with npx.

npx -y modern-web-guidance@latest search "<query>" --skill-version 2026_09_04-7de96777

Example Output:

[
  {
    "id": "optimize-image-priority",
    "description": "Optimize the loading priority of Largest Contentful Paint (LCP) candidate images.",
    "category": "performance",
    "featuresUsed": [ "Fetch priority" ],
    "tokenCount": 985,
    "similarity": 0.7289
  },
  {
    "id": "defer-rendering-heavy-content",
    "description": "Reduce rendering times in content-heavy web pages by deferring rendering for offscreen content.",
    "category": "performance",
    "featuresUsed": [ "content-visibility", "hidden=\"until-found\"" ],
    "tokenCount": 1250,
    "similarity": 0.6961
  }
]

Note: If search results are vague, return no matches, or show low similarity scores, run the list command to browse all guides:

npx -y modern-web-guidance@latest list

Step 2. Retrieve Best Practices

Once you have a relevant id from the search results, call this script using the retrieve command to get the full guide. You can pass multiple IDs separated by commas.

npx -y modern-web-guidance@latest retrieve "<id>"

If the output is truncated, you must repeat the command but redirect to a file and read that file.

Example Output: The markdown content of the guide describing implementation steps...


Step 3. Verify Guidance Compliance

When generating or modifying code, cross-check the implementation against the retrieved guide before concluding:

  • Applicable Guidance & Fallbacks: Ensure the relevant modern patterns and necessary fallback strategies from the guide are correctly applied, without forcing unrequested features.
  • Task Fulfillment: Confirm that the implementation fully satisfies the user's request.

Using npx / pnpx

  • Prefer pnpx over npx if pnpm is available (note: pnpx does not use the -y flag).
  • When requesting tool permissions, allowlist npx -y modern-web-guidance@latest * specifically (or pnpx modern-web-guidance@latest *), never bare npx * or pnpx *.
  • IMPORTANT: on Windows, using npx may fail. Use npx.cmd ... instead.
  • Fetching and running modern-web-guidance requires outbound network access. If running in a sandboxed, permission-gated, or approval-based environment (e.g., Codex, Claude Code), proactively request approval/allowlisting for the command with network access BEFORE executing it the first time, avoiding sandbox network timeouts.
  • In sandboxed environments where ~/.npm is read-only or restricted, set NPM_CONFIG_CACHE=/tmp/npm-cache.
  • If the command hangs due to being offline, try running again in offline mode: npx --offline ….
  • The --skill-version flag is used to determine if this SKILL.md is out of date. If it is, a warning message is logged to stderr.

Guidelines

  • Always search first to find the most relevant guides.
  • These guides are usually framework-agnostic; adapt them correctly to your setup.
  • Do not hallucinate guides or ignore them; they represent the preferred local standard for the user's project.

Interpreting Browser Support & Fallbacks

  • Default Behavior: All guides assume Baseline Widely available features are safe to use without fallbacks. For features that are not Baseline widely available, you MUST follow the fallback recommendations in the guide, unless the user has specified a custom browser support policy.

  • Custom Policies: If the user has already defined explicit browser support requirements, use the browser compatibility data in the guide to determine if a fallback can be safely ignored.

    • For Baseline YYYY targets, a feature satisfies this target if its "Baseline since" date is <= YYYY.
    • Policy Examples:
      • "Do not implement feature fallbacks." (for exploratory prototypes of the cutting-edge web)
      • "Safari 17.4+" (for internal tools targeting macOS or Tauri-based desktop apps)
      • "Never recommend or implement polyfills; if a Baseline Newly Available feature is required for core functionality, provide a lightweight custom fallback or redesign the approach." (to minimize bundle size and avoid technical debt)
      • "Assume a modern execution environment where Baseline Newly Available features can be used natively, provided they are strictly feature-detected and degrade gracefully." (for progressive enhancement strategies)
  • Reactive Policy Discovery: Watch for environmental cues to suggest documenting a policy in CLAUDE.md or AGENTS.md. Suggest this if the developer:

    • Mentions building for a restricted runtime (e.g., Electron or Tauri).
    • Explicitly excludes specific targets (e.g., "we don't support Desktop Chrome").
    • Expresses hesitation about polyfill complexity, bundle size, or performance cost.
    • Questions if a feature is safe to use without fallbacks.

    No defined policy format. This is an example: **Browser Support:** Allow Newly Available features, but only adopt custom fallback code that adds <= 20 lines and does not require external dependencies.

1---
2name: modern-web-guidance
3description: |
4 Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns.
5 
6 Trigger immediately for:
7 - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`.
8 - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals.
9 - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization.
10 - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets.
11 - Frameworks: Adapting layout/styles in React, Vue, Angular.
12 - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc.
13 
14 DO NOT trigger for:
15 - Backend: Database SQL, ORMs, Express API routes.
16 - Pipelines: CI/CD deployment, Docker, Actions.
17 - Generic: Local scripts (Python/Go tools), ESLint, Git.
18---
19 
20# Modern Web Guidance
21 
22A skill to search for specific web development use cases and retrieve their corresponding best practice guides.
23 
24## When to use
25 
26Must use this skill:
27- At the **start** of implementing any web feature.
28- Before creating a new component, to check if a standardized pattern already exists.
29- To avoid implementing ad-hoc solutions or loading large dependencies unnecessarily.
30 
31## Usage Instructions
32 
33### Step 1. Search Use Cases
34 
35Search with an action-oriented query summarizing what you want to achieve using the `search` command. Run `modern-web-guidance` directly with `npx`.
36 
37```sh
38npx -y modern-web-guidance@latest search "<query>" --skill-version 2026_09_04-7de96777
39```
40 
41**Example Output**:
42```json
43[
44 {
45 "id": "optimize-image-priority",
46 "description": "Optimize the loading priority of Largest Contentful Paint (LCP) candidate images.",
47 "category": "performance",
48 "featuresUsed": [ "Fetch priority" ],
49 "tokenCount": 985,
50 "similarity": 0.7289
51 },
52 {
53 "id": "defer-rendering-heavy-content",
54 "description": "Reduce rendering times in content-heavy web pages by deferring rendering for offscreen content.",
55 "category": "performance",
56 "featuresUsed": [ "content-visibility", "hidden=\"until-found\"" ],
57 "tokenCount": 1250,
58 "similarity": 0.6961
59 }
60]
61```
62 
63> **Note**: If search results are vague, return no matches, or show low similarity scores, run the `list` command to browse all guides:
64> ```sh
65> npx -y modern-web-guidance@latest list
66> ```
67 
68---
69 
70### Step 2. Retrieve Best Practices
71 
72Once you have a relevant `id` from the search results, call this script using the `retrieve` command to get the full guide. You can pass multiple IDs separated by commas.
73 
74```sh
75npx -y modern-web-guidance@latest retrieve "<id>"
76```
77 
78If the output is truncated, you must repeat the command but redirect to a file and read that file.
79 
80**Example Output**:
81`The markdown content of the guide describing implementation steps...`
82 
83---
84 
85### Step 3. Verify Guidance Compliance
86 
87When generating or modifying code, cross-check the implementation against the retrieved guide before concluding:
88- **Applicable Guidance & Fallbacks**: Ensure the relevant modern patterns and necessary fallback strategies from the guide are correctly applied, without forcing unrequested features.
89- **Task Fulfillment**: Confirm that the implementation fully satisfies the user's request.
90 
91## Using npx / pnpx
92 
93- Prefer `pnpx` over `npx` if `pnpm` is available (note: `pnpx` does not use the `-y` flag).
94- When requesting tool permissions, allowlist `npx -y modern-web-guidance@latest *` specifically (or `pnpx modern-web-guidance@latest *`), never bare `npx *` or `pnpx *`.
95- IMPORTANT: on Windows, using `npx` may fail. Use `npx.cmd ...` instead.
96- Fetching and running `modern-web-guidance` requires outbound network access. If running in a sandboxed, permission-gated, or approval-based environment (e.g., Codex, Claude Code), **proactively request approval/allowlisting for the command with network access BEFORE executing it the first time**, avoiding sandbox network timeouts.
97- In sandboxed environments where `~/.npm` is read-only or restricted, set `NPM_CONFIG_CACHE=/tmp/npm-cache`.
98- If the command hangs due to being offline, try running again in offline mode: `npx --offline …`.
99- The `--skill-version` flag is used to determine if this SKILL.md is out of date. If it is, a warning message is logged to stderr.
100 
101## Guidelines
102 
103- Always search **first** to find the most relevant guides.
104- These guides are usually framework-agnostic; adapt them correctly to your setup.
105- Do not hallucinate guides or ignore them; they represent the preferred local standard for the user's project.
106 
107## Interpreting Browser Support & Fallbacks
108 
109* **Default Behavior**: All guides assume **Baseline Widely available** features are safe to use without fallbacks. For features that are not Baseline widely available, you **MUST** follow the fallback recommendations in the guide, unless the user has specified a custom browser support policy.
110* **Custom Policies**: If the user has already defined explicit browser support requirements, use the browser compatibility data in the guide to determine if a fallback can be safely ignored.
111 - For Baseline YYYY targets, a feature satisfies this target if its "Baseline since" date is <= YYYY.
112 - **Policy Examples**:
113 - _"Do not implement feature fallbacks."_ (for exploratory prototypes of the cutting-edge web)
114 - _"Safari 17.4+"_ (for internal tools targeting macOS or Tauri-based desktop apps)
115 - _"Never recommend or implement polyfills; if a Baseline Newly Available feature is required for core functionality, provide a lightweight custom fallback or redesign the approach."_ (to minimize bundle size and avoid technical debt)
116 - _"Assume a modern execution environment where Baseline Newly Available features can be used natively, provided they are strictly feature-detected and degrade gracefully."_ (for progressive enhancement strategies)
117* **Reactive Policy Discovery**: Watch for environmental cues to suggest documenting a policy in CLAUDE.md or AGENTS.md. Suggest this if the developer:
118 - Mentions building for a restricted runtime (e.g., Electron or Tauri).
119 - Explicitly excludes specific targets (e.g., "we don't support Desktop Chrome").
120 - Expresses hesitation about polyfill complexity, bundle size, or performance cost.
121 - Questions if a feature is safe to use without fallbacks.
122 
123 No defined policy format. This is an example: `**Browser Support:** Allow Newly Available features, but only adopt custom fallback code that adds <= 20 lines and does not require external dependencies.`
124 
View all files on GitHub →

Details

License
Apache-2.0
Stars on the repo
★ 2,407
Checked
Source
GoogleChrome/modern-web-guidance ↗
Creator
GoogleChrome · 1 listing
View creator

Similar skills

See all →
Motion Effect Glossaryemilkowalski/skills · by emilkowalskiReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.★ 40.8k GitHub starsWatercolor Animation Generatoredenfunf/reelmimic · by edenfunfMake hand-painted watercolour-and-ink cartoon videos (MP4) with code — p5.js + p5.brush rendered frame by frame in headless Chrome, encoded with ffmpeg — starring Clawd or any character. Use when the user asks to make an animation, animated short, cartoon, music video, lyric video, animated GIF/loop or "a video of Clawd…", or mentions the PDoomVideo / ClaudeAnimationBase approach. Covers storyboarding, the engine API, the render-and-look review loop, music/lyric sync and splitting long videos across subagents.★ 3.6k GitHub starsTailwind UI Componentsnextlevelbuilder/ui-ux-pro-max-skill · by nextlevelbuilderCreate beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.★ 130k GitHub starsWeb-to-Native Mobile Optimizeremilkowalski/skills · by emilkowalskiMake a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.★ 40.8k GitHub starsAnimation Opportunity Scoutemilkowalski/skills · by emilkowalskiSearch a codebase or UI for places that don't animate but should, and reject everything that shouldn't. Read-only; it proposes motion with exact values, it does not implement it. Use when the user asks "what could be animated here?" or wants to "make this feel more alive". For fixing existing animations, use improve-animations or review-animations instead.★ 40.8k GitHub starsAnimation Code Revieweremilkowalski/skills · by emilkowalskiReviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.★ 40.8k GitHub stars