AGENTCONN
M

// Agent profile

modern-web-guidance

Coding Free

About modern-web-guidance

modern-web-guidance (GoogleChrome/modern-web-guidance-src) is a structured knowledge base of modern web development best practices specifically formatted for consumption by AI coding agents. Rather than training models on outdated Stack Overflow answers and deprecated API docs, this project provides curated, up-to-date guidance on HTML, CSS, JavaScript, Web APIs, performance, accessibility, and security patterns. Each guidance entry includes the recommended pattern, common anti-patterns to avoid, browser compatibility notes, and code examples. Designed by the Google Chrome team to improve the quality of AI-generated web code. Trending at +1,340 stars/day, 4.8K stars.

Key Features

  • Curated web development guidance — structured for AI agent consumption, not human browsing
  • Modern patterns — current best practices for HTML, CSS, JavaScript, and Web APIs
  • Anti-pattern documentation — common mistakes AI models make, with correct alternatives
  • Browser compatibility notes — which APIs are safe to use, which need polyfills or fallbacks
  • Performance guidance — Core Web Vitals optimization patterns, lazy loading, resource hints
  • Accessibility patterns — WCAG-compliant implementations for common UI components
  • Security best practices — CSP, input sanitization, secure cookie handling, CORS patterns
  • From the Google Chrome team — authoritative source maintained alongside the browser

Overview

modern-web-guidance addresses a specific problem: AI coding agents write web code using patterns they learned from training data, which includes years of outdated tutorials, deprecated API usage, and pre-modern workarounds. When a coding agent generates document.write(), uses synchronous XHR, or builds a modal without focus trapping, it’s not because the model is bad — it’s because bad patterns are overrepresented in its training data.

This project, maintained by the Google Chrome team, provides a structured alternative. Each entry in the knowledge base covers a specific web development topic with the recommended modern pattern, common anti-patterns to avoid (and why), browser support status, and working code examples. The format is designed for retrieval-augmented generation: agents can query the knowledge base for specific topics and get authoritative, current guidance in a format they can directly apply.

Key Capabilities

Structured guidance format: Each topic follows a consistent schema — recommended approach, anti-patterns, browser compatibility, code examples, and references. This consistency makes the knowledge base reliable for automated consumption: agents don’t need to parse free-form documentation to extract actionable guidance.

Anti-pattern documentation: Perhaps the most valuable section of each entry. Rather than just showing the right way, each topic catalogs the specific wrong patterns that AI models commonly generate — with explanations of why they’re wrong and what to use instead. This directly addresses the most common failure mode of AI-generated web code.

Performance patterns: Guidance entries cover Core Web Vitals optimization, resource loading strategies (preload, prefetch, preconnect), image optimization, font loading, JavaScript execution timing, and layout stability prevention. Each pattern includes measurable impact and when to apply it.

Accessibility patterns: WCAG AA-compliant implementations for common components: modals, dropdowns, tabs, accordions, carousels, toast notifications, and forms. Each pattern includes keyboard navigation, screen reader behavior, focus management, and ARIA attribute usage.

Use Cases

AI coding agent builders who want to improve the quality of their agent’s frontend code output. MCP server developers building web development tools that need a reliable knowledge base. Teams using coding agents for frontend work who want to enforce modern patterns. Browser extension developers who need authoritative guidance on current Web API best practices.

Considerations

The knowledge base focuses on vanilla HTML/CSS/JS and Web APIs — framework-specific patterns (React, Vue, Svelte) are largely out of scope. It’s a reference, not a tutorial: entries assume the consuming agent understands web development fundamentals and needs guidance on current best practices, not an introduction to the topic. Coverage is growing but not exhaustive — Chrome team priorities influence which topics get entries first.

Similar Agents