SU

supabase-hello-world

Provides a quick-start guide and code pattern to test your Supabase connection and database operations.

Install

mkdir -p .claude/skills/supabase-hello-world && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7744" && unzip -o skill.zip -d .claude/skills/supabase-hello-world && rm skill.zip

Installs to .claude/skills/supabase-hello-world

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run your first Supabase query \u2014 insert a row and read it back.\n\
70 charsno explicit “when” trigger
Beginner

Key capabilities

  • Create a todos table in Supabase
  • Insert a row using the Supabase JS client
  • Read a row back from Supabase
  • Validate project URL and anon key configuration
  • Verify Row Level Security policies

How it works

The skill guides the user through creating a table, inserting data, and reading it back using the Supabase JS client. This validates the project setup and RLS policies.

Inputs & outputs

You give it
Supabase project URL, anon key, and SQL commands for table creation
You get back
A created 'todos' table, an inserted row, and the same row read back

When to use supabase-hello-world

  • Test Supabase database connectivity
  • Learn basic Supabase API patterns
  • Verify Row Level Security setup
  • Initialize new Supabase integration

About this skill

Supabase Hello World — First Query

Overview

Execute your first real Supabase query: create a todos table in the dashboard, insert a row with the JS client, and read it back. This validates that your project URL, anon key, and Row Level Security are configured correctly before you build anything else.

Prerequisites

  • Completed supabase-install-auth setup (project URL + anon key in .env)
  • @supabase/supabase-js v2+ installed (npm install @supabase/supabase-js)
  • A Supabase project at supabase.com/dashboard

Instructions

The workflow is three steps: create the table (dashboard SQL), insert a row with the JS client, and read it back to prove the round-trip. The skeleton below is enough to follow along; the fully annotated code for every step — including the error-branch comments and expected console output — lives in the full implementation walkthrough.

Step 1: Create the todos Table

In the Supabase dashboard SQL Editor, create the table, enable Row Level Security (required for anon-key access), and add permissive read + insert policies for the hello-world exercise:

create table public.todos (
  id bigint generated always as identity primary key,
  task text not null,
  is_complete boolean default false,
  inserted_at timestamptz default now()
);

alter table public.todos enable row level security;

create policy "Allow public read" on public.todos
  for select using (true);

create policy "Allow public insert" on public.todos
  for insert with check (true);

Lock these policies down before production. Verify the table appears under Table Editor before continuing.

Step 2: Insert a Row

Create the client from your env vars, then insert. Chain .select() to get the inserted row back — .insert() alone returns { data: null }:

import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  process.env.SUPABASE_URL!,
  process.env.SUPABASE_ANON_KEY!
)

const { data, error } = await supabase
  .from('todos')
  .insert({ task: 'Hello from Supabase!' })
  .select()

Step 3: Read It Back

Select all rows and confirm the row you inserted is present:

const { data: todos } = await supabase.from('todos').select('*')
// [{ id: 1, task: "Hello from Supabase!", is_complete: false, ... }]

Open the Table Editor in the dashboard to visually confirm the row is there. See implementation.md for the fully error-handled version of each step.

Output

  • todos table created with RLS enabled
  • One row inserted via the JS client
  • Same row read back with .select('*')
  • Dashboard confirms the data round-trip

Error Handling

ErrorCauseSolution
relation "public.todos" does not existTable not createdRun the Step 1 SQL in the dashboard SQL Editor
new row violates row-level security policyRLS blocks the insertAdd the permissive insert policy from Step 1
Invalid API keyWrong anon key in .envCopy from Settings > API in the dashboard
FetchError: request to https://... failedWrong project URLVerify SUPABASE_URL matches dashboard URL
data is null after insertMissing .select() chainAdd .select() after .insert()
Empty array returned from selectRLS blocks readsAdd the select policy from Step 1

Examples

Complete, runnable end-to-end scripts live in references/examples.md — a full TypeScript script (insert with .single(), then an ordered/limited read-back) and the Python equivalent. Minimal TypeScript shape:

const { data } = await supabase
  .from('todos')
  .insert({ task: 'Hello!' })
  .select()
  .single()

Resources

Next Steps

Once the round-trip works, proceed to supabase-local-dev-loop for the local development workflow with the Supabase CLI — running Postgres locally, applying migrations, and syncing schema to your hosted project. Before shipping, replace the permissive using (true) / with check (true) policies from Step 1 with real per-user Row Level Security rules, since the hello-world policies expose the table to anyone holding the anon key.

Prerequisites

Completed supabase-install-auth setup (project URL + anon key in .env)@supabase/supabase-js v2+ installedA Supabase project at supabase.com/dashboard

How it compares

This skill provides a structured, minimal example to verify a Supabase setup, which is more direct than exploring the full documentation for basic connectivity.

Compared to similar skills

supabase-hello-world side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
supabase-hello-world (this skill)127dReviewBeginner
cloudbase-document-database-web-sdk12moNo flagsIntermediate
relational-database-web-cloudbase12moReviewIntermediate
convex06moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

Search skills

Search the agent skills registry