← Blog AI Oct 20, 2026 · 6 min read

Modern Web Guidance: Stop AI Agents Writing 2019-Era Code

Modern Web Guidance gives coding agents current HTML, CSS and JavaScript know-how. What the Chrome-led package covers and how to add it to your website project.

Modern Web Guidance: Stop AI Agents Writing 2019-Era Code

AI coding agents are fast, but they often reach for old habits: custom JavaScript modals, tooltip libraries and layout hacks that modern browsers no longer need. Modern Web Guidance is a free, open package of skills that teaches agents current web platform features. Here is what it is, what it covers, and how to add it to your own website project in a few minutes.

What Modern Web Guidance is

Modern Web Guidance (github.com/GoogleChrome/modern-web-guidance) is a set of skills for coding agents that adds web platform expertise, best practices and browser compatibility data. The README says it is stewarded by teams from Google Chrome, Microsoft Edge, Mozilla Firefox and MDN, with input from the wider web community.

The idea is simple. Language models learned from years of older code on the internet, so their "default" answer is often an older pattern. These skills give the agent up-to-date guidance at the moment it writes code.

Key facts:

  • License: Apache-2.0.
  • Popularity: about 23,900 GitHub stars when I checked.
  • Scope: 262 modern web features and 204 real-world use cases, according to the README.
  • Version 1.0: the Chrome for Developers page highlights the 1.0 release with over 200 expert-vetted skills and a public evaluation benchmark, developed with input from Mozilla and Microsoft.

Why it matters: the benchmark number

Chrome's documentation cites a public benchmark in which unguided frontier models passed about 51% of modern web checks, compared with 91% when using Modern Web Guidance. Treat any benchmark with care (our guide on how to read AI benchmarks explains why), but the gap shows the problem is real: agents left alone often write code that works yet ignores better, built-in browser features.

What it covers

The README groups features into three big areas:

  • CSS and layout (140 features): container queries, subgrid, anchor positioning, scroll-driven animations and more.
  • HTML and DOM (37 features): the <dialog> element, the Popover API, customizable <select>, custom elements.
  • JavaScript and APIs (85 features): Temporal, the Scheduler API, the Navigation API.

Use cases span accessibility, forms, performance, privacy, PWAs, security and common UI components.

Examples of the guidance

  • Forms: validate only after the user interacts, and sync aria-invalid with the :user-invalid state so screen readers announce errors when sighted users see them.
  • Dialogs: use <dialog> and animate elements entering and leaving the top layer, with light dismiss support.
  • Tooltips: migrate legacy tooltip code to the Popover API plus CSS anchor positioning.
  • Performance: lazy-load offscreen video and audio, and break up long tasks to improve INP (Interaction to Next Paint).
  • CSS: container queries for component-level responsiveness and :has() to style a parent based on its children.

These are exactly the areas where older code adds weight and bugs to small business sites. Lighter code also helps site speed, which matters for small businesses.

How to add it to your project

The recommended route is the interactive installer:

npx modern-web-guidance@latest install

Other official options listed by Chrome:

  • Vercel Agent Skills: npx skills add GoogleChrome/modern-web-guidance
  • Claude Code: claude plugin marketplace add GoogleChrome/modern-web-guidance then claude plugin install modern-web-guidance@googlechrome
  • Copilot CLI (inside the CLI): /plugin marketplace add GoogleChrome/modern-web-guidance then /plugin install modern-web-guidance@googlechrome
  • Antigravity CLI: agy plugin install https://github.com/GoogleChrome/modern-web-guidance

The repository also contains plugin manifests for Codex, Cursor, Gemini, Grok and Kimi.

Try it without installing

You can search the guidance directly from the terminal:

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 legacy-scan command is the most useful starting point for an existing site: it looks for older patterns that could be migrated.

A practical workflow for an existing website

  1. Back up or commit your project so you can roll back.
  2. Run legacy-scan and save the output.
  3. Pick one area (for example modals) instead of refactoring everything at once.
  4. Ask your agent with the skills installed:
Using the modern web guidance skills, replace our custom modal
in /components/modal with a native <dialog> implementation.
Keep the same look, keep keyboard and screen reader support,
and list any browser support caveats before you change code.
  1. Test on a real phone, with keyboard only, and with a screen reader if you can.
  2. Check browser support for your audience. Modern does not mean everyone's browser has it; the skills include compatibility data for this reason.
  3. Repeat for the next pattern.

What it will not do

  • It does not design your site. For visual quality, pair it with design skills such as those in our Impeccable vs Hallmark comparison.
  • It does not replace testing or code review.
  • It does not guarantee every suggestion fits your users' browsers; you still decide.

Who should use it

  • Freelance web developers building client sites with AI help.
  • Small business owners who use an agent to edit their own site and want cleaner code.
  • Learners who want to see the modern way to build common components. It pairs well with our web development roadmap for the AI era.

As a web developer, I like this kind of tool because it corrects the agent at the source instead of me fixing the same outdated pattern in every project.

Key takeaways

  • Modern Web Guidance is a free, Apache-2.0 set of skills that teaches coding agents current HTML, CSS and JavaScript.
  • It is stewarded by Chrome, Edge, Firefox and MDN teams and covers 262 features and 204 use cases.
  • Chrome cites a benchmark jump from about 51% to 91% of modern web checks with the guidance.
  • Install with npx modern-web-guidance@latest install, or start with legacy-scan on an existing site.
  • Refactor one pattern at a time, test on real devices and confirm browser support.

FAQ

Is Modern Web Guidance only for Chrome?

No. It is stewarded by Chrome, Edge, Firefox and MDN teams and includes browser compatibility data, so the guidance is about the web platform, not one browser.

Which coding agents support it?

Chrome documents installs for Claude Code, Copilot CLI, Antigravity CLI and Vercel's skills tool, and the repo includes manifests for Codex, Cursor, Gemini, Grok and Kimi.

Does it cost anything?

No. It is open source under Apache-2.0. You only pay for whatever AI agent or model you already use.

Sources

Read next