Modern Web Guidance Explained
Chrome's Agent Skill, Install & Usage vs Context7 (2026)
Modern Web Guidance is Chrome's Apache-2.0 skill and CLI that steers coding agents to modern web standards: how it works, install, and Context7 comparison.
Modern Web Guidance is an open-source set of skills and a CLI from the Google Chrome team for coding agents. Before the agent writes a web app, it looks up current browser standards (the Popover API, <dialog>, CSS Anchor Positioning, container queries and more) together with compatibility data, which is meant to fix the habit of hand-building everything in 2019-style JavaScript. It is licensed under Apache-2.0 and installs with one line: npx modern-web-guidance@latest install.
According to Chrome's documentation it covers more than 100 use cases across UX, CSS, performance, forms, built-in UI components, accessibility, built-in AI and passkeys. The source repository (GoogleChrome/modern-web-guidance-src) had about 1.4k GitHub stars as of November 11, 2026, and a Show HN post about it was on the Hacker News front page the same day. This article relies on Chrome's official docs and the GitHub README to explain how it works, how to install it for each agent, how to use it, how it differs from similar approaches, and what to watch out for.
What Is Modern Web Guidance: The Short Version
- What it is: A skill bundle that gives agents web platform knowledge, best practices and browser compatibility data. The skill itself tells the agent to call the modern-web-guidance CLI, and the CLI returns the guide content
- How it works: The agent finds guides with search, fetches one by ID with retrieve, and then writes code. Search runs locally with no API key or network call (per the README)
- Getting it: npx modern-web-guidance@latest install. Apache-2.0. It works with any coding agent that supports skills; Chrome's docs list Claude Code, Codex, Gemini CLI, Copilot CLI, Antigravity, Goose, Grok, Kimi Code and others
Per the README, it contains 250 modern web features (CSS and layout 140, HTML and DOM 36, JavaScript and APIs 74) and 203 real-world development use cases. The use-case areas also include accessibility, built-in AI, forms, performance, privacy, PWA, security, WebAssembly and WebMCP.
The Problem: Agents Default to Old Patterns
Coding agents tend to pick patterns that are common in their training data. Even when the browser now ships a feature natively, they may build it with JavaScript state management or a library. A freeCodeCamp walkthrough (dated June 24, 2026) shows a prompt asking for a tooltip that appears when hovering a button. Without the guidance, the agent wrote a JavaScript state layer with a js-hidden class, a function that dismisses all tooltips, touch handlers and click-outside detection. With the guidance, the output needed no JavaScript and used popover="hint", the interestfor attribute, CSS Anchor Positioning and @starting-style.
A LogRocket article (dated July 22, 2026) compares two copies of the same Next.js task-manager project built with Gemini CLI, with and without the skill. The results are below. It is one run by one author, so it should not be generalized.
| Feature | Without guidance | With guidance |
|---|---|---|
| Modal | Custom state, portal and a 300 ms setTimeout | Native <dialog> with CSS enter/exit animations |
| Task cards | Media queries | Container queries |
| Search (2,000 tasks) | Synchronous filtering with useMemo | Work chunked with scheduler.yield() |
| Help tooltip | Floating UI dependency | CSS Anchor Positioning |
How It Works: Skill, CLI and Baseline Target
According to Chrome's documentation, the flow is as follows. The agent activates the skill for a web task, uses the CLI's search to find guides close to the prompt, fetches the body with retrieve and a guide ID, and writes code according to it. Guides are selected by ID based on their descriptions. The README says search combines an offline, zero-dependency embedding model with a BM25 engine. Guides are written to be token-efficient, and evals are used to prune content that models already know.
The other key idea is the Baseline target. Baseline expresses browser feature support in tiers, and the documentation describes three.
| Tier | Meaning |
|---|---|
| Limited availability | Not interoperable across major browsers |
| Newly available | Interoperable for under 30 months |
| Widely available | Interoperable for 30 months or more |
You tell the agent the project's target in AGENTS.md or CLAUDE.md. The official example is "This project's Baseline target is Baseline 2024." With no setting, the default is Widely available. For features outside the target, guides provide fallbacks, usually progressive enhancement, and polyfills are loaded conditionally.
Experimental features are gated as well. "Volatile" features implemented in only one browser engine and Origin Trial features show up in search but cannot be retrieved by default, so the agent does not adopt unstable APIs on its own. To allow them, write a setting in .mwgrc in the project root (or ~/.mwgrc at user level).
Installation
The recommended route is the interactive installer. It detects your agent, lets you choose project-level or global installation, and places the skill. The official docs say installing through the CLI enables automatic updates, while most other methods do not update automatically. That Node.js and npm are required is our inference from the use of npx; the official page does not state it.
# Recommended (interactive installer)
npx modern-web-guidance@latest install
# To also choose the Chrome extension skill pack
npx modern-web-guidance@latest install --choosePer-agent commands from the official documentation (excerpt):
| Agent | Command |
|---|---|
| Claude Code | claude plugin install modern-web-guidance@claude-plugins-official |
| Claude Code (in session) | /plugin marketplace add GoogleChrome/modern-web-guidance then /plugin install modern-web-guidance@googlechrome then /reload-plugins |
| Codex | codex plugin marketplace add GoogleChrome/modern-web-guidance then codex plugin add modern-web-guidance@googlechrome |
| Gemini CLI | gemini extensions install https://github.com/GoogleChrome/modern-web-guidance --auto-update |
| GitHub CLI | gh skill install GoogleChrome/modern-web-guidance |
| Vercel Skills | npx skills add GoogleChrome/modern-web-guidance |
| Antigravity CLI | agy plugin install https://github.com/GoogleChrome/modern-web-guidance |
| Goose | goose plugin install https://github.com/GoogleChrome/modern-web-guidance --auto-update |
Copilot CLI uses the same /plugin marketplace add form as Claude Code, and Grok, Kimi Code, JetBrains WebStorm and the Antigravity app each have their own steps. After installing in Claude Code, check that the skill file appears under .claude/skills/ in the project root (per the freeCodeCamp steps).
How to Use It: The Shortest Path
After installation, just ask for things as usual, such as "build a tooltip" or "build a modal." If the agent judges the task to be web-related, the skill kicks in. First, add one line to AGENTS.md (or CLAUDE.md for Claude Code) to set the Baseline target, which decides the range of features the agent may propose.
<!-- AGENTS.md / CLAUDE.md -->
This project's Baseline target is Baseline 2024.You can check what the agent receives yourself. search and retrieve work even before installation.
# Search guides in natural language (returns JSON with id, description, features used, similarity score)
npx modern-web-guidance@latest search "animate a dialog modal backdrop"
# Fetch the guide body by ID
npx modern-web-guidance@latest retrieve "animate-to-from-top-layer"
# Detect legacy patterns in existing code (per the README)
npx modern-web-guidance@latest legacy-scan .
# Allow guides for experimental features (written to .mwgrc)
npx modern-web-guidance@latest set-allow-volatile-features
npx modern-web-guidance@latest set-allow-origin-trialsThe official documentation groups use into four categories: building new user experiences (accordions, tab bars, container-query dashboards), modernizing legacy code (modals to <dialog>, tooltips to the Popover API), improving security (passkey login, a starter Content Security Policy, security audits) and improving performance (preloading on hover, improving INP and LCP). For an existing project, a workable flow is to find candidates with legacy-scan and then ask the agent to modernize them. Note that the README does not explain how legacy-scan detects patterns or what its output looks like, so you need to judge from the output.
How It Differs From Existing Approaches
There are other ways to give agents current information: MCP servers that fetch library documentation (such as Context7), MCP servers that query MDN, rules in AGENTS.md or CLAUDE.md, and linters such as ESLint. Modern Web Guidance is distinctive in covering the whole web platform with hand-curated guides delivered together with Baseline support data.
| Approach | What it supplies | Strength | Difference from Modern Web Guidance |
|---|---|---|---|
| Modern Web Guidance | Curated guides plus Baseline compatibility data | Local search, focused on web standards | — |
| Doc-fetching MCPs such as Context7 | Latest library and framework docs | Handles library version differences | Does not steer toward replacing libraries with standard APIs |
| MDN-backed MCP or RAG | Specs and references | Comprehensive | Leaves the burden of finding and curating on the developer (freeCodeCamp's point) |
| Rules in AGENTS.md / CLAUDE.md | Your own guidelines | Light and reliable | Hard to keep writing 100+ use cases yourself |
| Linters such as ESLint | Violations after the code is written | Mechanically verifiable | Does not help with design decisions before writing |
A related tool in a different area is the Hallmark guide, a skill for avoiding generic AI-looking UI design. Hallmark supplies visual direction, while Modern Web Guidance supplies which web standards to implement with. They do different jobs, so using both is conceivable.
Evidence and Limits
According to Chrome's documentation, each use case has evals. Playwright scripts check whether details of a guide were followed, such as @media (prefers-reduced-motion: reduce). A reference implementation must pass 100% and a deliberately flawed one must score 0%, and a generator retries until both hold. End-to-end evals comparing an unguided control with a run using Modern Web Guidance run several times a week with current models and agents. Early results show an average 37 percentage point improvement in adherence to modern best practices. The same page adds that results may vary by project, model, prompts and tools, and we could not confirm the methodology in detail.
The LogRocket and freeCodeCamp articles raise these cautions.
- Chrome describes it as an early preview, so it changes quickly
- It favors newer Baseline features, so unfamiliar APIs appear and browser support must be checked. That may suit a Chrome-only internal app but needs care for a broad public site
- interestfor (the Interest Invokers API) is behind a flag in Chrome and has a polyfill. CSS Anchor Positioning is described as Baseline 2025
- Where mature accessibility components or cross-framework support is needed, a library may still be the better choice
- Moving inline styles or keyframes into global CSS can leave orphaned CSS when a component is removed, so class names need namespacing
- Reviewing generated code (keyboard, focus, screen readers, fallbacks) is still required
Security and Operational Notes
- npx ...@latest fetches the latest version from npm on each run. For company use, pin a version or review what gets installed first
- The README says search is offline and needs no network call, but we found no statement about telemetry. In strict environments, check network traffic yourself
- Like AGENTS.md or CLAUDE.md, a skill is a file that changes agent behavior. Check where it is placed and what it contains before installing
- The official page does not describe uninstalling. You would delete the placed skill files such as .claude/skills/ or remove it with each agent's plugin management command
FAQ
What is Modern Web Guidance?
It is an open-source (Apache-2.0) set of skills and a CLI from the Google Chrome team. When a coding agent writes a web app, it retrieves modern browser API best practices and Baseline support status, so the agent avoids old JavaScript-heavy implementations.
Does it cost anything, and which agents does it work with?
The source repository is licensed under Apache-2.0, and the install commands mention no fee. It works with agents that support skills; Chrome's docs give install steps for Claude Code, Codex, Gemini CLI, Copilot CLI, Antigravity, Goose, Grok, Kimi Code, JetBrains WebStorm and others.
What is the shortest way to install it?
In an environment where Node.js works, run npx modern-web-guidance@latest install and choose the target interactively. In Claude Code you can also run claude plugin install modern-web-guidance@claude-plugins-official.
Do I have to set a Baseline target?
No. Without one the default is Widely available (features interoperable for 30 months or more). To allow newer features, write a line such as "This project's Baseline target is Baseline 2024." in AGENTS.md or CLAUDE.md.
Can I see the guide content beforehand?
Yes. Search with npx modern-web-guidance@latest search, then pass a guide ID to retrieve to see what the agent receives. You can try this before installing.
Can I trust the 37-point improvement figure?
It is an average from early evaluations shown in Chrome's documentation, and the same page notes that results vary by project, model, prompts and tools. The reliable check is to compare output on your own project before and after installing.
Related free tools (no sign-up, instant results)
Feel free to contact us
Contact Us