Modern Web Guidance



Modern Web Guidance 是一组技能,可将 Web 平台专业知识、最佳实践和浏览器兼容性数据直接嵌入到编码智能体中。

使用 modern-web-guidance CLI 安装(推荐):

npx modern-web-guidance@latest install

支持您偏好的 AI 编码智能体

Modern Web Guidance 可与您喜爱的 AI 编码智能体搭配使用,确保您可以在首选工作流中获取有关现代 Web 最佳实践的指导。

使用 Vercel 的 Agent Skills 在项目中安装 Modern Web Guidance:

npx skills add GoogleChrome/modern-web-guidance

从 Claude Code 插件安装 Modern Web Guidance:

claude plugin install modern-web-guidance@claude-plugins-official

安装 Modern Web Guidance skills for Copilot CLI:

# 1. Add the marketplace:
/plugin marketplace add GoogleChrome/modern-web-guidance
# 2. Install the plugin
/plugin install modern-web-guidance@googlechrome

为 Antigravity CLI 安装 Modern Web Guidance 技能:

agy plugin install https://github.com/GoogleChrome/modern-web-guidance
观看 Google I/O 大会上的 Modern Web Guidance 专题演讲,详细了解这些技能以及它们如何改进 AI 辅助 Web 开发工作流。

提示可带来更优质的用户体验

尝试使用以下几个示例提示,在 AI 辅助编码工作流中调用 Modern Web Guidance,以构建新功能、实现旧代码现代化并加快应用运行速度。
Create an accordion-style stats component that smoothly animates on open and close.
Build a tab bar with a sliding highlight that tracks active items using CSS Anchor Positioning.
Design a dashboard card that uses container queries to adapt its layout to its own width.
Update legacy modal window implementations to use the <dialog> element and animate them using modern CSS features.
Migrate legacy tooltips to use the Popover API and CSS Anchor Positioning.
Implement a passkey-based login flow using the latest WebAuthn features.
Implement a starter Content Security Policy (CSP) without breaking my app.
Perform a security audit of my site and suggest improvements.
Set up my app to begin preloading pages when users hover over important links.
My app has lots of long tasks, and its INP is affected. Help me fix it.
Help me improve my app's LCP.
了解如何引导 AI 编码助理生成前沿、可互操作的 Web 代码!在此入门 Codelab 中,您将审核一个旧版 Web 应用,并使用 Modern Web Guidance 工具提示代理采用现代最佳实践。学习如何设置 Baseline 浏览器目标、优化 Core Web Vitals,以及将通用 AI 输出转化为高性能 Web 解决方案。
将面向智能体的 Chrome 开发者工具与 Modern Web Guidance skill 相结合,改进您的 Web 开发者工作流。运行实时性能审核、检查无障碍树并捕获控制台日志,然后自动应用精确的现代 Web 代码修复。

了解如何做贡献

对如何改进Modern Web Guidance有何想法?了解如何贡献内容!