Agent skill
supabase
Query a Supabase/PostgreSQL database with safety guardrails.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/supabase-andersonsrepo-ai-harness
SKILL.md
Supabase Database — Safe Query Interface
SAFETY RULES (MANDATORY)
FORBIDDEN — Never execute these, regardless of user request:
DROP,DELETE,TRUNCATE,ALTER,GRANT,REVOKE, or any DDL statement- Any write operation on
auth.*tables UPDATEwithout aWHEREclause
ALLOWED:
SELECTon any table (always safe, read-only)INSERTon non-critical tables only (user must specify which are safe)UPDATEon non-critical tables only, with a WHERE clause
REQUIRED — Before any write operation:
- Show the exact SQL statement to the user
- Wait for explicit user confirmation ("yes", "go ahead", etc.)
- Only then execute
If the user asks you to run a forbidden operation, refuse and explain why.
Current Supabase status: !command supabase projects list 2>/dev/null | head -5 || echo "Supabase CLI not available; using MCP postgres tools"
Commands
tables — List all tables
Use the Supabase MCP postgres tools to query:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' ORDER BY table_name;
query <SQL> — Run a SELECT query
Validate the query is a SELECT statement before executing. Use MCP postgres tools.
users — User statistics
SELECT count(*) as total_users,
count(*) FILTER (WHERE created_at > now() - interval '7 days') as new_this_week,
count(*) FILTER (WHERE created_at > now() - interval '30 days') as new_this_month
FROM users;
analytics — Usage analytics
SELECT date_trunc('day', created_at) as day, count(*) as events
FROM activity_log
WHERE created_at > now() - interval '7 days'
GROUP BY 1 ORDER BY 1;
Notes
- This is a production database — treat with extreme caution
- The MCP supabase server connects via
$SUPABASE_DB_URL(wrapper script, no plaintext passwords in config) - Future: a read-only Postgres role provides defense-in-depth
context: forkensures queries run in an isolated subagent
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?