Keep your coding agent up to date with the latest web best practices
Release v0.0.147
github-actions[bot]bd25a2f3c248
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 550d7d8..48db7a8 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -8,7 +8,7 @@"name": "modern-web-guidance","source": "./","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.146"+ "version": "0.0.147"}]}diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex babf978..69a42d4 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.146",+ "version": "0.0.147","author": {"name": "Google Chrome"}diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.jsonindex babf978..69a42d4 100644--- a/.cursor-plugin/plugin.json+++ b/.cursor-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.146",+ "version": "0.0.147","author": {"name": "Google Chrome"}diff --git a/README.md b/README.mdindex ab5ae03..6bc902b 100644--- a/README.md+++ b/README.md@@ -16,8 +16,8 @@ Every developer knows about the **knowledge cutoff**—but for coding agents, th**This repository bridges that gap.** We don't waste your agent's context on general knowledge it already has. Instead, we inject targeted, high-density, expert-curated guidance specifically focused on:-1. Advanced browser APIs models consistently misuse or fail to structure.-2. High-performance, accessible, and secure patterns that eliminate legacy bloat.+1. Advanced browser APIs models consistently misuse or fail to structure.+2. High-performance, accessible, and secure patterns that eliminate legacy bloat.3. Responsible cross-browser fallback strategies that models are incapable of inventing on-the-fly.## What@@ -26,17 +26,17 @@ Our content is evergrowing, we cover the bleeding edge of the web platform as we### Core disciplines-Here's a tiny sampling of the **123 use-case-centric guides**:+Here's a tiny sampling of the **123 use-case-centric guides**:-* **User Experience**: Smooth and modern visual states: View Transitions, CSS `scrollbar-color` styling, high-contrast adaptation, entry/exit transition animations, parallax scrolling.-* **CSS layout:** container queries (both size and style queries), modern color spaces (`oklch`, `color-mix`) and `subgrid`, text-wrap tuning (`balance`, `pretty`), subgrid, and typography line height trimming (`text-box`)-* **Performance**: instant page preloading, Interaction to Next Paint (INP) diagnostics, and background task scheduling using `scheduler.yield`.-* **Forms**: auto-sizing input fields (`field-sizing: content`), precise validation with `:user-invalid`, and accent color synchronization.-* **Native UI Components**: Direct control over dialogs, CSS Anchor Positioning for tooltips, same-document and cross-document View Transitions, and the Popover API.-* **Accessibility & Security**: accessible error announcements, keyboard focus management.+* **User Experience**: Smooth and modern visual states: View Transitions, CSS `scrollbar-color` styling, high-contrast adaptation, entry/exit transition animations, parallax scrolling.+* **CSS layout:** container queries (both size and style queries), modern color spaces (`oklch`, `color-mix`) and `subgrid`, text-wrap tuning (`balance`, `pretty`), subgrid, and typography line height trimming (`text-box`)+* **Performance**: instant page preloading, Interaction to Next Paint (INP) diagnostics, and background task scheduling using `scheduler.yield`.+* **Forms**: auto-sizing input fields (`field-sizing: content`), precise validation with `:user-invalid`, and accent color synchronization.+* **Native UI Components**: Direct control over dialogs, CSS Anchor Positioning for tooltips, same-document and cross-document View Transitions, and the Popover API.+* **Accessibility & Security**: accessible error announcements, keyboard focus management.* **Built-in AI**: Leveraging local, on-device client models (native Language Detection, Summarization, and Translation APIs).-#### Full Skill Coverage (v0.0.146)+#### Full Skill Coverage (v0.0.147)<details><summary>Includes expert guidance across <strong>98 modern web features</strong></summary>@@ -297,20 +297,20 @@ Here's a tiny sampling of the **123 use-case-centric guides**:### The modern web platform that you can *use,* safely-* **Responsible Fallbacks**: We don't recommend heavy polyfills that bloat your bundle or block the main thread. Instead, we suggest what an **in-tune senior front-end developer would appreciate**:- 1. Prioritizing lightweight, case-specific custom implementations (\<50 lines of code).- 2. Conditional loading of performant polyfills *only* when native support is absent. And avoiding both risky CDNs (like polyfill.io) and CSS-parsing polyfills.- 3. Using bulletproof prototype-level feature detection rather than naive environment checks.-* **Gotchas & Quirk Mitigation**: Tricky API boundaries and platform quirks (e.g., the 64KB payload quota for `fetchLater()`, macOS specific scrollbar gutters, and WebKit flickering bugs) are fully documented.+* **Responsible Fallbacks**: We don't recommend heavy polyfills that bloat your bundle or block the main thread. Instead, we suggest what an **in-tune senior front-end developer would appreciate**:+ 1. Prioritizing lightweight, case-specific custom implementations (\<50 lines of code).+ 2. Conditional loading of performant polyfills *only* when native support is absent. And avoiding both risky CDNs and heavy polyfills.+ 3. Using bulletproof prototype-level feature detection rather than naive environment checks.+* **Gotchas & Quirk Mitigation**: Tricky API boundaries and platform quirks (e.g., the 64KB payload quota for `fetchLater()`, macOS specific scrollbar gutters, and WebKit flickering bugs) are fully documented.* **Baseline-Aware Decisions**: Dynamic compatibility data from the Baseline project ensures agents make micro-architectural decisions on-the-fly—applying progressive enhancement conditionally, not blindly.-## How+## How-### How Coding Agents use our skill+### How Coding Agents use our skill-* **Bootstrapped Awareness**: When loaded, the agent receives a system prompt instruction: *"To use modern web platform APIs, query the `modern-web` tool."*-* **Semantic Vector Discovery**: The agent executes `modern-web search "<query>"` in your terminal. The tool uses an optimized `MiniLM-L6-v2` TensorFlow.js model running **entirely offline** on your CPU (thx `MiniLM`! No network calls, latency, or API keys required) to calculate the **cosine distance** between the query and our pre-computed guide embeddings.-* **Precision Retrieval**: The agent executes `modern-web retrieve <guide-id>` to fetch the exact, clean Markdown guidelines it discovered.+* **Bootstrapped Awareness**: When loaded, the agent receives a system prompt instruction: *"To use modern web platform APIs, query the `modern-web` tool."*+* **Semantic Vector Discovery**: The agent executes `modern-web search "<query>"` in your terminal. The tool uses an optimized `MiniLM-L6-v2` TensorFlow.js model running **entirely offline** on your CPU (thx `MiniLM`! No network calls, latency, or API keys required) to calculate the **cosine distance** between the query and our pre-computed guide embeddings.+* **Precision Retrieval**: The agent executes `modern-web retrieve <guide-id>` to fetch the exact, clean Markdown guidelines it discovered.* **State-of-the-Art Generation**: The guide's precise code snippets, DO/DO NOT rules, and responsible cross-browser fallbacks are injected directly into the agent's context window, enabling it to generate clean, modern code instantly.Token-efficient, targeted, and private guidance injected right into the context window. Yeah, buddy.@@ -340,7 +340,7 @@ npx modern-web-guidance@latest retrieve "animate-to-from-top-layer"#### GitHub CLI: `gh skill install GoogleChrome/modern-web-guidance`-#### GitHub Copilot CLI:+#### GitHub Copilot CLI:```shell/plugin marketplace add GoogleChrome/modern-web-guidance@@ -393,14 +393,14 @@ Every piece of guidance in this pack isn't just a tutorial—it is **empiricallyFor each guide, we develop a Playwright script (`.spec.ts`) that asserts the guide's implementation details were followed, such as:-* Verifying accessibility tags and computed styles (e.g., `@media (prefers-contrast: more)` overrides).+* Verifying accessibility tags and computed styles (e.g., `@media (prefers-contrast: more)` overrides).* Asserting exact functional layouts and performance behaviors as interpreted by the browser.### 2. Self-Healing Playwright CalibrationTo ensure our test suites aren't nonsense, the pipeline runs a continuous, closed-loop calibration:-* **Golden Master vs. Anti-Pattern**: We run our per-usecase Playwright scripts against both a perfect reference implementation (`demo.html`, expects 100% pass) and a deliberately flawed implementation (`negative-demo.html`, expects 0% pass).+* **Golden Master vs. Anti-Pattern**: We run our per-usecase Playwright scripts against both a perfect reference implementation (`demo.html`, expects 100% pass) and a deliberately flawed implementation (`negative-demo.html`, expects 0% pass).* **Autonomous Refinement**: If calibration fails, the generator automatically retries with detailed failure context until the grader achieves 100% calibration.Last, we validate that the calibrated graders aren't taking shortcuts and honor the sanctity of the intent.@@ -409,7 +409,7 @@ Last, we validate that the calibrated graders aren't taking shortcuts and honorFinally, we run end-to-end evaluations on real base applications:-* **Unguided (Control)**: The agent addresses a coding task using only its default training data.+* **Unguided (Control)**: The agent addresses a coding task using only its default training data.* **Guided (Experiment)**: The agent addresses the exact same task, but with access to this skill pack.We grade both outputs and only release guides that demonstrate a massive, quantifiable improvement in code quality (e.g., improving success rates from **20% up to 90%**).@@ -418,11 +418,11 @@ We grade both outputs and only release guides that demonstrate a massive, quantiIf you want to customize the skill packs installed and the scope at which they are installed, you can run install with `--choose`.-* **`modern-web-guidance`**: (234 tokens) Everything mentioned above+* **`modern-web-guidance`**: (234 tokens) Everything mentioned above* **`chrome-extensions`**: (181 tokens) Manifest V3 development, background service workers, content scripts, and extension APIs. Manage Chrome Web Store metadata, permissions justifications, privacy policies, and publishing readiness.```sh-# Choose which skills you want+# Choose which skills you wantnpx modern-web-guidance@latest install --choose```diff --git a/gemini-extension.json b/gemini-extension.jsonindex babf978..69a42d4 100644--- a/gemini-extension.json+++ b/gemini-extension.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.146",+ "version": "0.0.147","author": {"name": "Google Chrome"}diff --git a/package.json b/package.jsonindex d94ed43..9566bd6 100644--- a/package.json+++ b/package.json@@ -3,7 +3,7 @@"displayName": "Modern Web Guidance","description": "Keep your agent up to date on the latest web best practices.","license": "Apache-2.0",- "version": "0.0.146",+ "version": "0.0.147","publisher": "GoogleChrome","engines": {"vscode": "^1.90.0",diff --git a/skills/modern-web-guidance/SKILL.md b/skills/modern-web-guidance/SKILL.mdindex 430da6c..edd2466 100644--- a/skills/modern-web-guidance/SKILL.md+++ b/skills/modern-web-guidance/SKILL.md@@ -35,7 +35,7 @@ Must use this skill:Search with an action-oriented query summarizing what you want to achieve using the `search` command. Run `modern-web-guidance` directly with `npx`.```sh-npx -y modern-web-guidance@latest --skill-version 2026_05_14-74d94af5 search "<query>"+npx -y modern-web-guidance@latest --skill-version 2026_05_15-a0e55fb0 search "<query>"```**Example Output**:@@ -60,7 +60,7 @@ npx -y modern-web-guidance@latest --skill-version 2026_05_14-74d94af5 search "<q]```-> **Note**: If search results are vague, return no matches, or show low similarity scores, run the `list` command to browse the complete catalog directory:+> **Note**: If search results are vague, return no matches, or show low similarity scores, run the `list` command to browse all guides:> ```sh> npx -y modern-web-guidance@latest list> ```@@ -90,6 +90,25 @@ npx -y modern-web-guidance@latest retrieve "<id>"## Guidelines-- Always search **first** to find the most specific design/performance patterns.+- Always search **first** to find the most relevant guides.- These guides are usually framework-agnostic; adapt them correctly to your setup.- Do not hallucinate guides or ignore them; they represent the preferred local standard for the user's project.+++## Interpreting Browser Support & Fallbacks++* **Default Behavior**: All guides assume **Baseline Widely available** features are safe to use without fallbacks. For features that are not Baseline widely available, you **MUST** follow the fallback recommendations in the guide, unless the user has specified a custom browser support policy.+* **Custom Policies**: If the user has already defined explicit browser support requirements, use the browser compatibility data in the guide to determine if a fallback can be safely ignored.+ - For Baseline YYYY targets, a feature satisfies this target if its "Baseline since" date is <= YYYY.+ - **Policy Examples**:+ - _"Do not implement feature fallbacks."_ (for exploratory prototypes of the cutting-edge web)+ - _"Safari 17.4+"_ (for internal tools targeting macOS or Tauri-based desktop apps)+ - _"Never recommend or implement polyfills; if a Baseline Newly Available feature is required for core functionality, provide a lightweight custom fallback or redesign the approach."_ (to minimize bundle size and avoid technical debt)+ - _"Assume a modern execution environment where Baseline Newly Available features can be used natively, provided they are strictly feature-detected and degrade gracefully."_ (for progressive enhancement strategies)+* **Reactive Policy Discovery**: Watch for environmental cues to suggest documenting a policy in CLAUDE.md or AGENTS.md. Suggest this if the developer:+ - Mentions building for a restricted runtime (e.g., Electron or Tauri).+ - Explicitly excludes specific targets (e.g., "we don't support Desktop Chrome").+ - Expresses hesitation about polyfill complexity, bundle size, or performance cost.+ - Questions if a feature is safe to use without fallbacks.++ No defined policy format. This is an example: `**Browser Support:** Allow Newly Available features, but only adopt custom fallback code that adds <= 20 lines and does not require external dependencies.`