Coding agents frequently generate bloated, outdated JavaScript because their training data is saturated with legacy code patterns from years past. To address this, Google Chrome, Microsoft Edge, Mozilla Firefox, and MDN have collaborated on 'Modern Web Guidance,' a set of skills that embeds web platform expertise and browser compatibility data directly into an agent's context window.

This image illustrates the type of coding agent environment that the Modern Web Guidance project is designed to assist.
Bridging the Knowledge Gap in AI Training
While frontier coding models are capable of producing functional code, they often lack the density of real-world, modern implementation patterns required for production-ready software. Modern Web Guidance bridges this gap by providing targeted guidelines that help models correctly structure APIs they frequently misuse.
The tool focuses on steering agents toward native solutions. For example, it encourages using HTML or CSS features that can perform tasks with less code than custom JavaScript, which typically results in better performance and improved accessibility.
“Modern Web Guidance is a set of skills that embed web platform expertise, best practices, and browser compatibility data directly into your coding agents.”
— GitHub - GoogleChrome/modern-web-guidance: Keep your coding agent up to date with the latest web best practices
Core Disciplines and Feature Coverage
The guidance covers a wide array of modern web capabilities, including 140 CSS and layout features such as container queries, subgrid, and the oklch color space. It also includes 74 JavaScript and API features, such as the Scheduler API, Temporal, and the Translator API.

This table provides a visual example of the extensive feature coverage across disciplines like CSS and JavaScript.
Chart drawn by HN Digest from figures reported by github.com; values are shown as written in the source.
Specific focus areas include 'Responsible Fallbacks,' which guide models to use lightweight alternatives instead of heavy polyfills, and 'Built-in AI,' which leverages on-device browser APIs for tasks like summarization and language detection.

This visual supports the description of the specific JavaScript and API features included in the project.
Modernization Workflow and Limitations
Version 1.0 introduces a modernization workflow that analyzes HTML, CSS, JavaScript, and package.json files to identify opportunities for safe upgrades. This allows developers to use the agent to systematically replace outdated workarounds with modern primitives.
Currently, this workflow uses static analysis on a narrow scope to ensure predictable results. The project team plans to expand this in the future to include 'agentic audits,' where the AI reasons about the code directly rather than just matching known patterns.
What Hacker News readers are saying
- Experience: One commenter shared that they had previously developed their own tools to address the issue of AI-generated code using verbose legacy patterns instead of modern features. comment ↗
- Skeptical: One user expressed concern that the project could lead to a situation where AI models prioritize the guidance of a dominant browser over broader web standards. comment ↗
- Alternative: A commenter suggested that instead of requiring installations, the guidelines could be hosted as a searchable markdown index that agents could fetch via HTTP requests. comment ↗
- Skeptical: Another reader argued that injecting these practices into an agent might result in the model producing an 'average' of the guidelines, which they felt could be ineffective. comment ↗
Summarized opinions from the Hacker News thread, not verified facts. Read the full discussion ↗