Plumber acts as your own design engineer. It finds where your frontend drifts away from your actual system and writes the fix into your JSX.
npm install -D @unlocalhosted/react-plumberIt checks what design engineers look for.
Plumber checks your running app for details that experienced designers catch and that are easy to miss. It marks them on the page and, where it can, writes the fix. Nine of the 77:
- Interaction feel 16
- Typography 15
- Colour and light 15
- Layout and platform 13
- Alignment and balance 6
- Spacing and rhythm 6
- Rendering and pixels 6
Plumber checks the UI your agent writes.
Agents make up values and miss the details: a grey shadow on a coloured card, an icon centred by its box. Plumber catches both and says what to change, so the agent can fix them before you review its work.
- Code, after every editA hook in Claude Code or Cursor runs
plumber check:plumber install --hooks. - The running page
plumber craftreads the running page the way the overlay does. - New problems only
plumber initrecords the problems you already have as debt.
You ask the agent to add an invite row and a welcome video to the Members card.
Edit on the page.
Save to your source.
Retype a heading or try a spacing token on your running app. Plumber writes the exact words or class into the exact line of JSX that made it. You don’t have to write a prompt or find the file.
Written to App.jsx: Members → Your team · gap-[10px] → gap-related. Recorded on an earlier version of the overlay.
- Double-clickEdit wordsType over them. Enter writes the string in your source.
- AltBTry spacing liveUse ↑ and ↓ to preview your theme’s tokens on every place it occurs.
- EnterWrite the fixYour file is checked first. The change hot-reloads, with Undo.
A 2px change shouldn’t cost a prompt.
Ask an agent and it goes the long way: through your files, your theme, an edit, and back to you to check. On the page it takes a few keys and no model.
by prompt, a typical loopon the page, no model
Two ways to tighten the Members rows. By prompt, the agent searches for the file, reads it, reads your theme, edits, waits for you, reads and edits again, and waits for you to check. On the page, a few keys: Alt B, an arrow to try the step, Enter to apply. Both end with the same rows on your theme’s related step.
Set up in three commands
Or let your agent do it. One prompt for Claude Code, Cursor or Codex. It finds the right folder, sets up the overlay, goes through the config file with you, checks each step and tells you what it found.
Read the prompt first
Set up React Plumber in this project, all the way to its overlay showing on my running page. Check each step before the next one, and tell me about anything that doesn't match. BEFORE YOU START - Find the app to set up. In a monorepo that is the package with the Vite or Next.js config and its own package.json, not the repository root. Run every command from that folder, with this project's package manager (pnpm exec, yarn or bunx in place of npx). - Check it can run here: Node 22.18 or newer, Vite or Next.js, and Tailwind v4 or plain CSS. If one is missing, stop and tell me. With Tailwind v3, CSS Modules or CSS-in-JS it still sets up, but not everything is judged; "npx plumber doctor" says what is supported. - Find where the source lies: the folder with the JSX, the CSS file the app loads first, and where the design tokens are (@theme, :root or a theme file). You will check what init wrote against these. SET UP 1. npm install -D @unlocalhosted/react-plumber 2. npx plumber init --yes It takes every suggested rule, writes plumber.config.ts and records today's problems as the baseline. Read the config it wrote. The token sources must be the files you found. Don't add "source" unless it read the wrong code. 3. npx plumber install --overlay --write It wires the overlay into Vite or Next.js and prints the diff. Read the diff. - Vite: plumb() is in plugins before react(), and react() is still there. - Next.js: the config is wrapped in withPlumb, <PlumbOverlay /> is inside <body> in the root layout, and the route file keeps its .plumb.ts name. 4. npx plumber install It writes React Plumber's instructions for you and, in Claude Code or Cursor, a hook that checks each of your edits. 5. npx plumber doctor It lists what is set up, with one command for each thing that isn't. Go through every line it flags. Ask me before "plumber fix <id>" changes a file. THE CONFIG FILE init wrote plumber.config.ts in the folder you set up, with every suggested answer. Now go through it with me. For each part, say what you found in my code and what you would set, and wait for my answer before you change a rule. - css: the CSS file the app loads first, the one with the tokens. Correct it if init picked another. - The rules for spacing, colour, type and corners: show me each one beside the values my code really uses. "npx plumber propose" drafts a scale from those values. Ask me which are right. To answer again, "npx plumber init --force" with "--family <name>=<answer>" replaces the config and prints the diff first; "npx plumber init --help" lists the answers. - classHelpers: if my code builds class names with its own function (anything other than cn, clsx, cx, classNames, twMerge, twJoin, cva or tv), add that function's name, or the classes inside it are not read. - markers: if my code has class names that style nothing on purpose (hooks for scripts or tests, like js-*), list their patterns, or they are reported as dead classes. - source: leave it out. Without it all of my own code is read, my workspace packages included. Add it only if the wrong code was read. - craft: the standard the craft checks read their numbers from. "npx plumber spec" prints the one in effect. Ask me whether the preset should be strict, balanced or relaxed. Turn a rule off only when I say so, and put my reason in a comment beside it. - craft.tokens: whether a fix may add a new token, and to which file. Ask me. After each change run "npx plumber check". A config that doesn't load exits with code 2 and says why. SEE IT ON THE PAGE 6. Start the dev server the way this project does. A small bar should sit in a corner of the page. If you can open a browser, load the page and look for it. If you can't, give me the URL and ask me to hold Alt over something. 7. If the bar is missing, or says setup isn't finished, read what it says and fix that. - "Source stamping isn't running": plumb() is not before the plugin that compiles JSX, or the page's HTML was made outside the dev server. - "Turn on React Fast Refresh": the Vite config has no React plugin. - The dev server stops and names a line to move: move it. FINISH 8. Run "npx plumber check --agent". Then tell me which folder you set up, the rules init chose, the files that changed, whether you saw the overlay, and what the check found. Never change the config, the ledger or the theme to make a check pass. Leave the problems it finds for me to choose.
npm install -D @unlocalhosted/react-plumbernpx plumber initnpx plumber install --overlay --write
Run your dev server.
Hold Alt.
Working with an agent? npx plumber install --hooks checks each edit in Claude Code or Cursor.
Vite and Next.js · Tailwind v4 or plain CSS · Node 22.18+