Skip to content

Modern Web Guidance: Chrome's Skill Pack That Stops AI Agents Writing Legacy Code

AINewss Editorial Team

Modern Web Guidance is a free, open-source skill pack from the Chrome, Edge, Firefox and MDN teams that gives AI coding agents current web platform guidance at the moment they write code. It bundles 250+ modern web features and 200+ use-case guides into an offline search CLI, plus a legacy-scan command for spotting old patterns. This guide covers what Modern Web Guidance includes, how to install it, what its evals show, and where it falls short.

View 2 references
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

A coding agent terminal receiving modern HTML, CSS and JavaScript best practices from the open-source Modern Web Guidance skill pack

What Is Modern Web Guidance?

Modern Web Guidance is a free, open-source skill pack that embeds current web platform expertise, best practices and browser compatibility data directly into an AI coding agent's context window. Published under the GitHub organisation GoogleChrome as GoogleChrome/modern-web-guidance, it is stewarded by the Google Chrome, Microsoft Edge, Mozilla Firefox and MDN teams together with the wider web development community. The project reached version 1.0 on 10 November 2026 and had passed 22,000 GitHub stars by 18 November 2026.

If "Modern Web Guidance" sounds like a generic description, that is deliberate: it is also the product's official name, often shortened to MWG. The official README describes it plainly as a set of skills that keep coding agents up to date with the latest web best practices. There is no fine-tuned model and no hosted service behind it, just a folder of curated Markdown guides, a small offline search CLI and a skill file that tells an agent when and how to use them.

Why Modern Web Guidance Exists

Ask a frontier coding model for a modal, tooltip or form and you will usually get code that works but looks as if it were written in 2017: a div overlay with a manual Escape listener, a scroll listener where CSS would do, or a JavaScript library for something the browser now handles natively. The Modern Web Guidance README names the cause: LLM training data contains vast amounts of legacy code, so agents default to older patterns. That is the gap Modern Web Guidance is built to close.

Even when a model knows a modern API exists, Modern Web Guidance argues, it often lacks the density of real-world implementation patterns needed for production-ready code. Modern Web Guidance bridges that gap by returning targeted, expert-curated guidelines at the exact moment the agent is about to write UI code.

Its three stated focus areas are:

  • Modern browser APIs: helping models correctly structure APIs they frequently misuse.
  • Performance and accessibility: preferring platform-level APIs the browser can optimise and that include built-in accessibility affordances.
  • Responsible fallbacks: sensible, lightweight fallbacks instead of heavy polyfills or legacy libraries.

What Is Covered

Modern Web Guidance currently enumerates 262 modern web features, grouped into 140 CSS and layout features, 37 HTML and DOM features and 85 JavaScript and API features, plus 204 real-world use-case guides. The v1.0.0 release notes described the launch slightly differently, at 203 use-case guides covering 250 web platform features, so treat the counts as a moving target that grows with each release.

Discipline Examples in the guides
CSS and layout Container queries, subgrid, oklch colours, @starting-style, anchor positioning
User experience View Transitions, entry and exit animations, scrollbar-color
Performance Instant preloading, INP diagnostics, scheduler.yield()
Forms and UI Popover API, native dialogs, :user-invalid, auto-sizing fields
Accessibility Screen reader and keyboard operability, OS text scale
Built-in AI On-device translation, summarisation and language detection
Security and components Passkeys, Trusted Types, custom elements and Shadow DOM

Modern Web Guidance coverage is deliberately broad: the guides range from accessibility and forms to Temporal date handling, WebAuthn, WebAssembly and WebMCP. Guides are pruned using evaluations so that content models already handle well does not waste the context budget.

How Modern Web Guidance Works

The workflow is intentionally unglamorous and runs almost entirely offline:

  1. Activate: the skill file tells the agent to run Modern Web Guidance first for HTML, CSS and client-side JavaScript tasks, and not for backend, infrastructure or routine tooling work.
  2. Search: the agent issues a two-to-five-word, action-oriented English query such as "light dismiss dialog", with framework names stripped out. Search uses an offline, zero-dependency embedding model and BM25, with no network calls and no API keys.
  3. Retrieve: the relevant guide is pulled into the context window with code patterns, gotchas and fallbacks.
  4. Verify and disclose: the agent checks its code against the guide and ends its reply with a Modern Web Guidance section naming each guide applied. That disclosure gives a human reviewer a paper trail.

