AI 编程 4.0 · 优秀 2026-03-23 · GitHub

Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives

Google Chrome 团队的 modern-web-guidance 仓库把让 coding agent 用现代 Web 原语做成可安装 skills 包(Apache-2.0,17,032 stars):提示 agent 少写 2019 年式 DOM/CSS 样板,改用 CSS.highlightsdialog+showModalfield-sizing 等原生能力Show HN 11 月 10 日上到约 446 分/146 评评论区分歧:部分推荐 API 仅 Chrome 稳定Firefox/Safari 未齐,有人反对 agent 帮推 Chrome 单文化;simonw 建议补可 grep 的 markdown 索引给 agent 写前端前先对照自家浏览器矩阵

打开原文回到归档

Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives

  • ID: 5175b6a2
  • 原文链接: https://github.com/GoogleChrome/modern-web-guidance
  • 作者: paulirish (GoogleChrome)
  • 日期: 2026-03-23
  • 分类: coding
  • 来源类型: github
  • 标签: coding-agents, skills, web-platform, best-practices
  • 质量评分: 4/5
  • 抓取时间: 2026-11-15T15:43:33Z

中文导读

Google Chrome 团队的 modern-web-guidance 仓库把「让 coding agent 用现代 Web 原语」做成可安装 skills 包(Apache-2.0,17,032 stars):提示 agent 少写 2019 年式 DOM/CSS 样板,改用 CSS.highlights、dialog+showModal、field-sizing 等原生能力。Show HN 11 月 10 日上到约 446 分/146 评。评论区分歧:部分推荐 API 仅 Chrome 稳定、Firefox/Safari 未齐,有人反对 agent 帮推 Chrome 单文化;simonw 建议补可 grep 的 markdown 索引。给 agent 写前端前先对照自家浏览器矩阵。

为什么值得关注

agent skills 开始争夺「默认写出什么前端」:这套包把 web 最佳实践变成可分发资产,但 API 覆盖的浏览器矩阵争议也同时出现;对用 agent 写前端的团队,这是首个值得纳入 AGENTS.md 的 Chrome 官方口径。

关键信息

  • 标题:Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives
  • 作者:paulirish (GoogleChrome)
  • 链接:https://github.com/GoogleChrome/modern-web-guidance
  • 发布时间:2026-03-23
  • 关联标签:coding-agents, skills, web-platform, best-practices

原文摘录(节选)

HN 帖(2026-11-10,paulirish 提交,446 分;本机 HN Algolia API 抓取)正文: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... 仓库(GitHub API 2026-11-15):GoogleChrome/modern-web-guidance,Apache-2.0,17,032 stars,描述 Keep your coding agent up to date with the latest web best practices。评论区(HN):u/surround 列出大量仅 Chrome 稳定、Firefox/Safari 未支持的 CSS;u/internet2000 明确不要 agent 帮推 Chrome 单文化;u/simonw 建议用 GitHub Pages 放可 grep 的 markdown 索引。

English Summary

GoogleChrome/modern-web-guidance (Apache-2.0, 17,032 stars) packages 'get your coding agent off ~2019 JavaScript onto modern web primitives' as installable skills: CSS.highlights for range highlighting without span soup, dialog/showModal for backdrops and focus management, field-sizing for auto-growing textareas. The Show HN by paulirish reached ~446 points/146 comments on Nov 10. Comment friction: many recommended APIs are Chrome-only stable (Firefox/Safari lag), drawing pushback against agents pushing Chrome monoculture; simonw suggests a greppable markdown index alongside. Check the covered API surface against your target browser matrix before adopting.

Obsidian Notes

  • 内容获取路径:来源摘录见上文;抓取路径与核对口径记录其中。
  • 中文导读与价值判断均锚定在已抓取的原文/摘要/元数据上;未补充来源之外的细节。
  • 现代站点生成器按 content/<entry.id>.md 查找内容页;本文件写入 canonical content 目录,而不是 openclaw/content/。