Skip to content
Back to skills

Supabase Known Pitfalls

ASecurity

Execute identify and avoid Supabase anti-patterns and common integration mistakes. Use when reviewing Supabase code for issues, onboarding new developers, or auditing existing Supabase integrations for best practices violations. Trigger with phrases like "supabase mistakes", "supabase anti-patterns", "supabase pitfalls", "supabase what not to do", "supabase code review".

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
code-qualitygofrontendsecurityperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add micsapp/micstec-skills --skill supabase-known-pitfalls --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Supabase Known Pitfalls?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Supabase Known Pitfalls
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/micsapp-supabase-known-pitfalls/badge)](https://www.skillsdirectory.com/skills/micsapp-supabase-known-pitfalls)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: supabase-known-pitfalls
description: |
  Execute identify and avoid Supabase anti-patterns and common integration mistakes.
  Use when reviewing Supabase code for issues, onboarding new developers,
  or auditing existing Supabase integrations for best practices violations.
  Trigger with phrases like "supabase mistakes", "supabase anti-patterns",
  "supabase pitfalls", "supabase what not to do", "supabase code review".
allowed-tools: Read, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
compatible-with: claude-code, codex, openclaw
---
# Supabase Known Pitfalls

## Prerequisites
- Access to Supabase codebase for review
- Understanding of async/await patterns
- Knowledge of security best practices
- Familiarity with rate limiting concepts

## Instructions

Supabase anti-patterns typically cluster into three risk categories: security risks (exposing service role keys, missing RLS policies, over-privileged anon access), performance risks (N+1 queries, missing indexes, fetching more columns than needed), and reliability risks (no retry logic, synchronous auth checks in every request, missing error handling). Addressing security issues first prevents data exposure, while performance fixes have the greatest impact on user experience.

### Step 1: Review for Anti-Patterns
Scan the codebase for each pitfall pattern listed in the references. Use grep or a code search tool to find all locations where Supabase client calls are made. Look specifically for service role key usage in client-side code, missing `.select()` column lists that fetch entire rows, and `await` chains that make multiple sequential queries where a single join would suffice.

### Step 2: Prioritize Fixes
Address security issues first: any client-side exposure of the service role key or missing RLS policies on tables containing user data are critical. Then tackle performance issues that affect P95 latency. Finally, address reliability gaps like missing error handling.

### Step 3: Implement Better Approach
Replace anti-patterns with recommended patterns. Document the change in a PR description so reviewers understand why the old approach was problematic.

### Step 4: Add Prevention
Set up linting and CI checks to prevent recurrence. Add ESLint rules that flag service key usage in frontend bundles and require `.select()` calls to specify columns explicitly.

## Output
- Anti-patterns identified with severity classification
- Security, performance, and reliability fixes implemented
- ESLint and CI prevention measures active
- Code quality measurably improved with documented rationale

## Error Handling

See `${CLAUDE_SKILL_DIR}/references/errors.md` for comprehensive error handling.

## Examples

See `${CLAUDE_SKILL_DIR}/references/examples.md` for detailed examples.

## Resources
- [Supabase Security Guide](https://supabase.com/docs/security)
- [Supabase Best Practices](https://supabase.com/docs/best-practices)

## Overview

Execute identify and avoid Supabase anti-patterns and common integration mistakes.

Files in this skill

  • SKILL.md3 KB
  • references/errors.md320 B
  • references/examples.md208 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.