Modern Web Guidance also bakes in safe adoption rules: progressive enhancement over heavy fallbacks, lightweight custom shims of fewer than 50 lines, documented quirks such as the 64 KB request-body quota on fetchLater(), and real-time Baseline compatibility data. Guides for Origin Trial or "volatile" features stay discoverable through search but are gated on retrieval until a developer opts in.

Install and Use It

You can try Modern Web Guidance without installing anything, provided you have Node.js 22 or newer:

npx modern-web-guidance@latest search "animate a dialog modal backdrop"
npx modern-web-guidance@latest retrieve "animate-to-from-top-layer"
npx modern-web-guidance@latest legacy-scan .

The recommended Modern Web Guidance install is a single interactive wizard, with updates handled separately:

npx modern-web-guidance@latest install
npx modern-web-guidance@latest update

The repository also documents other ways to install Modern Web Guidance, including npx skills add GoogleChrome/modern-web-guidance, gh skill install GoogleChrome/modern-web-guidance, and marketplace commands for Claude Code, Codex and Copilot CLI. To allow experimental APIs, commit a .mwgrc file using set-allow-origin-trials and set-allow-volatile-features.

legacy-scan: Find Legacy Patterns

Added in version 1.0 of Modern Web Guidance, legacy-scan . walks a codebase looking for old patterns without calling any AI model, so it is fast and offline. It reports the line and suggests a fix; it does not edit files.

The catch is coverage. Modern Web Guidance says the scanner covers only roughly 20% of guides that have deterministic legacy rules today. An independent hands-on test found it flagged one of four deliberately planted legacy patterns. A clean scan therefore means none of those specific rules matched, not that the whole front end is modern. Used together, the scanner gives a first-pass audit while Modern Web Guidance supplies live guidance as the agent writes.

What the Evals Claim

Modern Web Guidance publishes its own A/B evals through a public Eval Dashboard. Identical tasks are given to three agent CLIs, Antigravity, Claude Code and Codex, with and without the skill, then graded in a real browser using Playwright. Prompts deliberately omit API names so the agent must find the right guide itself.

Google's reported results from 8 November 2026 show large gains: Codex moved from 54% to 82%, Claude Code from 57% to 88% and Antigravity from 58% to 94%. These are the vendor's own numbers, and Modern Web Guidance openly notes that agents can still skip or half-read a guide, so the headline figures are evidence of uplift rather than a guarantee.

Limits, Privacy and Who It Is For

  • It guides, it does not guarantee. A green Baseline badge is not an accessibility audit, and generated code still needs review and real-browser testing.
  • Front-end scope. The skill is meant for HTML, CSS and client-side JavaScript; SQL, CI/CD, Docker and infrastructure scripts are out of scope.
  • Telemetry is on by default. Google collects anonymous data including the calling agent name, guide IDs and the agent's two-to-five-word search queries; raw prompts are not collected. Set DISABLE_TELEMETRY=1 to opt out before touching a client codebase.
  • Licensing. The project is Apache-2.0; guide content under guides/ is CC-BY 4.0 unless otherwise noted.

Modern Web Guidance is most useful for teams whose agents write user-interface code, and for maintainers of older front ends who want a quick, free first pass over legacy patterns. If your agents never touch the UI, it will add little. Overall, Modern Web Guidance will not write perfect front-end code for you, but it makes an agent far more likely to reach for the platform instead of a polyfill.

FAQ

Is Modern Web Guidance free?

Yes. It is Apache-2.0 licensed, needs no account or API key, and the search step runs locally.

Which agents support Modern Web Guidance?

Claude Code, Codex, Cursor, Copilot CLI, Gemini CLI, Antigravity and other agents that can read a skills directory are listed in the repository.

Does Modern Web Guidance replace code review?

No. It supplies current guidance to the agent; a human still has to review, test and audit the result.

Sources

References

  1. Modern Web Guidance - official README (GoogleChrome/modern-web-guidance)raw.githubusercontent.com
  2. GitHub API - GoogleChrome/modern-web-guidance repository metadataapi.github.com