supabase-extract-anon-key

Extract Supabase anonymous API keys from client-side code and environment variables.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/marvinbiss/servicesartisans --skill supabase-extract-anon-key-marvinbiss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-extract-anon-key
Source: https://github.com/marvinbiss/servicesartisans/tree/main/.cursor/skills/supabase-extract-anon-key
Command: npx skills add https://github.com/marvinbiss/servicesartisans --skill supabase-extract-anon-key-marvinbiss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the extraction of the Supabase anonymous API key from client-side code, which is crucial for testing and verifying security configurations without exposing sensitive credentials.

Core Features & Use Cases

  • Automated Key Discovery: Scans client-side code and environment variables for Supabase anon keys.
  • Security Verification: Helps confirm that only the expected public key is exposed, not the more sensitive service_role key.
  • Use Case: After identifying a Supabase URL, use this skill to quickly retrieve the associated anon key for further security audits, such as testing Row Level Security (RLS) policies.

Quick Start

Extract the Supabase anon key from the application running at https://myapp.example.com.

Frequently Asked Questions about supabase-extract-anon-key

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract the Supabase anon key from client-side code?

To extract the Supabase anon key from client-side code, scan direct assignments, client initializations, and environment variable patterns like NEXT_PUBLIC_SUPABASE_ANON_KEY. This process identifies the public key needed for security audits and RLS testing.

What is the difference between the Supabase anon key and the service_role key?

The Supabase anon key is a public key safe for client-side exposure, whereas the service_role key is sensitive and bypasses security policies. Extracting the anon key helps verify that only the public credential is exposed during security assessments.

How does Supabase anon key validation work?

Supabase anon key validation works by decoding the key's payload to confirm the 'anon' role and project reference. It also checks for expiration to ensure the key is active and correctly formatted before using it for RLS testing.

Can I find a Supabase API key in Next.js environment variables?

Yes, you can find a Supabase API key in Next.js environment variables by scanning common patterns like NEXT_PUBLIC_SUPABASE_ANON_KEY. This identifies keys exposed to the client-side for security verification and Row Level Security testing.

Why do I need the anon key for Supabase RLS testing?

You need the anon key for Supabase RLS testing to simulate client-side access and verify that Row Level Security policies correctly restrict data. Extracting the key confirms only the public credential is used, not the privileged service_role key.