开源项目 GitHub Topic ai-agent 2026-07-06T12:02 正文 ok 9162 words

📦 thedaviddias/Front-End-Checklist

英文标题:📦 thedaviddias/Front-End-Checklist

Front-End Checklist 是一个面向人类和 AI 代理的开源前端质量体系,将前端最佳实践转化为可复用的审查工作流。它提供 385 条英文规则,涵盖 11 个类别,并可通过网站浏览、MCP 工具或 README 使用。对于开发者,该项目提供了从代码审查到完整审计的自动化能力,并可与 UX Patterns for Devs 配合,先选择合适的 UI 模式再验证实现质量。
打开原文相关 2.1 · 机会 3
media1.2 KB media1.2 KB media264 B media229 B media221 B media216 B media421.9 KB media1.1 KB media3.6 KB media55.7 KB

中文

Backers on Open Collective Support via Open Collective

Front-End Checklist 是一个面向人类和 AI 代理的开源前端质量体系。它将前端最佳实践转化为可实际操作的审查工作流——你可以在网站上浏览,借助兼容 MCP 的工具运行,或直接在本 README 中逐步完成。

配套项目:面向开发者的 UX Patterns 帮助开发者在选择合适的 UI 模式后,再使用 Front-End Checklist 验证实现质量。

重要

使用网站进行浏览和筛选,使用 MCP 服务器进行代理工作流,当需要在一个地方查阅全部清单时使用本 README。

  • 385 条英文规则,覆盖 11 个活跃类别
  • 托管服务器公开 11 个 MCP 工具
  • 规则页面包含解释、修复指南及验证步骤

如何使用这个清单

  1. 从下方的类别导航开始,直接跳转到你需要的清单部分。
  2. 逐一完成适用于你的项目、审计或 Pull Request 的复选框项。
  3. 当需要完整指南、示例、验证步骤和 AI 提示时,打开链接的规则页面。
  4. 使用 frontendchecklist.io 进行交互式浏览,使用 mcp.frontendchecklist.io 让代理直接使用同一规则库。
  • Critical 表示网站损坏、合规敏感或安全敏感的问题,应优先修复。
  • High 表示对用户体验、无障碍、性能或可发现性有重大影响的问题。
  • Medium 表示应作为正常前端质量审查一部分的强最佳实践。
  • Low 表示视情况而定、紧急程度较低的有用改进。

首先选择合适的模式

Front-End Checklist 帮助你审查实现质量。如果你仍在确定要构建什么界面,请使用 面向开发者的 UX Patterns 来比较常见的 UI 模式、理解权衡,并获取关于表单、导航、数据展示、反馈状态、认证和 AI 界面的实用指导。

为清单做贡献

  • 安装依赖:pnpm install
  • 运行本地开发:pnpm dev
  • 校验结构:pnpm validate:rule-structure
  • 为语料库评分:pnpm score:rules
  • 重新生成派生文件:pnpm generate:skills 和 pnpm generate:readme

将支持 MCP 的代理接入 Front-End Checklist,可用于 React、Next.js、HTML、CSS、JavaScript、无障碍、性能、SEO、安全、图片、隐私、i18n 和测试等场景下的前端代码审查、结构化规则查询、审计和修复工作流。

提示

最佳入门用法:让支持 MCP 的代理指向一个真实的组件、页面或公开 URL,并明确要求其使用 Front-End Checklist MCP,优先输出置信度最高的前端发现。某些客户端会延迟发现已安装的 MCP 工具,因此在提示中明确服务器名称会有所帮助。

你可以做到:

  • 对照清单审查粘贴的代码或文件内容
  • 审计一个在线的公开 URL
  • 获取一条包含修复指南的具体规则
  • 按关键字、类别或优先级搜索规则
  • 获取针对特定审计的工作流或快速参考

代理使用指导:

  • 对粘贴的 HTML、CSS、JavaScript、React 或 Next.js 代码,优先使用 review_code
  • 在提出前端无障碍、性能、SEO、安全或图片建议之前,使用 search_rules
  • 针对上线前、无障碍、SEO、安全及性能审计,使用 get_workflow 或 get_checklist_rules
  • 对公开的 https:// 页面使用 audit_url

示例提示:

  • 使用 Front-End Checklist MCP 审查此 React 组件,先报告置信度最高的发现。
  • 使用 Front-End Checklist MCP 审计 https://example.com 的无障碍、性能和 SEO 问题。
  • 使用 Front-End Checklist MCP 解释规范网址规则,并给出带代码示例的修复建议。

安装 Front-End Checklist 技能,以在支持该功能的工具中获得可复用的审计工作流或针对特定规则的专项指导。

安装:

npx skills add frontendchecklist/skills
npx skills add frontendchecklist/skills --skill https

有用的入口:

示例用途:

  • 对照完整的 Front-End Checklist 语料库运行一次广泛的前端审计
  • 使用像 https 这样的聚焦技能对某一关注点进行安全审查
  • 使用特定规则的技能解释规则重要性及修复方法

25 条规则。语义化标记、元数据、表单和文档结构规则。

在 frontendchecklist.io 上浏览 HTML

