SuperAPI AI Directory

gridproof

Renders a frontend with Playwright and audits spacing, gaps and element sizes against a design scale, returning fix hints. Tailwind-first.

Open website

About this tool

GridProof is a spacing and grid quality assurance (QA) tool for AI-generated interfaces, positioned as "automated spacing and grid auditing in the agent loop." Its core goal is to solve the problem that AI coding agents are good at generating interfaces but struggle to maintain grid consistency, such as using py-[13px] instead of py-3, three different gaps appearing between adjacent cards, and icon sizes being mixed between 17px and 24px. Such issues usually do not cause functional breakage, so they are easily shipped directly, because no step in the agent loop checks for them, and GridProof is exactly that checking step.

Main capabilities GridProof is provided as an MCP server, using Playwright to headlessly render the target page, with an in-page script traversing the DOM and collecting computed geometry information (margins, padding, gaps, bounding rectangles). The rule engine then compares each value against the configuration and outputs a violation report containing selectors, actual/expected values, and fix suggestions. It has four built-in rules, all reported as warnings (warn) by default, without blocking the process or producing exit code semantics, following the principle of "suggest, not forbid"; the only exception is tap targets, which are reported at the error level because they are an accessibility baseline rather than a style preference.

Usage Three usage paths are provided:

  1. gp_audit — used within the agent loop. The agent directly calls this MCP tool against the running development server, obtains structured JSON (violations + fix suggestions), and acts accordingly.
  2. gp_report — also an MCP tool, but it additionally writes an HTML report. The input is the same as gp_audit, and it writes a self-contained, shareable HTML file to disk.
  3. npx gridproof --report <url> — a one-off CLI command. It requires no MCP client and is suitable for quick manual checks or scripted use.

When registering in Claude Code, it can be done from a local checkout. An optional gridproof.config.json configuration file can be placed in the project root, and all fields are optional with default values. Inline suppression is also supported: use data-gp-ignore on any element (suppresses all rules) or data-gp-ignore="spacing-scale gap-consistency" (suppress the specified rule), the corresponding rule check for that element's subtree can be skipped; suppressed findings are still counted, but are not listed.

Tailwind and non-Tailwind pages GridProof is built for Tailwind projects, and all four rules apply, because the three rules spacing-scale, arbitrary-value, and gap-consistency rely on Tailwind's spacing scale and utility classes for inference. For pages not recognized as Tailwind, it automatically falls back to accessibility-only checks: canonical-size still runs (tap targets, icon sizes), the three Tailwind-specific rules are skipped, and the report clearly states this rather than silently under-reporting. This fallback mode can also be forced on via assumeTailwind: false in the configuration.

Use cases It is suitable for development workflows that use AI coding agents to generate or iterate on frontend interfaces, especially Tailwind projects. It is suitable as an automated check step in an agent loop, helping maintain consistency in spacing, gaps, and element sizes, while also covering accessibility requirements such as tap targets. It can also be used for quick manual checks or scripted audits.

Limitations and what it explicitly does not do GridProof explicitly does not perform computer vision or screenshot analysis: it reads computed geometry rather than pixels, and screenshots are only attached to the HTML report and are not analyzed. It does not provide a CI runner; it is an in-loop tool for agents, not a merge gate, has no exit code, and will not fail the build. It does not edit source code: the server only measures and suggests, and the agent that owns the codebase performs the edits. It has no authentication, no SaaS, and no billing; it is a local MCP server and CLI. The following features are not yet implemented (candidates for v2): column grid clustering, alignment drift across breakpoints, and Figma token import.

Technical implementation and calibration Playwright headlessly renders the target page, an in-page script traverses the DOM and collects computed geometry, and the rule engine checks each value against the configuration and outputs violations. The tool was tuned against about 60 real websites to reduce false positives; the subpixel rounding tolerance, allowlists, and default severity levels all come from this calibration process, not from guesswork.