Next.js + Expo + Supabase starter with a Claude Code harness

Quality is a deterministic gate, not a request.
A Next.js + Expo (React Native) monorepo starter on Supabase with a Claude Code harness:
hooks that send the agent back to work while a quality gate fails. Guard hooks check
commands and file writes before they run, CI re-runs the gates, and update brings later
releases into an existing project.
For teams shipping a web app and a mobile app on one Supabase backend with Claude Code. Not a
fit today for a web-only app. The .claude/ hooks run only under Claude Code; another agent
meets the checks at the commit and in the pull request.
Documentation ·
FAQ · Changelog
npx --yes next-expo-supabase-agent-harness@latest init

No model runs in the recording: the hooks and gates are programs, and what they print is
what the agent sees. It is rendered from
docs/media/harness-demo.tape, whose commands a test
replays on every pull request.
Status: stable (2.0.x). CI proves the scaffold on Linux, and on macOS without
the database gates. The installer's unit tests run on Linux, Windows and macOS.
pnpm validate has never run in CI on Windows. See Limitations.
What it stops
| Complaint about coding agents | What answers it here |
|---|
| The agent says the tests pass when they do not. | When it tries to stop, the Stop hook runs the gates and tests itself and sends it back while any is red, up to Claude Code's block cap. |
| It weakens, skips or deletes tests. | test-quality (no .only, unreviewed .skip or test without assertions), diff-coverage (each changed source file needs a test) and a CI mutation-testing job (a new surviving mutant fails). |
It adds eslint-disable or @ts-ignore. | suppressions: @ts-ignore, @ts-nocheck and a rule-less eslint-disable fail; any other directive needs a reason and a reviewed allowlist entry. |
| It edits the check instead of the code. | Write protection on gate scripts and hooks, gate-integrity hashes, and a frozen CI gate list that a project cannot quietly shrink. |
It runs rm -rf, git reset --hard, a force-push or --no-verify. | The bash guard denies these, .env reads and destructive SQL outside migrations before they run: a tripwire on command text, not a sandbox. |
| It puts the service-role key in client code or a commit. | The write guard refuses it in web and package code; the secrets gate scans every tracked file. |
It ignores CLAUDE.md. | CLAUDE.md is context; hooks, gates and CI enforce the same rules either way. |
| It gets row-level security wrong. | schema-rls and tenancy (forced RLS, tenant-scoped policies, exact grants), then pgTAP and supabase-js isolation suites against the local Postgres before a turn ends. |
| The project is stuck on the template version it began with. | update: it replaces untouched harness files, leaves the new version of each edited one for you to merge, and --rollback undoes it. |
Quick start
You need Node 22 or newer, pnpm 11 (corepack enable picks up the
pinned version), Docker for the local Supabase stack, and Claude Code. If corepack is not on
your PATH (Node.js 25 and later no longer bundle it), run npm install -g corepack first. In
an empty folder:
npx --yes next-expo-supabase-agent-harness@latest init
init asks for the project's details, each with a default, and writes the scaffold into
the folder. Then: