supabase

supabase is a skill for Claude Code from juan294/cc-rpi. It costs 24 tokens per session (521 once invoked), scanned A, original, MIT.

A Supabase database guide covering safer schema migrations, access permissions, default permissions, monitoring fallbacks, and health-check endpoints. Supabase is a hosted service built around PostgreSQL, a database system.

In plain words
What is it for?
Use it when changing Supabase database structure, configuring row-level security and table access, or adding health and monitoring checks.
Why use it?
It helps catch database changes locally before production and prevents clients from being blocked by missing permissions or unnoticed service failures.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cc-rpi plugin — 14 skills, 19 commands, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/juan294/cc-rpi/supabase
Any agent
npx skills add juan294/cc-rpi --skill supabase
Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi

Made for: Claude Code.

Or install cc-rpi, the plugin that ships this one along with the rest of its 14 skills, 19 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for supabase

README.md
[![agentmods](https://agentmods.dev/badge/skills/juan294/cc-rpi/supabase.svg)](https://agentmods.dev/skills/juan294/cc-rpi/supabase)
Your own site
<a href="https://agentmods.dev/skills/juan294/cc-rpi/supabase"><img src="https://agentmods.dev/badge/skills/juan294/cc-rpi/supabase.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.00521
Opus 5 $0.00012 $0.00260
Sonnet 5 $0.00005 $0.00104
Haiku 4.5 $0.00002 $0.00052

Measured 6d ago against content hash 68386b196ce5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

supabase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/skills/supabase/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Supabase

Migration Testing

Wrong -- push migration directly to remote:

supabase db push  # bug in migration -> production database corrupted

Right -- test locally first:

supabase start                    # requires Docker Desktop
supabase db reset                 # apply all migrations locally
docker exec supabase_db_<project> psql -U postgres -c "SELECT * FROM new_table LIMIT 1;"
supabase db push                  # only after local verification

The local instance runs full Postgres with RLS and extensions enabled -- treat it as a UAT environment, not a lightweight mock.

Table Grants

Wrong -- create table without grants (RLS blocks access):

CREATE TABLE public.posts (id uuid PRIMARY KEY, title text NOT NULL);
-- Clients get 403: permission denied

Right -- include explicit grants:

CREATE TABLE public.posts (id uuid PRIMARY KEY, title text NOT NULL);
GRANT SELECT ON public.posts TO anon, authenticated;

Default Privileges

Wrong -- grant per-table, forget on future tables:

GRANT SELECT ON posts TO anon;  -- next table has same bug

Right -- set default privileges in initial setup migration:

ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO anon, authenticated;

Fallback Observability

Wrong -- silent fallback hides production bug:

if (error) return DEFAULT_POSTS;  // nobody knows

Right -- log at ERROR level when fallback activates:

if (error) {
  console.error('[TABLE_FALLBACK] posts query failed:', error.message);
  return DEFAULT_POSTS;
}

Health Endpoints

Wrong -- health check only tests connectivity:

app.get('/health', async () => {
  await supabase.from('posts').select('count');
  return { status: 'healthy' };  // doesn't detect degraded state
});

Right -- check actual data access:

app.get('/health', async () => {
  const { data, error } = await supabase.from('posts').select('id').limit(1);
  if (error) return { status: 'degraded', reason: error.message };
  return { status: 'healthy' };
});

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 96 lines · 24 tokens per session scan A 68386b196ce5

Subscribe to this mod's changes

supabase is a skill published in the GitHub repository juan294/cc-rpi (5 stars, last pushed 5d ago), licensed MIT. It adds 24 tokens to every session and 521 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.