Live Nov 18 · Cohort 3Nov 18, 19:00 MSK — free hands-on AI agents live workshop · Live Cohort 3 starts Nov 23Join Nov 18 Live →Cohort 3 (Nov 23)
ReleaseCode / SDK · ActionableHacker News AI→ original

Chrome Teaches Coding Agents to Write Without Hacks: Task Success Rises from 55% to 92%

Coding agents know about <dialog>, CSS.highlights and field-sizing, but out of habit they write <div> elements and dozens of lines of 2019-style JS. The Chrome team, together with Firefox, MDN and Edge, has released modern-web-guidance 1.0: open guides that plug into an agent as a skill. On 200 tasks, the share of passed checks rose from 55% to 92%.

AI-processed from Hacker News AI; edited by Hamidun News
Chrome Teaches Coding Agents to Write Without Hacks: Task Success Rises from 55% to 92%
Source: Hacker News AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHacker News AI ↗
Editor-in-Chief
Key metric #1200+ guides (~1.7 MB) from web experts, available as a skill and a CLI
Guide search~7 MB of pure JS, about 10 ms on a CPU
Key metric #3legacy-scan finds outdated patterns in code, with an average accuracy of 92%

Ask Claude or Codex to build a modal window, and you will most likely get a <div> with an overlay, manual focus management and a pile of JS. Meanwhile, the browser has long had <dialog> with showModal(): the backdrop, focus handling and closing on Escape all work out of the box. Models know about these things, but out of habit they choose the pattern that appears most often in their training data. The Chrome team decided to tackle this problem head-on.

What Was Released

The modern-web-guidance project has reached version 1.0. It was built together with Firefox, MDN and Edge. Inside are 200+ hand-written guides (about 1.7 MB) on how to solve typical frontend tasks using the platform's own capabilities. Examples: CSS.highlights highlights fragments of text without a scattering of <span> elements, field-sizing stretches a textarea as you type, and <dialog> replaces homemade modals.

The guides are delivered to the agent as a skill plus a CLI with agentic RAG search. The author says he spent nine months looking for a way not to bloat the context window and not to depend on the activation mechanics in MCP. The skill description is tuned so that it triggers specifically on frontend tasks. The search stack originally weighed about 500 MB in native form; now it is pure JS at ~7 MB, and a search takes about 10 ms on an ordinary processor.

Numbers and Verification

The authors built an evaluation infrastructure. Codex, Claude and agy were run on 200 tasks, first without the skill, then with it. About 1,700 assertions are checked using Playwright and AST parsing. Without the guides, 55% of checks pass; with the guides, 92%.

The evaluation is also useful for the reverse task: if an agent handles a certain pattern well without any hints, the guide can be deleted. According to the author, some things the team considered a weak spot for models turned out to be known to them better than expected.

A separate new feature is called legacy-scan. It is a deterministic scanner trained on 30 thousand GitHub repositories. It finds outdated patterns that an agent can replace with modern ones. Average accuracy on held-out repositories is 92%.

How to Try It

Everything is installed via npx:

  • npx modern-web-guidance@latest install connects the skill
  • search "animate dialog modal" searches the guides
  • legacy-scan ./src checks your code

Telemetry is disabled with the DISABLE_TELEMETRY=1 variable. You should do this right away if you work with closed-source code.

Limitations and Takeaway

The main caveat is that the rise from 55% to 92% was measured on the authors' own benchmark. The tasks and checks were chosen to fit the guides, so on your project the gain may be more modest. In addition, modern APIs require support in the target browsers, and you still need to check an agent's output for compatibility with your audience.

The practical takeaway is simple. If you write frontend with the help of agents, install the skill and run legacy-scan over your code. The first will reduce the amount of unnecessary JS in new tasks; the second will show you how many hacks have piled up. A more general point for those building agent tools: a narrow set of expert knowledge, delivered compactly and verified with your own tests, often delivers more than waiting for the next model version.

Story

Key Questions Answered

What Was Released?

The modern-web-guidance project has reached version 1.0. It was built together with Firefox, MDN and Edge. Inside are 200+ hand-written guides (about 1.7 MB) on how to solve typical frontend tasks using the platform's own capabilities. Examples: CSS.highlights highlights fragments of text without a scattering of <span> elements, field-sizing stretches a textarea as you type, and <dialog> replaces homemade modals. The guides are delivered to the agent as a skill plus a CLI with agentic RAG search.

What are the key details on Numbers and Verification?

The authors built an evaluation infrastructure. Codex, Claude and agy were run on 200 tasks, first without the skill, then with it. About 1,700 assertions are checked using Playwright and AST parsing. Without the guides, 55% of checks pass; with the guides, 92%. The evaluation is also useful for the reverse task: if an agent handles a certain pattern well without any hints, the guide can be deleted.

How to Try It?

Everything is installed via npx: npx modern-web-guidance@latest install connects the skill search "animate dialog modal" searches the guides legacy-scan ./src checks your code Telemetry is disabled with the DISABLE_TELEMETRY=1 variable. You should do this right away if you work with closed-source code.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…