LightState Registry / Portable Agent Skill (SKILL.md)s / Security & Infra / skill-supabase-rls-audit
⚡ Pulse Score 87/100
Supabase Postgres Row-Level Security (RLS) Audit Playbook
Audit every table in a Supabase `public` schema for missing RLS policies, insecure `USING (true)` clauses, unindexed foreign keys, and leaked `service_role
⚡ 1-Click Agent & Developer Install
Zero Auth · Ready for Grok Bot, Claude Code & Cursornpx lightstate install skill-supabase-rls-audit
Copy-Paste System Prompt / Routine Blueprint:
Load the Supabase Postgres Row-Level Security (RLS) Audit Playbook (skill-supabase-rls-audit) playbook. First inspect our current configuration and codebase for Supabase, PostgreSQL, Row-Level Security, SQL Audit. Then propose a concrete, step-by-step implementation plan following the skill-supabase-rls-audit guardrails, run the non-destructive verification commands (npx supabase db lint), and summarize any findings, risks, or required environment variables before making production changes.
📘 Complete SKILL.md Playbook Specification
--- name: supabase-rls-audit description: Audit every table in a Supabase `public` schema for missing RLS policies, insecure `USING (true)` clauses, unindexed foreign keys, and leaked `service_role` keys. Use when working with Supabase, PostgreSQL, Row-Level Security, SQL Audit. triggers: - supabase rls audit - supabase - postgresql --- # Supabase Postgres Row-Level Security (RLS) Audit Playbook ## 1. When to Use This Skill Load `skill-supabase-rls-audit` whenever an engineering or operations task involves **Supabase, PostgreSQL, Row-Level Security, SQL Audit**. Specifically: - Audit every table in a Supabase `public` schema for missing RLS policies, insecure `USING (true)` clauses, unindexed foreign keys, and leaked `service_role` keys. - Designing, reviewing, or debugging production configurations without guesswork or deprecated flags. - Running deterministic pre-flight and post-execution verification checks before reporting completion. ## 2. Prerequisites & Required Environment - **Target Stack:** Supabase, PostgreSQL, Row-Level Security, SQL Audit - **Permissions:** Read-only inspection by default; ask for explicit confirmation before executing destructive mutations or production deployments. - **Reference Repository:** `https://github.com/supabase-community/supabase-mcp` ## 3. Step-by-Step Execution Playbook 1. **Context & Configuration Discovery:** Inspect existing project manifests (`package.json`, `wrangler.jsonc`, schema files, or environment declarations) before proposing changes. Never overwrite existing bindings or credentials blindly. 2. **Deterministic Implementation:** Apply the canonical patterns for **Supabase**: - Enforce strict schema/type validation at every external boundary. - Include explicit error handling, structured logging, and idempotency keys on all mutating calls. - Keep secrets in environment variables or secret stores—never hardcode tokens in source files. 3. **Verification & Regression Gate:** Run the verification commands below and inspect both exit codes and output payloads before marking the task complete. ## 4. Reference Commands & CLI Workflow ```bash npx supabase db lint npx supabase inspect db table-stats ``` ## 5. Edge Cases & Anti-Hallucination Guardrails - **Zero Unverified Claims:** Never claim a deployment, migration, or API call succeeded without inspecting the command output or HTTP status code. - **Rollback Readiness:** Always record the previous state or migration version so changes can be reverted cleanly if downstream health checks fail.
Synthesized Engineering Blueprint & Setup Guide
### Overview & Capability Scope
**Supabase Postgres Row-Level Security (RLS) Audit Playbook** (`skill-supabase-rls-audit`) is a verified, portable `SKILL.md` playbook curated with **@supabase** for Grok Bot (`x.ai/bot/`), Claude Code (`~/.claude/skills/`), and Cursor (`.cursor/skills/`).
Audit every table in a Supabase `public` schema for missing RLS policies, insecure `USING (true)` clauses, unindexed foreign keys, and leaked `service_role` keys.
### Required Stack & Tooling
- **Primary Stack:** Supabase, PostgreSQL, Row-Level Security, SQL Audit
- **Category:** `security-ops`
- **Source & Reference:** [https://github.com/supabase-community/supabase-mcp](https://github.com/supabase-community/supabase-mcp)
### Quickstart Installation
Install this `SKILL.md` playbook directly into your agent workspace:
```bash
npx lightstate install skill-supabase-rls-audit
```
Or copy the complete `SKILL.md` specification below into `.cursor/skills/skill-supabase-rls-audit/SKILL.md` or `~/.claude/skills/skill-supabase-rls-audit/SKILL.md`.
### Verification Commands
```bash
npx supabase db lint
npx supabase inspect db table-stats
```
Tags: #supabase#postgresql#row-level-security#sql-audit#skill-md#security-ops
✓ CERTIFIED X BUILDER PORTFOLIO
More Capabilities Curated from @supabase
Related Verified Capabilities
Explore Security & Infra → Agent Skill
⚡ 94
Agent Skill
⚡ 93
Wrangler CLI Deployment & Resource Management Playbook
Agent Skill
⚡ 92
Cloudflare D1 SQLite Schema & Zero-Downtime Migrations Skill
Agent Skill
⚡ 91
Cloudflare R2 Object Storage & Presigned URL Pipeline Skill
Agent Skill
⚡ 90
Cloudflare Durable Objects Stateful Coordination Playbook
Agent Skill
⚡ 89