Browsers natively handle a lot of what used to take 50 lines of JS (or a dependency): `CSS.highlights` for text range highlighting without <span>s everywhere, `<dialog>` and showModal() give you backdrops and ideal focus management, `field-sizing` to auto-grow textareas as the user types.. (Something yesterday's ftrain post touched on [0])<p>Models know about some of these by name, but consistently won't default to using the platform-native solution and instead prefer the incumbent <div>+JS based pattern. We started an effort in Chrome to supplement coding agents with this key domain knowledge and we're shipping our 1.0 today, in collaboration with Firefox, MDN, and Edge.<p>200+ guides (~1.7MB) of curated, hand-crafted implementation best-practices from web experts, updated as the web evolves. (Open source, obv, so.. we'll welcome your bikeshedding ;) Readable versions here: [1]<p>I've spent the last 9 months obsessing over how to ship this as an agent skill + (Agentic RAG) CLI without blowing up your context window. (Or cedeing activation mechanics to MCP dynamic tool search). The skill description is minmaxed for activating on relevant frontend tasks. The RAG work I'm pretty proud of… originally a 500mb native stack down to a ~7MB pure-JS package, ~10ms search on your CPU.<p>We just introduced a deterministic 'legacy-scan' (trained on 30k github repos) to identify old 'n dusted patterns that your agent can modernize. (92% avg precision on held-out repos.)<p>People make a lot of claims about what coding agents are good/bad at. We wanted receipts, so we invested heavily in eval infra [2] to help us hill-climb, but also to identify when knowledge is common enough we can prune our guides. (Ofc, some of the things we thought AI didn't know turned out to be wrong :) We run codex/claude/agy against 200 tasks without the skill and then with.. In total ~1,700 playwright/AST-based assertions. Agents go from 55% pass unguided to 92% guided.<p>Try it out:<p><pre><code> DISABLE_TELEMETRY=1 npx modern-web-guidance@latest install
DISABLE_TELEMETRY=1 npx modern-web-guidance@latest search "animate dialog modal"
DISABLE_TELEMETRY=1 npx modern-web-guidance@latest legacy-scan ./src
</code></pre>
If you spot something wrong or weird, give us a holler!<p>Longer write-up on the 1.0: <a href="https://developer.chrome.com/blog/modern-web-guidance-v1" rel="nofollow">https://developer.chrome.com/blog/modern-web-guidance-v1</a><p>---<p>0: <a href="https://news.ycombinator.com/item?id=50416456">https://news.ycombinator.com/item?id=50416456</a><p>1: <a href="https://developer.chrome.com/docs/modern-web-guidance/guides" rel="nofollow">https://developer.chrome.com/docs/modern-web-guidance/guides</a><p>2: <a href="https://googlechrome.github.io/modern-web-guidance-src/" rel="nofollow">https://googlechrome.github.io/modern-web-guidance-src/</a>
Comments are read-only. Visit Hacker News to participate in the discussion.
surround 1 day ago | 0 points
Here's a list of browser features the skills will tell your agent to use that are stable in Chrome but not supported by Firefox and Safari:<p><pre><code> CSS @function
CSS calc-size()
CSS interpolate-size
CSS corner-shape
CSS border-shape
CSS flex-wrap: balance
CSS text-fit
CSS text-decoration-skip-spaces
CSS scroll-axis-lock
CSS scroll-target-group
CSS :target-current
CSS scroll-initial-target
CSS container scroll-state queries
scrollsnapchange event
scrollsnapchanging event
HTML focusgroup
Element.startViewTransition()
CSS view-transition-scope
Interest Invokers (interestfor)
LanguageModel (Prompt API)
LanguageDetector
Translator
Summarizer API
Window.fetchLater()
Speculation Rules API
Long Animation Frames API
VisibilityStateEntry
PerformanceSoftNavigation
InteractionContentfulPaint
Connection-Allowlist
CSS url() integrity() modifier
HTML meta name="text-scale"
HTML template for
HTML processing instructions
PasswordCredential
Promise-returning scroll methods
Web App Origin Migration
Local Network Access permissions
Request.targetAddressSpace
beforeinstallprompt event
</code></pre>
To be fair, the skills also recommend ~11 features not supported by Chrome itself. And the project does seem concerned with compatibility: "Guiding models to use sensible, lightweight fallbacks."
onion2k 12 hours ago | 0 points
<i>Here's a list of browser features the skills will tell your agent to use that are stable in Chrome but not supported by Firefox and Safari</i><p>That's fine though. Progressive enhancement, adding features to a site when they're available but still offering a working site when they're not, is how we should build web sites. That way they work for the user's device rather than the developer's opinion of what the web should do.<p>Working that way completely removes the decision about whether or not to use a feature because it doesn't work for some people, and moves it to a decision about whether or not it's worth adding for the users on browsers that can use it. In the past that was a real development effort cost, but today where AI writes the code the effort is much, much lower.<p>If you're using AI to make something but still using heuristics designed to save coding time then you really need to rethink your mental model of how to decide what gets built.<p>Websites created today should all use server-loaded content for the first render, small page sizes, a sub-1s loading time, progress enhancement for features, and WCAG 3.1 AAA accessibility (maybe.. at least AA though) <i>because doing that isn't any more effort than not doing it</i>.
embedding-shape 8 hours ago | 0 points
> That's fine though. Progressive enhancement, adding features to a site when they're available but still offering a working site when they're not, is how we should build web sites.<p>Alright, that's fine and dandy. Is this the actual results of using this skill though that is being advertised here? Is it asking the agent to also make sure it's "Progressive enhancement" so the same stuff more or less works in Firefox and Safari?<p>If not, your whole point is kind of moot, as you have someone from Google trying to get people to write websites that'll look and/or work differently in Chrome compared to other browsers.
atopal 7 hours ago | 0 points
Not only is it asking the agent, the guides themselves spell out how to make a fallback work in unsupported browsers. That's not just Firefox and Safari, if it's a Chrome only feature older versions of Chrome might not support it either. Here's an example: <a href="https://github.com/GoogleChrome/modern-web-guidance-src/blob/main/guides/css/child-state-based-styling/guide.md#fallback-strategies" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance-src/blob...</a><p>Unless you have specified something different, by default the skill assumes you are targeting Baseline Widely Available, which means everything has to work in all major browsers from at least 2.5 years ago.
onion2k 6 hours ago | 0 points
Progressive enhancement isn't new. It's a concept from the days of IE and Netscape, and it's how we should all have been building website for the past 3 decades.
kevin_nisbet 4 hours ago | 0 points
I tried the skill as an experiment, and while it did give a suggestion that had poor support, it also suggested the library version as fallback (using Temporal). So if that's universally applied it might not be so unreasonable, but I don't do much frontend dev to know whether it's worth the risk or not.
philipwalton 23 hours ago | 0 points
> Here's a list of browser features the skills will tell your agent to use that are stable in Chrome but not supported by both Firefox and Safari:<p>To be clear, the skills <i>document</i> how to use these features to solve common use cases, and then they give your agent a full browser support table for any APIs mentioned that are not Baseline Widely available -- and then your agent can decide whether to use them or not, based on your site's browser support requirements.<p>In most of these cases a cross-browser fallback is also documented.
lelandfe 20 hours ago | 0 points
The default behavior for this "web best practices" tool which steers people away from "legacy patterns" has agents using Limited Availability features with complex and nuanced[0] fallbacks?<p>This would be deeply surprising to me, and I am the target audience for this repo. I'd expect the default here to be Widely Available <i>only</i> with some opt-in for the courageous. I don't know that I'd even enable it.<p>[0] <a href="https://github.com/GoogleChrome/modern-web-guidance/blob/4dd968349e54ca45a05dd5c818fb035c9054b022/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md#fallback-strategies" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance/blob/4dd...</a>
magicalist 17 hours ago | 0 points
> <i>The default behavior for this "web best practices" tool which steers people away from "legacy patterns" has agents using Limited Availability features with complex and nuanced[0] fallbacks?</i><p>You have causality reversed here. If you need to detect if the page was loaded in the foreground or background, it <i>is</i> nuanced and (relatively) complex. Therefore it's good for your agent not to just assume document.visibilityState is all it needs to check, or you're going to be getting seemingly impossible log entries pretty quickly.
lelandfe 16 hours ago | 0 points
Tree, forest.<p>You're making this into a false binary which is wrong (the alternative to adopting Limited Availability features is not "document.visibilityState is all it needs to check"). But responding to my one example is also going to cause us to miss the point I'm making entirely.
surround 23 hours ago | 0 points
The line between <i>documenting</i> and <i>instructing</i> is blurry in many cases. For example, these statements are meant to document best practices to the agent, but they sound like instructions:<p>"DO use fetchLater()..."<p>"Your own code MUST call fetchLater() directly..."<p><a href="https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/full-session-analytics.md#L52-L65" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance/blob/mai...</a><p>But yes, the skills do document compatibility and fallbacks well.
philipwalton 23 hours ago | 0 points
Agreed the line can be blurry, but I want to stress that the goal of this project is NOT to push Chrome-only APIs on users.<p>The mental model we've been using on the team is:<p><i>If you hired an expert web development consultant to build X, what would they recommend as a best practice? When does it make sense to use the new API (because it provides real benefits) vs. when does it make sense to wait until it's available everywhere?</i><p>To use your `fetchLater()` example, this is a case where the `fetchLater()` API legitimately solves a very real problem for people trying to build accurate analytics or telemetry features, see: <a href="https://nicj.net/beaconing-in-practice/" rel="nofollow">https://nicj.net/beaconing-in-practice/</a><p>And lots of companies actually are already using `fetchLater()` in production now because of its increased reliability.
embedding-shape 7 hours ago | 0 points
Maybe this mental model of yours need to include how difficult it'd be to implement your own version of the suggested API to make it actually cross-platform.<p>In the case of fetchLater, judging by <a href="https://nicj.net/beaconing-in-practice-fetchlater/" rel="nofollow">https://nicj.net/beaconing-in-practice-fetchlater/</a> (which I think you intended to link actually) since I haven't come across it before, it could be implemented with fetchLater, events and a timeout, perhaps 10 LOC or so? If that's the case, then it almost never makes sense to use Chrome's own fetchLater, rather than those ~10 LOC so it's actually web-friendly instead of just Chrome friendly.<p>As a side-note, I'm getting increasingly wary about all the new JS APIs that seemingly gets added to our standards ONLY because they have ads/tracking interests. Used to be the people who participated in standards discussions for their ads/tracking interests came up with proper use cases and kept quiet about their erosion of privacy, but seems the mask is fully off today and we're just making browser engines for the ads companies now, yay.
cma 22 hours ago | 0 points
I think I can guess from corporate incentives why Chrome supports fetchLater and some others don't.
philipwalton 21 hours ago | 0 points
It's currently being added to WebKit: <a href="https://github.com/WebKit/WebKit/pull/73271" rel="nofollow">https://github.com/WebKit/WebKit/pull/73271</a><p>Regarding corporate incentives: I was involved in the design of this API, so I know the history. It was proposed many years ago as a solution to make it easier for RUM analytics providers to measure Core Web Vitals metrics that needed to account for more than just page load (e.g. layout shifts and slow interactions can happen any time, not just during page load).<p>The RUM providers we worked with were reluctant to wait until page <i>unload</i> to send telemetry data because it resulted in too many lost beacons, so what they do instead is send beacons every few seconds with the most up-to-date payload.<p>The `fetchLater()` API enables them to send just one beacon, which is good for users and also reduces their server load.
ricardobeat 20 hours ago | 0 points
Why was 'fetchLater' chosen over a reliable way to trigger fetch from 'unload' or a similar event, or inversely, adding a 'sendLater' option to sendBeacon? Feels like a bolted-on API for a very specific use case, when the same thing could be built from better primitives?<p>It's a bit sad that browsers now have two different, "standard" APIs created entirely for the purpose of user tracking, as if things weren't already bloated enough.
philipwalton 19 hours ago | 0 points
These exact questions came up (from Apple) during design review. If you're interested you can read the discussion here: <a href="https://github.com/WebKit/standards-positions/issues/85#issuecomment-1360046180" rel="nofollow">https://github.com/WebKit/standards-positions/issues/85#issu...</a>
fn-mote 19 hours ago | 0 points
Spot-on amazing linking exactly to the relevant discussion.<p>I’m really glad to see this not evolve into a flame war as well.
hatthew 22 hours ago | 0 points
In my experience, it's difficult to suggest something to an LLM in a way that it doesn't interpret as a command, unless I explicitly list conditions (which it will take as law rather than guidance).
Cthulhu_ 10 hours ago | 0 points
I've looked up a few on MDN and they're all listed as experimental, so while they may work in Chrome they're not web standards; I hope everyone prompts their agents to avoid experimental features. That said I'm disappointed this tool seems to recommend using them anyway.
atopal 7 hours ago | 0 points
Unless you have specified something else, Modern Web Guidance assumes that you are targeting Baseline Widely Available, meaning all major browsers going back 2.5 years. Everything has to either be a progressive enhancement or have a fallback that works in those browsers. Otherwise you have to explicitly ask for that feature. This is a policy that was worked out with Microsoft Edge and Mozilla Firefox, who are also contributing to the skill.
tgv 7 hours ago | 0 points
It's proposed by a Google team. That privacy data isn't going to fly to their data stores by itself. So of course they want to thwart Firefox and Safari.
Arubis 5 hours ago | 0 points
The proportion of sites that I have to swap out of Firefox to use has gone from "every couple of weeks" to "multiple times weekly" lately, mostly among clearly AI-coauthored sites. I wonder if this is part of why.
hackingonempty 23 hours ago | 0 points
How about details/summary?
philipwalton 21 hours ago | 0 points
The details/summary features are covered in the accordion guide here: <a href="https://developer.chrome.com/docs/modern-web-guidance/guides/ui-components/accordion" rel="nofollow">https://developer.chrome.com/docs/modern-web-guidance/guides...</a><p>If you scan to the bottom of the guide under the "Fallback strategies" section, you can see the recommendations for how to deal with the aspects of details/summary that aren't Baseline widely available (e.g. mutually exclusive details).
simonw 1 day ago | 0 points
Distribution suggestion: in addition to the npm packages you have right now, set up GitHub Pages to publish a markdown index document of the skills at <a href="https://googlechrome.github.io/modern-web-guidance-src/skills/" rel="nofollow">https://googlechrome.github.io/modern-web-guidance-src/skill...</a> (currently a 404)<p>That index page should link to plain markdown versions of all of the documents, and should be designed for search with grep to find the right answers.<p>That way I don't have to install anything at all - provided my agent has the ability to make HTTP requests I can tell it "Look for tips on <a href="https://googlechrome.github.io/modern-web-guidance-src/skills/" rel="nofollow">https://googlechrome.github.io/modern-web-guidance-src/skill...</a>" and it will fetch the index, then navigate to the most relevant documents - no MCP or npm or installation required at all.
kinlan 1 day ago | 0 points
<a href="https://developer.chrome.com/docs/modern-web-guidance/guides.md.txt" rel="nofollow">https://developer.chrome.com/docs/modern-web-guidance/guides...</a><p>(we could make this clearer though)
paulirish 1 day ago | 0 points
Aye. I like the idea, Simon. The token cost of the index is high enough I wouldn't suggest the technique for regular use but.. agree that for occasional users it should suffice.<p>We'll make this happen. :)
kohukohunui 1 day ago | 0 points
It looks like the markdown has cross references that assume that the cli approach is used, it would be nice to separate the content from the tooling to access.
jph00 1 day ago | 0 points
If you rename that file to "llms.txt" it'll be a bit more discoverable.
kinlan 1 day ago | 0 points
yeah that's fair. the infrastructure we are on isn't the most flexible (we will soon move to a newer more custom platform but that's a little way a way)
nico 1 day ago | 0 points
> That way I don't have to install anything at all<p>It feels that something like this would be the holy grail of agents. A small agent that has only the minimum necessary built in knowledge. The rest, it just retrieves on the fly when it needs (+ caching)<p>It’s like storing pointers/links instead of the contents
paulirish 1 day ago | 0 points
In reality that's pretty much what we got here. Very progressive disclosure centric. There's a 'install' command exists because the ecosystem doesn't have good cross-agent ergonomics for installing skills. (Which bums me out).<p>But yeah.. big corpus of valuable context × minimal agent footprint = happy place.
mtrovo 1 day ago | 0 points
If created properly, skills are already something like that. You have a front matter summary always available to the agent. The agent can request the full skill content on demand, which might contain additional linked documents with details about APIs and schemas being used, deeper documents about niche subtopics, scripts to help with subtasks, etc.
Havoc 14 hours ago | 0 points
That was my first thought too…why are we distributing text via package managers
trvz 1 day ago | 0 points
What’s the point of modern Javascript without over complicating things?
advisedwang 1 day ago | 0 points
Chrome already has too much power in the browser standards world. The last thing we need is everyone's LLMs to follow Chrome team's guidance on how to do web development. This road leads back to "To view this site, please view in [DOMINANT BROWSER]"
philipwalton 1 day ago | 0 points
Mozilla Firefox and Microsoft Edge are also contributors to this project, so this is a cross-browser initiative to help improve how agents build for the web.
troupo 22 hours ago | 0 points
That's why it seems to skip the most egregious of Chrome-only APIs and focuses on areas where there's large cross-browser agreement.
philipwalton 20 hours ago | 0 points
Cross-browser compatibility has been a guiding principle for this project from the start. See: <a href="https://youtu.be/bo3i0FzDUYo?si=EqIgY_Kh_r_hSgdE&t=686" rel="nofollow">https://youtu.be/bo3i0FzDUYo?si=EqIgY_Kh_r_hSgdE&t=686</a><p>Also Mozilla only joined in the last few weeks, so they haven't yet had a big influence on the project (though I expect they will going forward).
incrudible 11 hours ago | 0 points
I have a bridge to sell you.
phendrenad2 18 hours ago | 0 points
They back it because they have no choice. We have no real independent browsers in 2026. And it's sad that the fact that we don't have independent browsers is being twisted into proof that Google doesn't have much power.
0o777 1 day ago | 0 points
Both Mozilla and the Google Chrome team are part of the Web Baseline project and this project. They only recommend best practices supported by Chrome, Firefox, Edge, and Safari.<p><a href="https://web-platform-dx.github.io/baseline/" rel="nofollow">https://web-platform-dx.github.io/baseline/</a>
simonjgillespie 9 hours ago | 0 points
No Netsurf. I guess thats why you also switched off access on google search pages too because unless a browser is bigger than 1G its not a real browser?
xnx 1 day ago | 0 points
Not my opinion, but I do wonder if sharing from a different repo would feel more neutral.
tonymet 22 hours ago | 0 points
Let the best API win. why hold them back?
girvo 20 hours ago | 0 points
Because Google/Chrome should’ve been split up under antitrust grounds, instead of the “too hard let’s not bother” judgment they ended up with.
tonymet 20 hours ago | 0 points
[flagged]
dang 3 hours ago | 0 points
Breaking the site guidelines this aggressively will get you banned here. We've warned you about this before, so please don't do it again.<p><a href="https://news.ycombinator.com/newsguidelines.html">https://news.ycombinator.com/newsguidelines.html</a>
tonymet 1 hour ago | 0 points
thanks for bringing it to my attention I'll be more careful in the future.
defrost 13 hours ago | 0 points
Please omit snark on HN. The guidelines make it clear they're trying for something better here: <a href="https://news.ycombinator.com/newsguidelines.html">https://news.ycombinator.com/newsguidelines.html</a>
super256 1 day ago | 0 points
Calm your pitchfork, Mozilla and Edge are both part of Modern Web Guidance.<p><a href="https://github.com/GoogleChrome/modern-web-guidance-src/blob/main/GOVERNANCE.md" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance-src/blob...</a>
chalmovsky 1 day ago | 0 points
Amazing! I'm just writing an article about how Alex Russell's quote about 'React being a legacy technology' got, unfortunately, totally ignored.<p>And now this just fell in my lap! Some of the arguments I wanted to make seem to be provide here. Didn't have a chance to take a proper look at it, but it looks very promising and nice!<p>Thank you!
nchmy 19 hours ago | 0 points
I'm not sure that's just a quote. He's written and said tens of thousands of words on the topic!
bakkoting 18 hours ago | 0 points
> If you spot something wrong or weird, give us a holler!<p>But how? Hopefully filing an issue on the modern-web-guidance-src repo is the right place? Anyway I filed one for using fromBase64 and toBase64 instead of atob and btoa.<p>But since you're all in on agents anyway you should consider having one look through at least all of the JS, DOM, and HTML spec commits in the last 3-5 years and automatically triaging any that are clear improvements and are not used by agents. Would be pretty straightforward.<p>---<p>Btw, I think it would be very helpful to automatically provide versions of this depending on what browsers you're targeting. I don't want to use anything that hasn't been available in all evergreen browsers for at least a year, for example; I think most developers have a similar standard, or at the very least don't want to use the bleeding edge. And while it is _possible_ to get that from your repo, it takes some effort, either writing a script or letting the agent use its own judgement for every feature. That's work you could do on your end and save the rest of us from needing to.
philipwalton 18 hours ago | 0 points
Thanks for filing! Yes, the modern-web-guidance-src repo is the right place:
<a href="https://github.com/GoogleChrome/modern-web-guidance-src" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance-src</a><p>> Btw, I think it would be very helpful to automatically provide versions of this depending on what browsers you're targeting.<p>This should work today (though not exactly in the way you describe). The skill tells the agent how to interpret guides based on browser support signals it gets from context (e.g. the prompt itself, or AGENTS.md).<p>You can see those instructions here: <a href="https://github.com/GoogleChrome/modern-web-guidance-src/blob/v1.0.0/guides/modern-web-guidance/SKILL.md#interpreting-browser-support--fallbacks" rel="nofollow">https://github.com/GoogleChrome/modern-web-guidance-src/blob...</a>
bakkoting 17 hours ago | 0 points
> This should work today (though not exactly in the way you describe). The skill tells the agent how to interpret guides based on browser support signals it gets from context (e.g. the prompt itself, or AGENTS.md).<p>Right, my point is that I don't want to spend a bunch of time and tokens loading the skills and having the agent reason through whether they apply based on browser support. I want that to be automated so that it only loads in the first place those things that are actually applicable. Having a prose description is not a substitute for automation; it is almost always better to do things mechanically rather than asking the agent to do it, in cases where it is possible to do mechanically.<p>I think this matters even if you're at Google and tokens are free but it _definitely_ matters for the rest of us.
philipwalton 15 hours ago | 0 points
If your feature use policy is that you will <i>never</i> use any feature unless it's supported in at least X, Y, and Z browsers, then yes something like this would be possible. But most sites don't have a policy like that.<p>Most sites are willing to use <i>some</i> features as a progressive enhancement, whereas other features they won't even consider using unless it's in 99+% of their users' browsers.<p>And unfortunately there's no easy way to make that decision for users on a feature-by-feature basis, because it all depends on what use case they're trying to accomplish, and what will happen if the feature is not available (given that particular use case).<p>So our approach is to (1) explain in the guide how to implement the use case with the modern feature, (2) explain why the modern feature is the preferred solution (e.g. what the user benefit is), and then (3) explain how to implement a fallback solution if the feature is not available.<p>I think we could potentially experiment with some version of what you're describing, like a config option where we only surface guides that have robust, widely-available fallbacks, and where we have high confidence that it makes sense for the majority of sites to be following the recommendations in the guide.<p>I'll raise it with the team.
bakkoting 14 hours ago | 0 points
> But most sites don't have a policy like that.<p>My experience differs from yours. It's true that there is some tiny fraction of features where it makes sense to do progressive enhancement, but for most sites and almost all features this does not make sense: the burden of testing and maintaining a site that effectively has multiple versions depending on what browser you're using is simply not worth it. For typical dev teams outside of Google/Meta/similar, the right thing (and the overwhelmingly common thing) is to target the intersection of features available on your supported browsers and not make any behavior conditional. I'm not interested in any guides that need fallbacks on any of the browsers I target and I expect the same is true of the typical dev team outside Google.
1shooner 16 hours ago | 0 points
Couldn't this be a simple deterministic build from the provider rather than mass replication of inference for essentially every user?
philipwalton 15 hours ago | 0 points
I believe I answered your question in this reply: <a href="https://news.ycombinator.com/item?id=50449873">https://news.ycombinator.com/item?id=50449873</a>
cadamsdotcom 1 day ago | 0 points
Planning to give this one a wide berth.<p>The more "legacy code" is getting written everyday the more the web will be forced to remain backwards compatible...
internet2000 23 hours ago | 0 points
NO THANK YOU. Do not want my agents to contribute to the Chrome monoculture. Chrome is the new IE6.
tonymet 22 hours ago | 0 points
no it's not. they publish the APIs. IE was bad because ActiveX was proprietary and private.
halflife 1 day ago | 0 points
Finally.<p>This is exactly what I need when I need it. The amount of pull requests I reviewed with a mess of codes that can be switched to 2 lines of modern features made me write such tools myself, only half assed since I have other things to do.
phyzix5761 1 day ago | 0 points
"Best Practices" are pretty much dead in the AI era. Pretty soon no one is going to read any of the code AI produces and that's a scary thought.
paulirish 1 day ago | 0 points
IMO maintainability is the next frontier. If we just allow coding agents to accrete 1k-LOC solutions to problems, the codebases run quick away from our ability to maintain _some_ level of understanding.<p>So I'll take a 1-line CSS solution over 60 lines of ResizeObserver/setTimeout business. But.. best practices for frontend isn't just the code.. it's ensuring quality UX, that keyboard navigability works, that layout doesn't shift on users.
noosphr 23 hours ago | 0 points
You just regenerate the codebase, like how you do a recompile in C. Writing code is 2026 is worth as much as writing machine code was in 1996.
runeb 20 hours ago | 0 points
Relevant post "Regenerative Software"<p><a href="https://aicoding.leaflet.pub/3majnyfydzs2y/l-quote/10.0_0-10.3_30" rel="nofollow">https://aicoding.leaflet.pub/3majnyfydzs2y/l-quote/10.0_0-10...</a>
noosphr 17 hours ago | 0 points
I've not read text with such a high fraction of AI slop in a while. The heady days of a year ago.
soon_to_be_sb 16 hours ago | 0 points
Jesus! what a horrible idea!<p>Are you in the business of selling tokens/electricity/gpus by any chance? Then good for you!<p>But terrible for everyone else....
noosphr 16 hours ago | 0 points
Yes, just like compilation was.
aidos 1 day ago | 0 points
Once again, thank you for all the work you and the team have done to improve the web and the experience for developers working with it.
natorion 1 day ago | 0 points
Best practices are not dead if they result in better user experience. The focus is less on developer ergonomics though - true that.
jefftk 9 hours ago | 0 points
This is mostly best practices for making websites work better, not for pretty HTML.
sublinear 1 day ago | 0 points
The "modern web primitives" are also not even necessarily the "best practice".<p>Browser-specific implementation gotchas tend to take about a decade to iron out for reasons that never have anything to do with code quality. Users are fickle and so are browser vendors, but that's a different topic.<p>At the end of the day, there's just no escaping lots of manual testing across device and browser combinations if your goal is a polished result and not just something that "works".<p>AI has done nothing to make this problem go away. If anything, it's made it worse because people don't even want to look at the code now!
zeroq 1 day ago | 0 points
Exactly.<p>I've recently finished a browser game specifically targeting an old iPad Air 1 we had lying around the house.<p>I had a working version after a weekend, but it took me a month to make it run smoothly on an over 10 years old mobile device. And the most recent browser available is almost 10 years old.<p>Surprisingly I didn't missed too many "modern" JS features, as these were mostly functional programming oriented which doesn't play well with optimization anyways, and the ES6 was more than enough as a programming platform.<p>Anyway, what I'm trying to say is that "the best practice" should be making your apps fast and accessible - as much as you can without having to sacrifice something you value - instead of chasing the latest and shiniest.<p>Don't be a fashion driven developer. :)
brlewis 1 day ago | 0 points
>Pretty soon no one is going to read any of the code AI produces and that's a scary thought.<p>This is a misconception. Have your favorite agent summarize this video for you: <a href="https://www.youtube.com/live/zcLPGC-tvgk?si=YR68aHlFESD053bh" rel="nofollow">https://www.youtube.com/live/zcLPGC-tvgk?si=YR68aHlFESD053bh</a>
ozim 1 day ago | 0 points
Ugh it is Uncle Bob, not going to torture AI with this guy.<p>But the fun part is that all of the proper software engineering practices are aimed at lowering amount of context a developer has to keep in his mind. So it directly applies to agent context. Less verbose code, less tokens to burn, separation of concerns, lower chance agent breaks something unrelated etc.
vik0 1 day ago | 0 points
>>Pretty soon no one is going to read any of the code AI produces and that's a scary thought.<p>>This is a misconception. Have your favorite agent *summarize this video for you*: <a href="https://www.youtube.com/live/zcLPGC-tvgk?si=YR68aHlFESD053bh" rel="nofollow">https://www.youtube.com/live/zcLPGC-tvgk?si=YR68aHlFESD053bh</a><p>I can't tell if you're joking here
brlewis 1 day ago | 0 points
I am not generally against using AI to reduce the amount of information you need to pay attention to, and I was not joking. There are multiple places in that interview with good articulation of the reasons why software fundamentals still matter, and what happens when you don't look at at least some of the AI-generated code.
zahlman 10 hours ago | 0 points
> There are multiple places in that interview with good articulation of the reasons why software fundamentals still matter, and what happens when you don't look at at least some of the AI-generated code.<p>Sure, I've seen the video before and remember many of the arguments. I don't agree with everything in Bob's approach, but I certainly agree with what he says about the value of looking at the code.<p>But that doesn't at all mean that people <i>will</i> do it.
drawfloat 1 day ago | 0 points
Why don't you just quote them then? Or quote whatever the LLM you used gave.
brlewis 20 hours ago | 0 points
Uncle Bob Martin and Matt Pocock discuss the risks of relying on AI agents without human oversight, emphasizing that unchecked code can lead to significant technical issues:<p><pre><code> - Accumulated Technical Debt: Uncle Bob notes that agents often leave behind "dog doo" (messy code) (05:13-05:18). If you don't clean it, the code becomes progressively worse as you build on it (11:06-11:10).
- Loss of Agent Coherence: When code quality degrades, agents struggle to maintain direction (11:13-11:16). They may enter a loop of inadvertently breaking existing features while attempting to fix new ones, eventually leading to them failing entirely or giving up (11:22-12:04).
- The "Trapped" Trajectory: Matt Pocock highlights the risk of a session's "trajectory" (23:18-23:45). Without intervention, an agent's initial messy approach or misaligned focus will continue throughout the entire session, reinforcing poor patterns instead of correcting them (23:35-24:00).
- Hidden Hallucinations: Even though agents are fast, they are still prone to hallucinations and misalignment (25:09-25:18). Relying on them blindly without deterministic tools or human spot checks risks incorporating silent, logic-breaking bugs into the architecture (09:08-09:19).</code></pre>
zahlman 10 hours ago | 0 points
Your comment got flagged and killed; I don't know whether automated systems attempt to detect AI-generated comments. I vouched for you because the content was explicitly solicited.
stronglikedan 5 hours ago | 0 points
just tell the AI to use best practices when writing code /s
zahlman 10 hours ago | 0 points
> Browsers natively handle a lot of what used to take 50 lines of JS (or a dependency): `CSS.highlights` for text range highlighting without <span>s everywhere<p>I tried to look this up and found <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::highlight" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/S...</a> but the example depends on JS. How are you meant to statically specify highlighted ranges without the <span> markup? If I'm syntax-highlighting code on a blog, it's seems a lot more practical to just use the old <span> system than to encode a list of character ranges in a JS array and loop to assign highlights. Plus it doesn't require the reader to run JS.
SoftTalker 21 hours ago | 0 points
Remeber, the features you don't use are the ones you don't have to support, or scramble to replace when they are deprecated.<p>Keep your effing websites simple.
zahlman 9 hours ago | 0 points
In my book, new "baseline" CSS features that handle common design tasks count as simpler (and more user-friendly) than involving JavaScript to set them up, even if it's "vanilla" JS. The user's browser should as much as possible be treating my content as data rather than code and just doing fancy rendering on it, as long as I'm not explicitly trying to show the user a cool program. The browser may be huge, but it's only one thing that has to be huge for the benefit of every site.<p>(I have much the same instinct about the UNIX philosophy. Bash is not too big. Shell programs should be even bigger so that query programs can be smaller — because otherwise they grow huge lists of options that largely overlap, for things like table formatting, and provide an inconsistent UX.)
merelydev 10 hours ago | 0 points
> Coding agents often default to older patterns because LLM training data contains vast amounts of legacy code. This often leads them to generate bloated JavaScript for tasks that now have native, high-performance web platform solutions.<p>Yes, now I can confirm I am not a crackpot when I said this: <a href="https://news.ycombinator.com/item?id=49854536">https://news.ycombinator.com/item?id=49854536</a><p>The main problem I see is that it will be extremely hard for new frameworks, languages to take off if everyone is using AI to code. It can lead to a future where all new programming languages and frameworks will be developed by LLM providers because only they, can train them with synthetic data.
deflator 6 hours ago | 0 points
I don't know about this concern for new frameworks<p>With LLMs improving, they will might need less example code to work with new frameworks decently<p>With LLM usage becoming ubiquitous for coding, framework developers will likely start making lots of curated, high-quality synthetic examples specifically for LLM training data usage as their main documentation effort
iantpe 6 hours ago | 0 points
After my research, I found that if you want to use this skill, it's best to specify the range of browsers you want to support in the AGENTS.md / CLAUDE.md of the repository (e.g., "Only use the Baseline Widely Available feature"), and keep the experimental features disabled by default. This way you can avoid some worrying issues.
codepoet80 22 hours ago | 0 points
I want the opposite of this. I want compatible code -- which is really hard, when there are so many eras to target. So far AI has done a great job of finding that sweet spot -- why would I want a tool that encourages the agent to write less compatible code?
flossly 17 hours ago | 0 points
I prefer to have my templates in a compiled language: not passing a map of strings to a string with interpolation points, but actually "just code" by which I define HTML builders by combining templates/layouts/components in that same "just code".<p>Like HtmlFlow (Java/Kotlin) or kotlinx.html.<p>I pick Tailwind and Alpine.js to go with this approach because: I want to be SSR-first (with small JS-based improvements where they matter most) so NOT and SPA, i want the styling to be close to the HTML code that's being styled (no need to match between CSS definition and usage), and I also prefer to keep my tiny bits of JS close to the HTML it deals with (Alpine makes that easy and provides a clear path for implementing 99% of my JS needs).<p>Like everyone, LLMs code it for me :) But the result is easy to reason about for myself and my LLM. Little vanilla JS. No jQuery. Mostly just some HTML-bound Alpine instructions. And Tailwind everywhere. This way I can look at one place to see how it works: or CTRL-click my way to it.
fumar 1 day ago | 0 points
I added this a few months ago and Claude Doctor has not removed it. It must be working and getting use.
hackersnooze1 7 hours ago | 0 points
I feel like you can get 90% of the same result by saying “use modern javascript and css”. This feels like its more just google pushing their browser features that other browsers arent implementing
pyrolistical 23 hours ago | 0 points
I asked my agent to look at that list and only apply things that work on chrome, Firefox, safari iOS and safari macos<p>Came up with a good list for my project
dflock 12 hours ago | 0 points
I've been using this skill with Claude on a new project and it's nice, but it's quite expensive, token wise. It's ~$5 per use, on my codebase, which seems fairly high to me. This is according to the crappy stats in the claude usage thing, so not sure how accurate that is.
reedlaw 1 day ago | 0 points
These skills look better than most, but running my code through the legacy scan only found two issues. So while I still think training beats skills, I'm sure this has its place, especially with weaker models.
paulirish 1 day ago | 0 points
Yeah. The legacy scan is tuned to 1) focus on cases where there's a clearly detectable legacy pattern and 2) avoid false-positives. This means it only overlaps with 20% of all the skill's docs. (We'll probably get it to ~50% in another month).<p>In short: I 100% understand your disappointment. :) More coming soon like finding cases to update with Promise.withResolvers, the Array iterators, Object.groupBy, URLSearchParams, etc..
seige 16 hours ago | 0 points
Just here to voice this again. I ran it on my project and it found 3 issues. There are far more :)
dallen33 23 hours ago | 0 points
Paul Irish?? There's a name I haven't though about in ages! I remember following you on Twitter and your website was full of amazing information. Hope you're doing well!
paulirish 18 hours ago | 0 points
<3
gabrieledarrigo 1 day ago | 0 points
That's pretty cool!<p>On the other hand, a bit sad: programming nowadays is just arranging a bunch of Markdown files, possibly generated by another bunch of models.<p>Not so exciting, in the end.
adzm 23 hours ago | 0 points
I find this very useful as a human as well
hackerbrother 18 hours ago | 0 points
Couldn't this be handled with a deterministic linter?
duskdozer 12 hours ago | 0 points
Deterministic linters don't use any tokens.
ggregoire 20 hours ago | 0 points
Is there a similar project for React? There are so much bad React code and wrong/old design patterns on the internet that surely ended in the training datasets
socalgal2 19 hours ago | 0 points
Yes, it's "Never use React". Simple<p><a href="https://infrequently.org/2024/11/if-not-react-then-what/" rel="nofollow">https://infrequently.org/2024/11/if-not-react-then-what/</a>
ShinyLeftPad 16 hours ago | 0 points
a barely coherent ramble by a Microsoft engineer feat. an exquisite conflation of React/using libs like lodash or moment.js/the idea of frameworks, casually dropping false dichotomies between using React and delivering semantic HTML with progressive enhancement, drive-by smearing any use of frameworks by calling it "frameworkism" and equating it with religion, with a side of amusing bombshells like (exact quote)<p>> prohibiting the spread of React (and other frameworkist totems) by policy is an incredible cost savings and a helpful way to reorient teams towards delivery for users<p>isn't "simple".
taskylizard 14 hours ago | 0 points
<a href="https://www.react.doctor/" rel="nofollow">https://www.react.doctor/</a>
lelanthran 15 hours ago | 0 points
> We wanted receipts,<p>Why do people still leave common AI tells in their writing?
zahlman 9 hours ago | 0 points
Because it takes effort, while the worst consequence of not doing it is people making annoyed comments on HN, apparently.
zeroq 1 day ago | 0 points
What's the best way to introduce this to a Gemini chat?
paulirish 1 day ago | 0 points
Gemini web? Probably simonw's strat from the top comment.<p>There's a plugin for Antigravity that's listed on initial setup (yay bundleware! :) but... yeah if you're using consumer gemini, i'd switch to the Tasks mode because it's more agentic nature helps.<p>In fact I just did this and it works. :p It regular Gemini, it said it did but kinda liked :) So there it'd be<p>> Create a perfect HTML contact form with address fields. Check <a href="https://developer.chrome.com/docs/modern-web-guidance/guides.md.txt" rel="nofollow">https://developer.chrome.com/docs/modern-web-guidance/guides...</a> — read completely, don't stop at truncation.
low_tech_punk 17 hours ago | 0 points
I just want a single llms.txt
SoftTalker 21 hours ago | 0 points
> We wanted receipts, so we invested heavily in eval infra to help us hill-climb, but also to identify when knowledge is common enough we can prune our guides.<p>Good god.
paulirish 21 hours ago | 0 points
what? oh. I mean.. I wrote it all with my lil fingies, but I did pack some jargon in there. :) More plainly...<p>We built rigorous tests to verify this actually works, and to know when models no longer need the advice.
rewgs 20 hours ago | 0 points
"hill-climb" is the most aggressively LinkedIn speak I've ever encountered in the wild.
tgv 7 hours ago | 0 points
I don't understand the reason. I thought software was supposed to be a black box when you use agents. So why care how it's implemented? Cui bono?
bryanrasmussen 10 hours ago | 0 points
User Experience - " entry/exit animations, parallax scroll, CSS scrollbar-color"<p>I'm getting the feeling that the user experience they want is not necessarily what I would term a good one.
ozim 11 hours ago | 0 points
I would rather have all this in a framework like Angular and then let agent use framework.<p>Of course great resource for all the others who feel they need to just go with vanilla JS.
mococa 23 hours ago | 0 points
More Chromish on web? No thanks.
christophilus 17 hours ago | 0 points
Well, I read the title as, “Get your coding agent off.” And I thought, wow. These AI fanboys anthropomorphized the LLM a little too much here.
incrudible 11 hours ago | 0 points
It would be hard to convince me to go all in on the latest featureset of the abomination that is HTML, CSS, DOM and to a lesser degree Javascript, governed by essentially a monopoly, a single implementation that nearly everyone uses, that is so big in code size that even a swarm of LLMs would choke on it.<p>I want the browser to be the thinnest layer it can be, between me and my application, which is governed by me.
efields 19 hours ago | 0 points
Hey: this is great.
j45 1 day ago | 0 points
This is a great idea. I think while so much was being built out in the JavaScript ecosystem, awareness about the equivalent feature releases that were done to HTML, CSS, web components, and other technologies didn't keep pace.<p>Of course, it's not perfectly implemented the same in every browser, but that's nothing new.
dazhbog 21 hours ago | 0 points
I ask my agent to write ES5 as I am more comfortable with it.. i need to read and maintain that slop somehow..
tonymet 23 hours ago | 0 points
I recommend saying "contemporary" or "suggested" for transient proposals like this. Having modern change every few years is ambiguous and cliche .<p>These concepts are new, so no one knows if they are any good. They're not modern -- who knows if they will even be put to use?<p>"contemporary", "proposed", "suggested", "compatible" are better fit. I wouldn't dare use "advanced" because many APIs and proposals actually regress earlier behavior.
PenguinRevolver 1 day ago | 0 points
I use Firefox after Chrome decided to become a bit of a pain to use on my powerful computers. I was unsure how bias the skills were for Chrome exclusive features, so I decided to ask ChatGPT to analyse the repo. I liked the answer it gave, so here it is:
<a href="https://chatgpt.com/share/6af3712a-03cc-83eb-ad1f-66dd11c886bb" rel="nofollow">https://chatgpt.com/share/6af3712a-03cc-83eb-ad1f-66dd11c886...</a>
cyanydeez 1 day ago | 0 points
I treat all my code as some kind of stochastic machinery. So atleast one stage, I'd just tell an agent to go through and follow the guide.<p>But I'd not inject all this fluff into the wheels of the machine because it'd just take the "average" of these practices which would be just as useless.