agentleFS
gandolhgandolh/my-personal-skills/skills/web-platform/SKILL.md

web-platform

Skill0 starsChanged 13 days agoMITView on GitHub

The estate's browser policy (Chrome on Android first, Safari on iPhone kept working) and 20 web platform guides vendored from GoogleChrome/modern-web-guidance at a pinned commit, each with the feature's browser support and its fallback.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Web platform: the browser policy and the vendored guides

Models write web code from training data that lags the platform. They miss features that shipped this year and guess at which browsers support them. This skill holds the estate's browser policy and 20 guides from GoogleChrome/modern-web-guidance (CC BY 4.0), copied at a pinned commit into references/mwg/. The library doesn't use upstream's installer, which runs the newest npm release on every web task and reports the agent's queries to Google. Why, and what was left out, is on modern-web-guidance-2026-11-23.md.

The rules

#RuleWhyChecked by
1Never run npx modern-web-guidance, never install its plugin, never read a guide from upstream's main. Read the vendored copy. Read a guide that isn't vendored at the pinned commit's GitHub URL; the vendored files link to itThe CLI runs the newest npm release each time, spawns a telemetry process and tells the agent to push the user to upgradegrep -rn 'npx' references/ finds nothing; review
2The floor is Baseline Widely available, the default build.target of Vite 7 and later. A feature at the floor ships with no fallback. Baseline Newly available is above the floor. Every current browser has it, older iPhones don'tEvery browser has had a floor feature for 30 months; a fallback for it is dead codereview
3Above the floor, Chrome on Android decides what to build and Safari on iPhone decides what must still work. Firefox and desktop Safari count like the iPhone. A feature one of them lacks ships either as an addition that does nothing when absent, or behind feature detection with the guide's fallback. The table below says whichAndroid is the main phone; the iPhone must keep workingreview; try it on Android Chrome, then in Safari
4A polyfill or fallback library comes from npm, pinned exactly, loaded with import() only when the feature is missing. Never a CDN URL, never @latest. A guide's CDN line means the npm package of the same namehouse-style rule 25; a CDN script is third-party code that changes under you at run timehouse-style's .npmrc; review
5The estate's skills win over a guide: base-ui rule 13 over native <dialog>, popover, menu or select (those guides are not vendored); house-style over a guide's code style; the design gates (nothing clipped, no ellipsis on content) over a guide's advice to truncateEach was decided with evidence; the guides are written for plain HTMLreview
6Read the one guide the task needs. Open a discipline guide (performance, security) only when the task spans that areaOne guide is 700 to 8,300 tokens; the 20 together are about 45,000review
7In React, adapt a guide without dropping its feature: spread an attribute React's types lack in from a typed object (never any, house-style rule 10), and call a DOM method on a ref. Where Base UI has a prop for the feature (hiddenUntilFound), use the prop. On React 19.2, a view transition wraps the state update in flushSync inside document.startViewTransition(). On React 19.3 and later, use React's <ViewTransition> and never call startViewTransition() yourselfThe guides are vanilla; the feature is the point. React's docs keep flushSync for browser APIs that read the DOM when their callback ends, and from 19.3 React starts view transitions itself and interrupts any otherreview

The guides

Paths are under references/mwg/. The last column is the guide's own support line at the pin. "Limited" means a browser lacks the feature, "Newly" means every current browser has it but older ones don't. "Additive" ships as is, since the feature does nothing where it's missing. "Fallback" ships with the guide's fallback. "Floor" needs neither.

TaskGuideSupport
Loading and responsiveness as a whole: the critical path, LCP, INP, fonts, images, code-splittingperformance/performance.mdper section
Prefetch or prerender the likely next pageperformance/improve-next-page-load-performance.mdLimited (Firefox, Safari): additive
Keep a long loop from blocking input (scheduler.yield())performance/break-up-long-tasks.mdLimited (Safari): fallback (setTimeout)
Find what makes an interaction slow (long animation frames)performance/identify-inp-causes.mdLimited (Firefox, Safari): measure in Chrome
Skip rendering long feeds off screen (content-visibility)performance/defer-rendering-heavy-content.mdNewly (2025-09): auto additive, hidden fallback
Front-end security as a whole: DOM sinks, cookies, framing, postMessage, CSP rolloutsecurity/security.mdper section
Show untrusted HTML (setHTML())security/sanitize-untrusted-html.mdLimited (Safari): fallback (DOMPurify)
Enforce Trusted Typessecurity/trusted-types.mdNewly (2026-02): fallback
Compare origins safely (postMessage, URLs)security/validate-origins.mdLimited (Firefox): fallback (URL)
Enter-to-send that doesn't fire mid-compositionforms/ime-safe-enter-submit.mdLimited (Safari): fallback (keyCode 229)
A sign-in form that autofillsforms/autofill-sign-in-form.mdFloor; autocorrect Newly (2026-09): additive
A sign-up form that autofillsforms/autofill-sign-up-form.mdFloor; autocorrect Newly (2026-09): additive
An event fixed to a time zonejs/coordinate-global-events.mdLimited (Safari): fallback (temporal-polyfill)
A date or a time with no zone (birthdays, all-day events)js/capture-location-agnostic-data.mdLimited (Safari): fallback (temporal-polyfill)
Durations and "in 3 days" between datesjs/calculate-event-differentials.mdLimited (Safari): fallback (temporal-polyfill)
Follow the phone's text size setting (<meta name="text-scale">)accessibility/respect-os-text-scale.mdLimited (Firefox, Safari): additive
Animate between states of a single-page appui-behaviors/same-document-transitions.mdNewly (2025-10): fallback
Animate between pages of a multi-page site (Astro, Docusaurus)ui-behaviors/cross-document-transitions.mdLimited (Firefox): additive
Collapsed content that find-in-page still reaches (Base UI's hiddenUntilFound)ui-behaviors/search-hidden-content.mdLimited (Safari): additive
A data table that holds up on a phoneui-atoms/responsive-table.mdFloor

Taking updates

The pin, the list of files and the lines changed from upstream are in the library's ATTRIBUTION.md. scripts/vendor-modern-web-guidance.mjs makes the copy from a clone at the new pin. Never edit a file under references/mwg/ by hand. The steps for a new pin are in docs/vendoring.md, Part 2.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.