modern-web-guidance
Skill6.4k starsChanged todayMITView on GitHub
Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns. Trigger immediately for: modals/dialogs/popovers, tables, dark mode, anchor positioning, container queries, view transitions, scroll-driven animations, parallax/reveals, forms, validation, autofill, accessibility, custom selects, scrollbars, CWV (LCP, INP, CLS), content-visibility, fetch priority, image optimization, security, passkeys, HTML sanitization, web components, dates/timezones, built-in AI, WebAssembly, standard HTML/CSS/DOM in frameworks, etc. DO NOT trigger for: backend (SQL, ORMs, API routes), infra/scripts (CI/CD, Docker, Actions, Python/Go, Git), or tooling/trivial (Vite, tsconfig, ESLint, tests, copy/renames, 3P docs), etc.
29 other projects use a version of this, 15 of them edited.
Trending
Steady talk.about the whole repository
Most recently taken up by
- kimkon1011/orgiast-claude-rulesedited, first seen Nov 16, 2026
- ADWilkinson/astacktheir own version, first seen Nov 16, 2026
- medley/fda-data-mcpedited, first seen Nov 16, 2026
- display-design-studio/skillsword for word, first seen Nov 16, 2026
- jeelnadaa/DENTword for word, first seen Nov 16, 2026
- Mahesh-Bishnoi/skillstheir own version, first seen Nov 16, 2026
Who's talking about sanity-io/sanity
- sanity-io/sanity-plugin-media“(feat) Option to insert multiple images”GitHub · May 21, 2024 · 15 reactions
- nuxt-modules/sanity“Typegen cannot generate types from plugins”GitHub · Feb 5, 2026 · 12 reactions
- ricokahler/sanity-codegen“Feature request: Sanity v3 support”GitHub · Sep 2, 2022 · 7 reactions
- nuxt-modules/sanity“Generate query types automatically”GitHub · Jul 17, 2025 · 5 reactions
- sanity-io/next-sanity“fix(deps): update sanity monorepo to v6.11.0”GitHub · Aug 18, 2026 · 3 reactions
The biggest 5 of 29 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 29
Talked about on GitHub and Stack Overflow (29 times).
On GitHub · 24
- May 21, 2024(feat) Option to insert multiple images — sanity-io/sanity-plugin-media15 reactions · 9 comments
- Feb 5, 2026Typegen cannot generate types from plugins — nuxt-modules/sanity12 reactions · 3 comments
- Sep 2, 2022Feature request: Sanity v3 support — ricokahler/sanity-codegen7 reactions · 8 comments
- Jul 17, 2025Generate query types automatically — nuxt-modules/sanity5 reactions · 5 comments
- Aug 18, 2026fix(deps): update sanity monorepo to v6.11.0 — sanity-io/next-sanity3 reactions · 3 comments
19 more on GitHub
- Aug 1, 2023fix: bump "@sanity/schema" dependency version to resolve invalid export — sanity-io/sanity-naive-html-serializer2 reactions · 2 comments
- Oct 30, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 27 updates — CloudNativeBergen/website1 reaction · 3 comments
- Oct 30, 2026build(deps): bump the production-dependencies group across 1 directory with 31 updates — CloudNativeBergen/website1 reaction · 2 comments
- Oct 11, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 24 updates — CloudNativeBergen/website1 reaction · 3 comments
- Oct 11, 2026chore(deps): bump the production-dependencies group across 1 directory with 26 updates — CloudNativeBergen/website1 reaction · 3 comments
- Oct 2, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 22 updates — CloudNativeBergen/website1 reaction · 3 comments
- Oct 1, 2026chore(deps-dev): bump the development-dependencies group with 18 updates — CloudNativeBergen/website1 reaction · 3 comments
- Oct 1, 2026chore(deps): bump the production-dependencies group with 25 updates — CloudNativeBergen/website1 reaction · 3 comments
- Sep 4, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 13 updates — CloudNativeBergen/website1 reaction · 2 comments
- Sep 1, 2026chore(deps-dev): bump the development-dependencies group with 20 updates — CloudNativeBergen/website1 reaction · 1 comment
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 3 updates — CloudNativeBergen/website1 reaction · 4 comments
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 4 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 5 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 4 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 5 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 7 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 5 updates — CloudNativeBergen/website1 reaction · 2 comments
- Aug 4, 2026chore(deps): bump the production-dependencies group across 1 directory with 7 updates — CloudNativeBergen/website1 reaction · 2 comments
- May 7, 2024fix(typeEvlauator): handle rest on object splat operations — sanity-io/groq-js1 reaction · 7 comments
On Stack Overflow · 5
- Feb 17, 2020Filter query result by field value inside array of objects [Sanity.io & GROQ]3 votes
- May 8, 2022Websocket failed when first time rendering - React1 vote
- Mar 17, 2025Sanity desk error: Could not fetch list items Error: Could not establish EventSource connection0 votes
- Feb 24, 2023Can't login to Sanity via VSC terminal0 votes
- Jan 7, 2022npm run graphql-deploy command stuck in Sanity0 votes
Used with
Projects with it also use chrome-extensions, brand-architecture and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
thistleknotSkillchrome-extensions
Build, install and verify a personal Chrome extension that does something on the local machine (write a file, run a script) when its toolbar button is clicked. Covers the Manifest V3 extension + native-messaging host pattern, pinning the extension ID with a "key", registering the host under HKCU (no admin), the one manual "Load unpacked" step and why automation cannot do it, and how to test the real Chrome round trip yourself without clicking the toolbar. Trigger on "chrome extension", "browser button that saves to a file", "native messaging", "clip the page to a file", "load unpacked", "extension shows a red !".
Also in 6 projects that use this
brainbytes-devSkillbrand-architecture
Design brand architecture for multi-product or multi-brand organizations. Use when managing brand portfolios or launching sub-brands.
Also in 3 projects that use this
david33137Skilllogo-design
Logo design with 55 styles, 30 color palettes, 25 industries. Generate logos with Gemini Nano Banana model. Actions: design, create, generate logo.
Also in 3 projects that use this
ncklrsSkillmotion-designer
Advanced motion designer with decades of After Effects and motion graphics experience, specialized in creating engaging video specifications for Remotion. Use when creating video specs, planning motion graphics, designing animations, or when asked to "create a video", "design motion graphics", "plan video content", or "spec out a video". Produces detailed scene-by-scene specifications with timing, audio, sound effects, and animation descriptions.
Also in 3 projects that use this
jiangtaoSkillvideo
视频链接收集和下载管理工具
Also in 3 projects that use this
OpenAISkilltest-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Also in 4 projects that use this
Other versions29 projects use a version of this.
Word for word · 6
- OutThisLife/brooklyn-skills★ 215100% same
- Ratimon/openquok-monorepo★ 107100% same
- narumiruna/skills★ 18100% same
- bepaldes/heimdall-agent★ 2100% same
- display-design-studio/skills★ 2100% same
- jeelnadaa/DENT★ 2100% same
Edited · 15
- GoogleChrome/modern-web-guidance★ 20k99% same
- JetBrains/skills★ 38622% same
- 1999AZZAR/designer-mcp★ 1796% same
- 1999AZZAR/the-designer★ 1796% same
- Hela-Ecosystem/designer-mcp★ 1796% same
- anis-dr/skills★ 491% same
- yuusakuri/agent-skills★ 222% same
- JameMy0001/antigravity-skills-hub★ 121% same
- ManatoYamashita/skills★ 152% same
- medley/fda-data-mcp★ 194% same
5 more not listed
Wrote their own version · 8
- vercel-labs/agent-browser★ 51ksame name
- Alice39s/agent-stash★ 20same name
- alexderz/agentic-toolbox★ 5same name
- matt-riley/agent-skills★ 3same name
- Mahesh-Bishnoi/skills★ 2same name
- ADWilkinson/astack★ 1same name
- yanzyuyu/min-tok★ 1same name
- ethosure/coding_ethos★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- apple-designSkill
- ask-emilSkill
- ask-sonnerSkill
- before-and-afterSkill
- break-uiSkill
- choreographSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- deslopSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- find-skillsSkill
- gesturesSkill
- grill-meSkill
- improve-animationsSkill
- improve-codebase-architectureSkill
- learn-tasteSkill
- migrate-styled-components-to-panda-cssSkill
- mobile-nativeSkill
- performance-optimizationSkill
- pick-ui-librarySkill
- playwright-best-practicesSkill
- playwright-cliSkill
- pr-descriptionSkill
- prototypeSkill
- react-devtoolsSkill
- react-rx-hook-auditSkill
- remove-animationsSkill
- review-animationsSkill
- rxjs-like-a-proSkill
- sanity-benchSkill
- sanity-config-reducersSkill
- sanity-default-pluginsSkill
- sanity-i18n-translateSkill
- sanity-plugin-authoringSkill
- sanity-radar-investigateSkill
- sanity-radarSkill
- sanity-tsdown-configSkill
- sanity-ui-migration-progressSkill
- sanity-visual-coverageSkill
- sanity-visual-regressionSkill
- storiesSkill
- storybook-initSkill
- storybook-setupSkill
- storybook-upgradeSkill
- tddSkill
- vercel-react-best-practicesSkill
- write-a-skillSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 2 are common, 3 are distinctive, and 11 are very specific to this project.
2
Common
Most of the 23 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Search and retrieve standardized modern web best practices at the start of implementing or updating any web UI, CSS layout/animation, or …
- Very specific: line 17
Run modern-web-guidance directly with npx using a 2–5 word action-oriented query for a single web platform capability or UI pattern:
- Very specific: line 20
Example: Search "light dismiss dialog" or "responsive data table", not "dialog" (too terse), "responsive table dark mode" (compound — split …
- Very specific: line 39
If retrieve saves large output (> 9.5 KB) to a temporary file to prevent truncation, read that file path in full using your file-reading …
- Distinctive: line 43
When generating or modifying code, cross-check the implementation against the retrieved guide before concluding:
- Distinctive: line 44
Applicable Guidance & Fallbacks: Ensure the relevant modern patterns and necessary fallback strategies from the guide are correctly …
- Very specific: line 46
Do not run legacy-scan; it's for detecting legacy patterns to modernize, not this.
- Very specific: line 50
When you consult modern-web-guidance for a task, end the response where you deliver those changes with a ### Modern Web Guidance section:
- Very specific: line 54
When searched/listed in this turn but zero guides applied: Write one first-person sentence naming which topics or guides you checked in …
- Very specific: line 58
Only: when asked for a broad, open-ended codebase modernization or legacy-pattern scan where no specific target feature or component is …
- Very specific: line 67
Verify: Check each finding against its keepWhen / dropWhen rubric.
- Very specific: line 74
Runner & Permissions: Prefer pnpx over npx if pnpm is available (pnpx does not use -y).
- Very specific: line 76
Offline: If the command hangs due to being offline, retry with npx --offline ….
- Common: line 80
Always search first to find the most relevant guides.
- Very specific: line 84
DOM, IDs & CSS: Call showModal()/moveBefore() via refs on non-VDOM-managed nodes, generate per-instance IDs/anchor-names (useId()), and …
- Common: line 88
Default Behavior: All guides assume Baseline Widely available features are safe to use without fallbacks.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modern Web Guidance
Search and retrieve standardized modern web best practices at the start of implementing or updating any web UI, CSS layout/animation, or client-side JS logic (dates/timezones, sanitization, performance, accessibility, UX fixes) before writing ad-hoc solutions or adding dependencies.
Primary Workflow
Step 1. Search Use Cases
Run modern-web-guidance directly with npx using a 2–5 word action-oriented query for a single web platform capability or UI pattern:
- Keep queries focused and generic: Describe the user-visible capability (
<verb> + <UI/platform object>, optionally paired with the target HTML/CSS/JS feature name if known). Omit framework/library names (React,Vue,Tailwind, etc.) and app/domain nouns (product, route, or component/file names). Split multi-feature tasks into separatesearchcalls. - Name implied UI primitives: When the user's prompt expresses intent without naming the UI primitive (e.g. "confirm first", "delete with confirmation", "pick a date"), translate the domain intent into the implied UI component or platform mechanism (e.g. search
"confirmation modal dialog"or"confirm dialog"rather than"confirm destructive action", or"date picker input"rather than"pick a date"). - Example: Search
"light dismiss dialog"or"responsive data table", not"dialog"(too terse),"responsive table dark mode"(compound — split into two searches), or"close React settings modal on outside click"(framework/app noise).
npx -y modern-web-guidance@latest search "<query>" --skill-version 2026_11_09-5bcc021bNote: Returns
[{ "id", "description" }, ...]. Judge results by theirdescriptionfields:
- Match found: Call
retrievedirectly—do not also runlist.- Weak or empty results: If
searchreturns[]or unrelated descriptions, rephrasesearchonce using the concrete HTML/CSS/UI component noun or synonym (e.g.,dialog,modal,popover,table,form) before falling back tolist(or uselistonce for broad UI audits).- Topic not covered: If no
descriptionmatches after rephrasing, proceed without retrieving unrelated guides.
Step 2. Retrieve Best Practices
Once you have relevant id(s) from the search results, call retrieve to get the full guide(s)—including both specific use-case guides that match your task and any broader discipline guide (e.g., html, css, forms, accessibility, color, performance, security) that applies. You can pass multiple IDs separated by commas.
npx -y modern-web-guidance@latest retrieve "<id>"If retrieve saves large output (> 9.5 KB) to a temporary file to prevent truncation, read that file path in full using your file-reading tool (reading remaining line ranges if needed)—do not use cat or head.
Step 3. Verify Guidance Compliance
When generating or modifying code, cross-check the implementation against the retrieved guide before concluding:
- Applicable Guidance & Fallbacks: Ensure the relevant modern patterns and necessary fallback strategies from the guide are correctly applied, without forcing unrequested features.
- Task Fulfillment: Confirm that the implementation fully satisfies the user's request.
- Do not run
legacy-scan; it's for detecting legacy patterns to modernize, not this.
Step 4. Disclose Skill Usage
When you consult modern-web-guidance for a task, end the response where you deliver those changes with a ### Modern Web Guidance section:
- When retrieved guides shaped your code: Write one bullet (1–2 sentences, ≤75 words) per newly applied
<id>in first-person voice explaining the non-obvious implementation choices, CSS/API overrides, or fallbacks<id>required and the pitfall it prevented, anchored by a short verbatim quote of that specific rule or gotcha (never the guide's intro overview):- **\<id>`**: <Non-obvious APIs, overrides, or fallbacks applied and the pitfall prevented> ("<short verbatim quote of the specific rule or gotcha>").`- Never guess
<id>s or quotes from memory after context compaction (re-runsearch/retrieveif needed), and credit only guide-backed changes from the current turn.
- Never guess
- When searched/listed in this turn but zero guides applied: Write one first-person sentence naming which topics or guides you checked in
modern-web-guidanceand why none applied (omit if any guide applied).
Alternative flow: Modernize an existing codebase
Only when asked for a broad, open-ended codebase modernization or legacy-pattern scan where no specific target feature or component is named (do not run legacy-scan when asked to add, update, fix, or audit a specific feature or component), run the 4-step modernization flow:
Note:
legacy-scanscans for a curated subset (~20% of the guidance corpus).
npx -y modern-web-guidance@latest legacy-scan <path> --json- Scan: Run
legacy-scan <path> --jsonto detect legacy web platform patterns across the project or directory. - Verify: Check each finding against its
keepWhen/dropWhenrubric; drop false positives (fallbacks, cross-file helpers, vendor code, lookalikes). - Report: Summarize verified findings (and the modernization plan, if editing) for the user, noting that
legacy-scanonly checks the subset of guides (~20% of the catalog) that have deterministic legacy rules. - Modernize (when the user asked to modernize rather than only audit/report): Retrieve each finding's guide (
retrieve "<guide-id>"via Step 2), apply the replacement (keeping existing libraries as fallbacks where the guide requires one), and re-runlegacy-scan <path>on the modified files to confirm resolution.- Dropped findings and kept fallbacks still match static scans; do not edit safe code or inspect
legacy-scan.mjsto force 0 findings.
- Dropped findings and kept fallbacks still match static scans; do not edit safe code or inspect
Using npx / pnpx
- Runner & Permissions: Prefer
pnpxovernpxifpnpmis available (pnpxdoes not use-y); on Windows, usenpx.cmd. When requesting tool permissions, allowlistnpx -y modern-web-guidance@latest *(orpnpx modern-web-guidance@latest *) specifically, never barenpx *orpnpx *. - Sandboxes & Network: Fetching
modern-web-guidancerequires outbound network access. In sandboxed or approval-gated environments (e.g., Codex, Claude Code), proactively request approval/allowlisting with network access BEFORE the first execution to avoid timeouts, and setNPM_CONFIG_CACHE=/tmp/npm-cacheif~/.npmis read-only. - Offline: If the command hangs due to being offline, retry with
npx --offline ….
Guidelines
- Always search first to find the most relevant guides. Do not hallucinate guides or ignore them; they represent the preferred local standard for the user's project.
- These guides use vanilla HTML/CSS/JS; adapt them to your framework without dropping the modern feature:
- Types: Spread/cast newly shipped HTML attributes (
{...({ popover: 'hint', interestfor: id, commandfor: id, switch: '' } as any)},[attr.*]) rather than removing them or merging@types/react. - SSR & Bundlers: Guard
window/HTMLElementin SSR and load polyfills via bareimport('<pkg>')in client effects (or set Vitebuild.target: 'esnext'for top-levelawait)—never copy files fromnode_modules. - DOM, IDs & CSS: Call
showModal()/moveBefore()via refs on non-VDOM-managed nodes, generate per-instance IDs/anchor-names (useId()), and keep:rootand@starting-styletop-level/unscoped.
- Types: Spread/cast newly shipped HTML attributes (
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 defines explicit browser support requirements, use the guide's compatibility data to determine if a fallback can be ignored (for
Baseline YYYYtargets, a feature satisfies the target if its "Baseline since" date is<= YYYY). Examples: "Do not implement feature fallbacks", "Safari 17.4+", "Never implement polyfills; use a lightweight custom fallback or redesign", or "Allow Newly Available features if feature-detected with graceful degradation". - Reactive Policy Discovery: Suggest documenting a policy in
AGENTS.mdorCLAUDE.md(e.g.,**Browser Support:** Allow Newly Available features, but only adopt custom fallback code that adds <= 20 lines and no external dependencies) if the developer targets a restricted runtime (Electron/Tauri), excludes specific browsers, hesitates over polyfill size/complexity, or asks if a feature is safe without fallbacks.
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
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.

