skills/ship-faster/skills/mcp-supabase/SKILL.md
Execute database operations via Supabase MCP (query/write/migration/logs/type generation). Triggers: query/statistics/export/insert/update/delete/fix/backfill/migrate/logs/alerts/type generation. Does not trigger for: pure architecture discussion or code planning. Write operations require confirmation; UPDATE/DELETE without WHERE is refused.
npx skillsauth add enuno/claude-command-and-control mcp-supabaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interact with Supabase database via MCP tools, execute queries, writes, migrations, and diagnostics.
Applies to:
Does not apply to:
workflow-ship-faster (Step 6: Supabase integration) for project-side setup; this skill only handles DB-side actions and gatesCalled by:
workflow-ship-faster uses this skill as DB operation foundation; workflow-ship-faster handles project-side integration, this skill handles DB-side actions and security gatesShip Faster vendors Supabase's Postgres best practices inside the supabase skill (install supabase alongside this skill if you want these references available locally):
supabase/references/postgres-best-practices/AGENTS.mdsupabase/references/postgres-best-practices/rules/*.mdConsult it when:
When proposing changes, cite the relevant rule file path (for example: supabase/references/postgres-best-practices/rules/query-missing-indexes.md) and keep changes minimal.
When integrating database operations into multi-step workflows, persist all context and artifacts to disk, passing only paths between agents/sub-agents.
Recommended directory structure (within project): runs/<workflow>/active/<run_id>/
01-input/goal.md (requirements), 01-input/context.json (known tables/fields/IDs)03-plans/sql.md (SQL to execute; write operations must be written here before confirmation)05-final/result.md (conclusion + key numbers + SQL + truncated results)logs/events.jsonl (summary of each tool call; do not log sensitive field values)| Tool | Parameters | Purpose |
|------|------------|---------|
| list_tables | {"schemas":["public"]} | List all tables in specified schema |
| execute_sql | {"query":"SELECT ..."} | Execute SQL (query or DML) |
| apply_migration | {"name":"snake_case_name","query":"-- DDL"} | Apply database migration |
| list_migrations | {} | View existing migrations |
| generate_typescript_types | {} | Generate TypeScript type definitions |
| get_project_url | {} | Get project URL |
| get_publishable_keys | {} | Get public API keys |
| get_logs | {"service":"postgres\|api\|auth\|storage\|realtime\|edge-function\|branch-action"} | Query service logs |
| get_advisors | {"type":"security\|performance"} | Get security/performance recommendations |
Optional tools (if enabled):
list_edge_functions, get_edge_function, deploy_edge_functioncreate_branch, list_branches, merge_branch, reset_branch, rebase_branch, delete_branchLIMIT 50, unless user explicitly requests moreSELECT count(*) firstapply_migration, execute_sql cannot run DDL directly1. Parse requirements → restate objective
2. Unsure about tables/fields → first list_tables or execute_sql to query information_schema
3. Plan SQL → present to user
4. Read-only → execute directly
5. Write operation → confirm before execution → verify affected rows → report result
Example output:
✅ Query complete: 142 new users in the last 7 days
Executed SQL:
SELECT DATE(created_at) as date, COUNT(*) as count
FROM user_profiles
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY DATE(created_at) ORDER BY date DESC;
| date | count |
|------------|-------|
| 2025-01-09 | 23 |
| 2025-01-08 | 31 |
| ... | ... |
| Situation | Action | |-----------|--------| | SQL syntax error | Return error summary + fix suggestions | | Insufficient permissions | Explain required permissions + alternatives | | No data returned | Explain possible reasons (conditions too strict? data doesn't exist?) | | RLS blocked | Suggest checking RLS policy or using service_role |
User: Get registered user count for the last 7 days, by day
Execution:
1. Confirm table user_profiles, field created_at
2. Execute aggregation SQL
3. Return: conclusion + numbers + SQL + table
User: Find projects that have runs but all failed
Execution:
1. Confirm projects, runs tables and status field
2. Present JOIN + aggregation SQL
3. Execute and return results (mask email)
User: Create a new run for project xxx
Execution:
1. First check if project exists
2. Present INSERT SQL + expected impact: 1 row
3. Await confirmation → execute → return new record id
User: Change run abc's status to completed
Execution:
1. First SELECT to verify current state
2. Present UPDATE SQL + WHERE id = 'abc'
3. Confirm → execute → SELECT again to verify
User: Delete all runs where status = 'failed'
Execution:
1. First SELECT count(*) WHERE status = 'failed'
2. Present count + DELETE SQL
3. If > 100 rows, force double confirmation
4. After confirmation execute → report deleted row count
User: Clear the runs table
Execution:
❌ Refuse to execute
→ Prompt: DELETE without WHERE condition, this will delete all data
→ Suggest: Use TRUNCATE (requires migration) or add explicit condition
Get latest schema at runtime:
-- List all tables
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public';
-- View table structure
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = '<table_name>';
For project-specific schema (may be outdated), see schema.md. Default to information_schema / generate_typescript_types as source of truth.
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.