English / 原文

Backers on Open Collective Support via Open Collective

Front-End Checklist is the open-source front-end quality system for humans and AI agents. It turns front-end best practices into a practical review workflow you can browse on the web, run through with MCP-compatible tools, or work through directly in this README.

Companion project: UX Patterns for Devs helps developers choose the right UI pattern before using Front-End Checklist to verify implementation quality.

Important

Use the website for browsing and filtering, the MCP server for agent workflows, and this README when you want the checklist in one place.

  • 385 English rules across 11 active categories
  • 11 MCP tools exposed by the hosted server
  • Rule pages with explanations, remediation guidance, and verification steps

How to use this checklist

  1. Start with the category navigator below and jump straight to the part of the checklist you need.
  2. Work through the checkbox items that apply to your project, audit, or pull request.
  3. Open the linked rule pages when you need the full guidance, examples, verification steps, and AI prompts.
  4. Use frontendchecklist.io for interactive browsing, and mcp.frontendchecklist.io when you want agents to use the same rule corpus directly.
  • Critical means site-breaking, compliance-sensitive, or security-sensitive issues that should be fixed first.
  • High means issues with major impact on user experience, accessibility, performance, or discoverability.
  • Medium means strong best practices that should be part of normal frontend quality review.
  • Low means useful improvements that are situational or lower urgency.

Choose the right pattern first

Front-End Checklist helps you review implementation quality. If you are still deciding what interface to build, use UX Patterns for Devs to compare common UI patterns, understand tradeoffs, and find practical guidance for forms, navigation, data display, feedback states, authentication, and AI interfaces.

Contribute to the checklist

  • Install dependencies: pnpm install
  • Run local development: pnpm dev
  • Validate structure: pnpm validate:rule-structure
  • Score the corpus: pnpm score:rules
  • Regenerate derived artifacts: pnpm generate:skills and pnpm generate:readme

Connect an MCP-capable agent to Front-End Checklist for frontend code review, structured rule lookup, audits, and remediation workflows across React, Next.js, HTML, CSS, JavaScript, accessibility, performance, SEO, security, images, privacy, i18n, and testing.

Tip

Best first use: point an MCP-capable agent at a real component, page, or public URL and explicitly ask it to use the Front-End Checklist MCP for the highest-confidence frontend findings first. Some clients discover installed MCP tools lazily, so naming the server in the prompt helps.

What you can do:

  • Review pasted code or file contents against the checklist
  • Audit a live public URL
  • Fetch a specific rule with remediation guidance
  • Search rules by keyword, category, or priority
  • Get a workflow or quick reference for a focused audit

Agent usage guidance:

  • Use review_code first for pasted HTML, CSS, JavaScript, React, or Next.js code
  • Use search_rules before making frontend accessibility, performance, SEO, security, or image recommendations
  • Use get_workflow or get_checklist_rules for launch, accessibility, SEO, security, and performance audits
  • Use audit_url for public https:// pages

Example prompts:

  • Use the Front-End Checklist MCP to review this React component and report the highest-confidence findings first.
  • Use the Front-End Checklist MCP to audit https://example.com for accessibility, performance, and SEO issues.
  • Use the Front-End Checklist MCP to explain the canonical URL rule and suggest a fix with code examples.

Install Front-End Checklist skills when you want reusable audit workflows or focused rule-specific guidance in tools that support them.

Install:

npx skills add frontendchecklist/skills
npx skills add frontendchecklist/skills --skill https

Useful entry points:

Example uses:

  • Run a broad frontend audit against the full Front-End Checklist corpus
  • Use a focused skill like https for security review on one concern
  • Use rule-specific skills to explain why a rule matters and how to fix it

25 rules. Semantic markup, metadata, forms, and document structure rules.

Browse HTML on frontendchecklist.io

Back to top

32 rules. Layout, typography, responsive design, and styling rules.

Browse CSS on frontendchecklist.io

Back to top

26 rules. Client-side behavior, async patterns, and runtime quality rules.

Browse JavaScript on frontendchecklist.io

Back to top

43 rules. Loading speed, rendering, optimization, and Core Web Vitals rules.

Browse Performance on frontendchecklist.io

Back to top

95 rules. Keyboard, screen reader, ARIA, and inclusive UX rules.

Browse Accessibility on frontendchecklist.io

Back to top

94 rules. Crawlability, metadata, structured data, and search visibility rules.

Browse SEO on frontendchecklist.io

Back to top

22 rules. Headers, transport, safe linking, and frontend security rules.

