Chrome, Edge and Firefox teams steer coding agents towards new web features
Modern Web Guidance is a package of guides that plugs into a coding agent and gives it expert advice on new browser features. The aim is to stop the agent writing heavy JavaScript for tasks the browser already has a built-in solution for.
Modern Web Guidance, a package of guides, has been published on the Google Chrome team’s GitHub account and presented on Hacker News. The repository says the Google Chrome, Microsoft Edge, Mozilla Firefox and MDN teams maintain it together with web developers.
The package is a skill: a collection of guides attached to a coding agent, which the agent uses as needed. The agent uses a command-line tool (CLI) to fetch the guide that fits its task, and the tool loads it into the agent’s context window. The guides contain best practices and information on which browsers support which features.
The authors say coding agents often use outdated patterns because large language model training data contains a lot of old code. As a result, agents often write heavy JavaScript for tasks the browser already handles with a fast built-in solution. A model may know about an API but have seen too few examples of how to use it correctly.
The package covers 250 web features and 203 use cases. Topics include CSS layout, animations, forms, accessibility, performance and AI APIs that run locally in the browser for translation and summarisation.
The guides are meant to steer the agent towards lightweight fallbacks instead of heavy polyfills, libraries that emulate missing features. The guide for a toggle switch, for example, advises using HTML’s native switch attribute. If the browser does not support the attribute, a styled checkbox works as the switch.
The authors say the guides are designed to be token-efficient. They test models and prune content the models already know. The test results are on the project’s evaluation page.
The tool also uses a legacy-scan feature to search a codebase for old solutions to update. Gi Pyeong Lee’s technology blog cites the Show HN post and says legacy-scan identifies outdated solutions with about 92 per cent accuracy. Google trained a model on about 30,000 GitHub repositories for the feature, the blog says. The blog does not say how the accuracy was measured.
The package installs with npm through an interactive wizard. Users can also try guide lookup and legacy-scan without installing anything. Detailed instructions are in the project’s GitHub repository and on Chrome’s developer pages.
Read more: How an agent works · Agent map