Facet

io.github.chndr-prksh由 GitHub 账号 chndr-prksh 发布v0.1.0更新于 Oct 24, 2026

Check web pages for responsive design problems and screenshot them on phone, tablet and desktop.

发布方自己的服务:Facet UCP Shopping

概览

AI 生成的概览

Facet 检查网页的响应式设计问题,并在模拟的手机、平板和桌面设备上截图。

可以做什么
在多种模拟设备上检查一个网址,按设备返回错误和警告,并给出选择器和修复建议,涵盖横向滚动、点击目标过小、文字过小、表单聚焦缩放、viewport meta、图片和固定页头问题,以及控制台错误和失败请求。按设备保存带标注的截图,可选视口或整页。在每台设备上测量单个元素的尺寸、可见性、字号、display、flex 和 grid。在单台设备上运行 axe-core 无障碍审计并列出 WCAG 违规及修复建议。列出设备目录和预设。
适用场景
适合助手修改 CSS 或布局后,需要在真实常见屏幕尺寸上验证效果时使用;也适合在发布前对本地开发服务器或公开页面做一次响应式和无障碍快速检查。
运行要求
通过 npm 包以 npx 在本地以 stdio 运行。需要 Node 20 或更高版本以及基于 Chromium 的浏览器,按顺序查找 FACET_CHROME、Playwright 的 Chromium、Google Chrome、Microsoft Edge。目标页面必须能从本机访问。
安装前请注意
它会在无头浏览器中加载给定网址,页面及其请求会到达其引用的主机。它只检查加载完成时的页面,登录后或点击后才出现的内容无法检查。仅使用 Chromium 模拟,无法发现 Safari 特有的问题。写入目录的截图可能包含敏感页面内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Facet,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

facet-check

Check a web page for responsive design problems on real phone, tablet and desktop viewports. It runs from the command line, in CI, or as an MCP server that AI coding agents (Claude Code, Cursor, Codex, VS Code) can call.

bash
npx @chandra14/facet-check localhost:3000

Or install it once with npm install -g @chandra14/facet-check, then run facet-check localhost:3000.

Output for a test page with a price table that is too wide for phones (shortened):

Facet check http://localhost:30006 devices · 14 errors · 14 warnings
✗ iPhone 16 393×852 @3x  error Page scrolls sideways by 267px — The document is 660px wide in a 393px viewport.  error Extends 267px past the viewport — <table.prices> “SizeWhole beanGroundSubscriptionWholesal”        html > body > main > table        fix: Constrain it with max-width: 100%, min-width: 0 on a flex child, overflow-wrap: anywhere, or let it scroll inside its own container.  error Tap target is 13 × 13px — <input#weekly>        #weekly        fix: Targets must be at least 24 × 24px (WCAG 2.5.8); 44 × 44px is comfortable.  warn  Field text is 14px, so iOS zooms in on focus — <input#email>        #email        fix: Give form controls font-size: 16px or larger.  console Carousel failed to initialise at 393px
! Full HD laptop at 125% (most common) 1536×864 @1.25x  warn  Text is only 10px — <p#terms> “Prices include tax. Orders placed after ”

Each device is a real emulation in headless Chromium, not a resized window. It uses the device's viewport, pixel ratio, touch support, mobile viewport behaviour and user agent. A page with no viewport meta tag lays out at 980px on a phone, as it would on the real device.

It is the command-line and agent side of Facet, an open-source browser for responsive web development. Facet's device catalogue has 290+ profiles, from the iPhone SE to 2026 flagships, foldables, tablets, laptops and 4K monitors.

What it finds

On every device:

  • Horizontal scrolling, and the element that causes it (the table, not each of its cells)
  • Tap targets smaller than 24 × 24px on touch devices (WCAG 2.5.8)
  • Text smaller than 12px, and text that is cut off without an ellipsis
  • Form fields under 16px, which make iOS zoom in when focused
  • Viewport meta problems: missing, not device-width, or zoom disabled
  • Images that are far larger than needed, blurry on high-density screens, or missing dimensions
  • Fixed headers and banners that cover too much of a small screen
  • Console errors, uncaught exceptions and failed requests, per device. An error that only one device logs is a viewport-specific bug.

Command line

bash
npx @chandra14/facet-check <url> [options]
Option
-d, --devices <list>Device ids, names, sizes like 1024x768, or a preset (default: popular)
-s, --screenshots <dir>Save a PNG of each device
--full-pageCapture the whole page, not only the first screen
--jsonPrint the full report as JSON
--allAlso list info-level notes
--fail-on <level>Exit 1 when a finding is at least error (default), warn or info; never always exits 0
--timeout <ms>Page load timeout (default 30000)
--list-devices [query]Show presets and the device catalogue

The URL can be a full URL, a bare host (example.com), a local dev server (localhost:3000, :5173) or a path to an HTML file.

Presets: popular (the six most common real-world sizes), default (phone, tablet, laptop), phones, latest, tablets, desktops, apple, foldables, extremes.

bash
npx @chandra14/facet-check localhost:3000 -d phones --screenshots shotsnpx @chandra14/facet-check https://example.com -d iphone-17,"Galaxy S26",ipad,1440x900 --json

In CI

The exit code is 1 when errors are found, so it can gate a pull request:

yaml
- run: npx @chandra14/facet-check http://localhost:4173 --fail-on error

MCP server for AI agents

facet-check mcp runs a Model Context Protocol server over stdio. An agent can then check its own CSS changes on many screen sizes and look at the result.

Claude Code

bash
claude mcp add facet -- npx -y @chandra14/facet-check mcp

Cursor, VS Code, Claude Desktop and other clients

json
{  "mcpServers": {    "facet": { "command": "npx", "args": ["-y", "@chandra14/facet-check", "mcp"] }  }}
ToolWhat it does
check_responsiveLoads a URL on several devices and returns the problems on each, with selectors and fixes
screenshotReturns one labelled image per device (viewport or full page)
compare_elementMeasures one element on every device: size, visibility, font size, display, flex and grid
audit_accessibilityRuns axe-core on one device and returns WCAG violations with fixes
list_devicesLists the device catalogue and presets

Then ask, for example: "Check localhost:3000 on phones and fix anything that scrolls sideways."

Requirements

Node 20 or later and a Chromium-based browser. facet-check uses, in order: the browser at FACET_CHROME, Playwright's Chromium (npx playwright install chromium), Google Chrome, then Microsoft Edge. Most machines already have one of these.

Limits

  • Chromium only. An iPhone profile emulates the iPhone's screen, not Safari's WebKit engine. Safari-specific bugs still need Safari.
  • It checks the page as it is after load. Content behind a login or a click is out of reach from the command line.

License

MIT

来源:cli/README.md,提交 815822c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 14, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Facet 集成