Claude Code

Claude Code plugin

Ask Claude Code “does this app leak user data?” and get a straight answer. The PatchLabs plugin adds a skill that runs the free PatchLabs checks, explains each finding in plain English, writes the fix as a new migration once you approve it, and re-scans to confirm.

Install

In Claude Code, run these two commands:

Claude Code
/plugin marketplace add manra399/patchlabs-claude-plugin
/plugin install patchlabs@patchlabs

Then, in a repo with a supabase/migrations folder, ask:

Prompt
Does this app leak user data?

For a public repo you don’t have checked out, name it: “Run a PatchLabs RLS check on owner/name”. For a live site: “Check the security headers of https://app.example.com”.

What you see

This is the reply from a test run on our demo app (manra399/patchlabs-demo-app), shortened:

critical · PL-001 · profiles  (…_init.sql:12)
Anyone with your public anon key can read every
row of profiles, including email and phone.
More: patchlabs.dev/findings/pl-001
 
medium · PL-004 · profiles  (…_init.sql:13)
The UPDATE policy has no WITH CHECK, so a user can
change their row into anything.
 
Should I write a migration to fix both?

If you say yes, Claude writes supabase/migrations/<timestamp>_patchlabs_fix.sql, shows what each statement changes for your users, and lists app code that may need updating. You apply it with supabase db push or the SQL editor. Then it runs the scan again and tells you which findings are gone.

How it scans

You haveThe skill runsWhat leaves your machine
The repo open in Claude Code (private or public)The free, open-source patchlabs-cli: SQL policies, keys in client code, Claude Code settings secrets, edge functions, webhooks, Firebase rules, dependenciesPackage names and versions, sent to OSV for the dependency check. Nothing else.
A public GitHub repo nameThe rls_check tool of the PatchLabs MCP serverThe repo name
A live URLheaders_check: one load of the home pageThe URL

The CLI is pure Python 3.9+ with no dependencies. The skill runs it with whatever is installed (patchlabs, uvx, pipx, or a shallow clone) and installs nothing globally. The plugin connects to https://api.patchlabs.dev/mcp/public, which needs no key.

Rules the skill follows

  • It never runs SQL against your database. Fixes are a new migration file, shown to you first, and applied by you.
  • It says how sure it is. A scan reads your files, so it reports what the migrations say, not what your live database does. Changes made in the Supabase dashboard are invisible to it.
  • It asks before fixing a table that may be public on purpose, such as blog posts or a product catalogue.
  • For a leaked key, rotation comes first. Removing a key from the code doesn’t revoke it; it stays in git history.
  • Your apps only. It doesn’t scan other people’s apps.

Use the skill elsewhere

The skill is a plain Agent Skill folder, plugins/patchlabs/skills/patchlabs-leak-check in the plugin repo. Copy it into ~/.claude/skills/, upload it as a zip in claude.ai under Settings → Capabilities → Skills, or put it wherever your agent loads skills from. Without the plugin’s MCP server it still runs the local scan.

Good to know

A clean scan is not proof. Static checks find the common mistakes in your files. To see what a stranger, a signed-in user and an owner can actually read, and get a fix tested in a rebuilt copy of your database, ask Claude for the full PatchLabs check. It needs you to commit one file to prove you own the repo, and your first app is free.

Updated 10 Nov 2026Something unclear or wrong? Tell the founder