Browse Security on frontendchecklist.io

  • Adblock Element Hiding Low: Checks for HTML elements and CSS classes that would be hidden by common adblockers, causing layout breaks or missing functionality for users with ad blocking enabled.
  • Audit dependencies for known vulnerabilities High: Dependencies are regularly scanned for known security vulnerabilities using automated tooling, and critical findings are remediated before deployment.
  • Avoid mixed content on HTTPS pages High: An HTTPS page that loads resources over HTTP has mixed content — browsers block or warn about these requests, breaking functionality and undermining transport security.
  • Blocked Tracking Links Low: Links and resources pointing to known tracking or advertising domains may be blocked by adblockers, breaking navigation and functionality for a significant portion of users.
  • External Link Security Medium: Links that open in a new tab using target='_blank' must include rel='noopener noreferrer' to prevent the opened page from accessing the opener's window context.
  • Implement a content security policy High: A Content Security Policy is implemented to prevent XSS attacks and control resource loading.
  • Leaked Environment Variables Critical: Checks for exposed API keys, tokens, passwords, and other secrets embedded in HTML source, JavaScript bundles, or client-accessible files.
  • Link to your terms of service in the footer Medium: Websites offering services to users should publish Terms of Service and link to them from every page — this establishes the legal agreement governing use of the service.
  • Prevent stack trace exposure in production error responses High: Production error responses never include stack traces, internal file paths, framework internals, or other debugging detail that could aid an attacker (OWASP A09).
  • Protect public forms with CAPTCHA Medium: Public forms that accept user input without authentication must include bot protection to prevent spam, credential stuffing, and automated abuse.
  • Redirect HTTP to HTTPS Critical: All HTTP requests must be permanently redirected (301) to HTTPS to prevent users from accessing your site over an insecure connection.
  • Secure password input fields High: Password fields implement security best practices including proper autocomplete, show/hide toggle, and strength indicators.
  • Serve all pages over HTTPS Critical: Every page and resource on your site must be delivered over HTTPS to protect user data in transit and enable modern browser features.
  • Set a Permissions-Policy header Medium: The Permissions-Policy header lets servers restrict which browser features (camera, microphone, geolocation, etc.) can be used in a page or its embedded iframes.
  • Set a Referrer-Policy header Medium: The Referrer-Policy header controls how much referrer information is sent when navigating from your site to another, protecting user privacy and preventing leaking sensitive URL parameters.
  • Set an HSTS header High: The Strict-Transport-Security response header tells browsers to always use HTTPS for your domain, preventing protocol downgrade attacks and cookie hijacking.
  • Set an X-Frame-Options header High: The X-Frame-Options header controls whether your page can be embedded in an iframe, frame, or object — preventing clickjacking attacks.
  • Set Secure, HttpOnly, and SameSite flags on session cookies High: All session and authentication cookies are issued with the Secure, HttpOnly, and an appropriate SameSite flag to prevent interception, JavaScript exfiltration, and cross-site request forgery.
  • Set X-Content-Type-Options: nosniff High: The X-Content-Type-Options: nosniff header prevents browsers from MIME-sniffing a response away from the declared Content-Type, blocking a class of drive-by download and XSS attacks.
  • Store authentication tokens securely High: Sensitive authentication tokens are stored in httpOnly cookies rather than localStorage or sessionStorage to prevent theft via cross-site scripting attacks (OWASP A07).
  • Submit forms over HTTPS Critical: All HTML form actions must point to HTTPS URLs to ensure form data is encrypted in transit and cannot be intercepted by network attackers.
  • Use COOP, COEP, and CORP for cross-origin isolation when needed Medium: Sensitive or high-capability applications use COOP, COEP, and CORP deliberately, audit third-party embeds, and verify cross-origin isolation in the browser before relying on it.

Back to top

25 rules. Formats, responsive delivery, optimization, and media quality rules.

Browse Images on frontendchecklist.io

Back to top

13 rules. Unit, integration, E2E, monitoring, and quality assurance rules.

Browse Testing on frontendchecklist.io

Back to top

5 rules. Consent, tracking, retention, and user data rights rules.

Browse Privacy on frontendchecklist.io

Back to top

5 rules. Localization, RTL, language handling, and translation workflow rules.

Browse Internationalization on frontendchecklist.io

Back to top

Area Purpose
apps/web Public website, rule pages, checklists, and MCP HTTP entrypoints
packages/content Source MDX content for rules and checklists
packages/mcp MCP server and tool definitions
packages/rules Public rules package for external consumers
packages/design-system Shared UI primitives and custom components
packages/auth, packages/data-layer, packages/schemas, packages/types Shared auth, data, schema, and type infrastructure
  • pnpm dev - Run local development tasks
  • pnpm build - Build all apps and packages with Turborepo
  • pnpm lint - Run Biome linting
  • pnpm typecheck - Run TypeScript checks across the repo
  • pnpm test - Run the test suite
  • pnpm validate:rule-structure - Validate rule heading structure
  • pnpm score:rules - Score the rule corpus against the quality gate
  • pnpm generate:skills - Regenerate installable skills from the rules
  • pnpm generate:readme - Regenerate the root README checklist and the generated catalog copy

Most content work happens in packages/content/rules/en. A typical rule-editing flow is:

  1. Edit or add the relevant rule MDX files.
  2. Run pnpm score:rules.
  3. Run pnpm validate:rule-structure.
  4. Run pnpm validate:sources when source metadata changes.
  5. Run pnpm generate:skills.
  6. Run pnpm generate:readme if rule titles or descriptions changed.

See AGENTS.md, scripts/README.md, and docs/generated/rules-catalog.md for repo conventions, script docs, and the generated standalone catalog copy.

Thanks goes to these wonderful people (emoji key):