One command stops your AI agent from writing outdated 2019 web code
Chrome, Edge, Firefox, and MDN shipped Modern Web Guidance 1.0 to force your AI coding agents to use modern HTML and CSS.
Tools · Source: Chrome for Developers
What happened
AI coding agents are fast, but they have a bad habit. Ask for a pop-up menu or a smooth animation, and they spit out dozens of lines of outdated JavaScript. The browser can do the same job today with a few lines of modern HTML or CSS. To fix this, Google Chrome released Modern Web Guidance 1.0.
This is an open-source skill bundle for coding agents. It packs over 200 expert guides covering 250 web features. When your agent takes a front-end task, it searches this local database offline. It pulls the right code pattern, pitfalls, and Baseline browser compatibility data before it writes a single line of code.
The project is now a massive cross-browser effort. Firefox, Edge, and MDN joined Chrome to maintain it. It installs with one simple terminal command, npx modern-web-guidance@latest install. It also has plugin marketplace installs for Claude Code, Copilot CLI, and Antigravity.
Key facts
- 200 — expert guides included in the bundle
- 250 — web platform features covered by the guides
- 45,000 — open-source repositories used to test scanner rules
- 90% — required precision on unseen code for a rule to ship
Why it matters
Speed is no longer a competitive advantage when everyone uses AI to code. Quality is the new baseline. Agents often fail at accessibility, performance, and security. They mess up keyboard focus, block the main thread, cause layout shifts, or ignore passkeys. This tool steers them toward standard, secure solutions that modern browsers already support natively.
The biggest shift is how we handle old codebases. Most development happens in existing projects full of old workarounds and polyfills. Version 1.0 includes a legacy-scan command. It analyzes your existing HTML, CSS, JavaScript, TypeScript, and package.json files to flag outdated patterns. It does this using static analysis, meaning zero language model calls and zero token costs. The rules were tested on 45,000 open-source repositories. To ship, a rule must hit 90 percent precision on unseen code. It currently covers about twenty percent of the guides where legacy code is easily recognized.
For builders
Zero token cost legacy code scanning
The new legacy-scan command runs locally without hitting an API. Founders save money on token costs while identifying technical debt. It flags outdated patterns but leaves the actual fixing to you. There is no automatic fix flag because updates often cut across layers, preventing agents from breaking your app by blindly swapping JavaScript for CSS.
Better accessibility and security by default
AI models often hallucinate bad ARIA tags or weak HTML sanitization. This tool forces the agent to use expert-reviewed patterns tested with real assistive technologies. You get more secure, accessible products without hiring a dedicated front-end specialist. The guides even help with swipe gestures and dark themes.
Offline search protects your codebase
The skill bundle runs entirely offline through a local CLI. Your agent retrieves patterns without sending your proprietary code over a network. Enterprise builders who worry about software supply-chain security can use this without leaking data. It responds directly to latency and privacy concerns.
My take
AI agents are brilliant idiots. They know every JavaScript hack from 2019 but ignore native browser features shipped last year. Forcing them to read the manual locally before they type is the exact kind of guardrail we need to build production-grade apps. Speed is cheap now, but quality still pays.
Original reporting: Chrome for Developers. This is my rewrite and opinion.