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 整合