This repo is the source repository for GoogleChrome/modern-web-guidance and includes the code and documentation for authoring, calibrating, and evaluating its contents.
Modern Web Guidance is a set of skills that embed web platform expertise, best practices, and browser compatibility data directly into your coding agents. It helps to steer your coding agents away from legacy patterns, and instead toward solutions that harness the power and capabilities of the modern web platform.
[!NOTE] This is a preview release of Modern Web Guidance. We're actively adding new content and we welcome contributions or feedback on GitHub.
See CONTRIBUTING.md for how we work on the project and orientation of the codebase. We're open to contributions to guidance, eval cases, eval infra and more. :)
Supported by the Google Chrome team, the Microsoft Edge team, and the web development community.
npx modern-web-guidance@latest install
This command runs an interactive wizard to install Modern Web Guidance. See Alternative Installation Methods below.
# Search for relevant guides
npx modern-web-guidance@latest search "animate a dialog modal backdrop"
# Retrieve a guide by ID
npx modern-web-guidance@latest retrieve "animate-to-from-top-layer"
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.
Even if a model knows an API exists, it often lacks the density of real-world, modern implementation patterns required for production-ready code.
Modern Web Guidance bridges this gap. Our skill's CLI returns targeted, expert-curated guidelines directly into your agent's context window, focusing on: * Modern Browser APIs: Helping models correctly structure APIs they frequently misuse. * Performance & Accessibility: Preferring platform-level APIs that can be optimized by the browser and include built-in accessibility affordances. * Responsible Fallbacks: Guiding models to use sensible, lightweight fallbacks instead of heavy polyfills or legacy libraries.
We cover the past several years of the web platform's new features, all the way up to the cutting edge. The guides are designed to be token-efficient; we run evals enabling us to prune lowest-common-denominator content that models already know.
🎨 User ExperienceSmooth visual states (View Transitions, entry/exit animations, parallax scroll, CSSscrollbar-color).
|
📐 CSS LayoutModern layout systems (container queries,subgrid, modern color spaces like oklch, text-wrap tuning, and line-height trimming).
|
⚡ PerformanceSpeed optimizations (instant preloading, Interaction to Next Paint (INP) diagnostics, and scheduling tasks viascheduler.yield).
|
📝 Forms & UINative components (Anchor Positioning for tooltips, Popover API, dialogs,:user-invalid validation, and auto-sizing fields).
|
♿ AccessibilityImportant considerations (screen reader and keyboard operability, content navigation and discoverability). |
🤖 Built-in AILocal client models (native translation, summarization, and language detection APIs). |
View an example: the navigation-drawer guide.
fetchLater() or macOS-specific scrollbar behaviors.modern-web-guidance skill because of a relevant task. The agent is instructed to use the modern-web-guidance CLI for web platform queries.modern-web-guidance search "<query>". The tool matches the query to the best guide using an offline, CPU-efficient TensorFlow.js model (no network calls, no API keys).modern-web-guidance retrieve <guide-id>, inserting targeted code patterns, gotchas, and fallbacks directly into its context window.[!TIP] Note: We use
npxto ensure the content doesn't go stale, but the CLI works offline, completely private and local. The npm package is self-contained, with no extra dependencies to ensure both low-latency and supply-chain security.
Vercel Skills CLI (aka npx skills)
npx skills add GoogleChrome/modern-web-guidance
GitHub CLI
gh skill install GoogleChrome/modern-web-guidance
Google Antigravity
agy plugin install https://github.com/GoogleChrome/modern-web-guidance
GitHub Copilot CLI
/plugin marketplace add GoogleChrome/modern-web-guidance
/plugin install modern-web-guidance@googlechrome
Claude Code Plugin
/plugin marketplace add GoogleChrome/modern-web-guidance
/plugin install modern-web-guidance@googlechrome
/plugin # Select GoogleChrome marketplace, press enter, enable AutoUpdate
/reload-plugins
If you installed the skill using npx modern-web-guidance@latest install, you can update with: npx modern-web-guidance@latest update.
Otherwise, consult your agent's documentation for updating plugins and skills.
We developed a robust eval harness to ensure that the content is empirically proven and continuously calibrated to ensure AI agents write better code. We run automated evaluations using a closed-loop validation pipeline:
[ Expert-authored guidance and demo ]
│
▼
[ Generated assets ] ──> Playwright Grader (.spec.ts) & Negative Demo (.html)
│
▼
[ Calibration loop ] ───────> Runs Grader on Gold-Standard Demo (Must Pass 100%)
│ Runs Grader on Negative Demo (Must Fail 100%)
▼
[ E2E agent evals ] ────────> Runs coding agents in guided vs. unguided modes
Compares accuracy w/ and w/o the skill
| Date | Agent + Model | Tasks / Assertions | Unguided → Guided (Uplift) |
|---|---|---|---|
| May 18 | claude_code (opus-4-7) | 75 / 603 | 52% → 85% (+33pp) |
| May 17 | claude_code (opus-4-7) | 75 / 603 | 54% → 85% (+31pp) |
| May 16 | codex_cli (gpt-5.5) | 75 / 603 | 49% → 82% (+33pp) |
| May 16 | claude_code (opus-4-7) | 75 / 603 | 51% → 86% (+35pp) |
| May 15 | codex_cli (gpt-5.5) | 74 / 600 | 52% → 81% (+29pp) |
| May 15 | claude_code (opus-4-7) | 74 / 600 | 53% → 82% (+29pp) |
| May 15 | Antigravity | 74 / 600 | 47% → 91% (+44pp) |
| May 14 | Antigravity | 68 / 554 | 47% → 91% (+44pp) |
| Apr 30 | claude_code (opus-4-6) | 66 / 516 | 44% → 81% (+37pp) |
| Apr 28 | claude_code (opus-4-6) | 66 / 524 | 41% → 77% (+36pp) |
You can customize which skill packs are installed using the --choose flag:
npx modern-web-guidance@latest install --choose
modern-web-guidance (~234 tokens): Comprehensive guidance on modern browser APIs, layouts, and performance.chrome-extensions (~181 tokens): Guidance on Manifest V3, background workers, extension APIs, and Chrome Web Store publishing.Google collects anonymous usage statistics (such as search queries, guide retrievals, and installation) to improve the reliability, relevance, and performance of the tool. You can inspect what is collected in modern-web.ts.
[!TIP] To Opt-Out: set the
DISABLE_TELEMETRY=1env variable in your shell profile (e.g.,.bashrcor.zshrc):bash export DISABLE_TELEMETRY=1
Google handles this data in accordance with the Google Privacy Policy.
If you'd like to contribute to modern-web-guidance, please see the source repo's CONTRIBUTING.md. The modern-web-guidance repo is purely a publish target for clean skills installation.
Huge thanks to everyone who has contributed!
$ claude mcp add modern-web-guidance-src \
-- python -m otcore.mcp_server <graph>