AI Agents Know About Supabase. They Don't Always Use It Right.
Supabase Agent Skills is an open-source ~100-line SKILL.md that steers AI coding agents to check current docs before writing code, follow inline security rules, and use a defined schema workflow. The inline rules include security_invoker on views, app_metadata rather than user_metadata for authorization, SELECT policies for UPDATE, and revoking sessions on user deletion. The schema workflow is iterative DDL via execute_sql or `supabase db query`, then advisors, then a migration. Critical content was moved inline because agents often skipped reference files. In LLM-judged evals across six scenarios, MCP+Skill beat baseline and MCP-only for every model tested (e.g. Sonnet 4.6 46%→58%→71%, GPT-5.4 71%→88%), and MCP-only agents never called search_docs.
Related posts
- Are Supabase docs agent-friendly? We didn't know, so we checked
Supabase mediumAdeptSupabase built an eval that runs coding agents against its Row Level Security guide using a non-leading "vibe coder" prompt, then grades the resulting database setup against a checklist derived from experts and outside sources rather than from the guide itself. The first runs showed agents leaving anon with insert/update/delete/truncate grants on every public table. Adding explicit steps to revoke default grants fixed that immediately. Test-writing guidance only took effect once it sat next to the policy code agents actually copy. The takeaway is that agents read selectively, so critical instructions belong beside copyable code, and clear structure and signposting serve agents and humans alike.
- Introducing Supabase Evals
Supabase mediumAdeptSupabase has open-sourced supabase/evals, a framework that runs coding agents like Claude Code, Codex and OpenCode against real Supabase tasks in containerized hosted-like and local CLI stacks. It scores them with deterministic checks plus LLM-as-a-judge, allowing one retry before grading. Scenarios are split into a breadth-oriented published benchmark and a daily regression suite of known failure modes. Early findings: skills add only modest gains because most models already pass Build tasks. Agents still hand-write migrations instead of using declarative schemas and miss newer packages like @supabase/server. A rewritten description raised the Postgres skill's activation from about 10% to 60%, and Claude Code consults docs far less often than Codex.
- Operate with confidence: check production with your coding agent
Supabase mediumAdeptSupabase now ships Agent prompts that let a coding agent (Claude, Codex, Cursor) check a production project on a schedule for error spikes, security findings, slow queries and resource growth, reporting only new or worsening issues with the measured value, threshold and a next step. Setup connects the Supabase MCP server scoped to one project with read_only=true, then schedules a prompt; deduplication requires the agent tool to persist alert state between runs. The launch also adds a query_logs MCP tool for read-only SQL over 24 hours of logs, a debugging-aware supabase agent skill, a Health tab in Advisors for abnormal error rates, and a Database Connections page for finding and cancelling blocked or long-running queries.
- Supabase CLI v1 and Management API Beta
Supabase mediumAdeptSupabase CLI v1 leaves beta with commands to manage organizations, projects and Edge Functions, plus database migration tooling, CI/CD workflows and TypeScript type generation. Schema diffing adds an experimental migra backend (`db diff --use-migra`), which runs faster and emits more concise DDL than the previous PgAdmin-based approach, which mishandled default privileges in role grants. Local database branching lets developers test manual migrations without data loss, and `db push` plus a GitHub Actions example cover releasing to staging and production. A beta REST Management API, already used by the CLI, exposes project and organization management for automation and future Terraform/Pulumi integrations.
- Defense in Depth for MCP Servers
Supabase easyNoviceStored prompt injection, where malicious instructions hidden in database rows trick an AI agent into reading private data and writing it somewhere visible, is a property of LLM tool calling generally, not an MCP-specific flaw. Supabase's guardrails reduced the risk but did not eliminate it: read-only mode, project scoping, feature groups, warnings wrapped around query results and LLM classifiers. The recommended fix is environmental: never connect agents to production data, keep manual tool-call approval on, limit tools via feature groups, log all MCP queries, and consider CaMeL-style separation of quarantined and privileged LLMs. Planned work includes a production mode, branching, a PostgREST-backed MCP that reuses RLS, and scoped access tokens.