home / skills / jeremylongshore / claude-code-plugins-plus-skills / supabase-security-basics
/plugins/saas-packs/supabase-pack/skills/supabase-security-basics
This skill helps you secure Supabase keys and enforce least-privilege access while auditing configurations across environments.
npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill supabase-security-basicsReview the files below or copy the command above to add this skill to your agents.
---
name: supabase-security-basics
description: |
Execute apply Supabase security best practices for secrets and access control.
Use when securing API keys, implementing least privilege access,
or auditing Supabase security configuration.
Trigger with phrases like "supabase security", "supabase secrets",
"secure supabase", "supabase API key security".
allowed-tools: Read, Write, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---
# Supabase Security Basics
## Prerequisites
- Supabase SDK installed
- Understanding of environment variables
- Access to Supabase dashboard
See `{baseDir}/references/implementation.md` for detailed implementation guide.
## Output
- Secure API key storage
- Environment-specific access controls
- Audit logging enabled
## Error Handling
See `{baseDir}/references/errors.md` for comprehensive error handling.
## Examples
See `{baseDir}/references/examples.md` for detailed examples.
## Resources
- [Supabase Security Guide](https://supabase.com/docs/security)
- [Supabase API Scopes](https://supabase.com/docs/scopes)
This skill applies Supabase security best practices for secrets and access control to help harden projects quickly. It guides secure API key storage, environment-specific access rules, and enabling audit logging. Use it to enforce least-privilege and reduce exposure of production credentials.
The skill inspects Supabase configuration and deployment patterns to recommend and apply secure settings for API keys, service roles, and RLS policies. It verifies that secrets are stored in environment variables or a secrets manager, validates API scope usage, and suggests access-control changes. It also checks for audit logging and provides remediation steps and code snippets to implement fixes.
Can I use the service_role key in client applications?
No. The service_role key has elevated privileges and must never be exposed to clients. Use anon or scoped keys for client access and restrict service_role to server-side code only.
How do I rotate Supabase API keys safely?
Create a new key with the same required scope, update server-side deployments and secrets stores, verify operation, then revoke the old key. Automate rotation and include rollout checks to avoid downtime.