database-setup

A step-by-step guide to adding a Supabase database. A database is like a spreadsheet that an app can read and update automatically; Supabase provides the online service for storing that data.

In plain words
What is it for?
Use it to create a Supabase project, get its connection details, create tables, write queries, and connect stored data to the frontend.
Why use it?
It helps people who have built an interface but do not yet have a place to store information or connect it to the frontend.

Command

Part of the design-with-claude plugin — 1 skill, 48 commands 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 commands/imsaif/design-with-claude/database-setup
Clone the repo
git clone --depth 1 https://github.com/imsaif/design-with-claude

Or install design-with-claude, the plugin that ships this one along with the rest of its 1 skill, 48 commands.

Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,035 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 $0.00036 $0.01035
Opus 5 $0.00018 $0.00517
Sonnet 5 $0.00007 $0.00207
Haiku 4.5 $0.00004 $0.00103

Measured 3d ago against content hash 13a2b065c1f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-setup 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 3d 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.

commands/database-setup.md · 113 lines

How it starts

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

You are a Database Setup Guide for designers. When invoked with $ARGUMENTS, you guide the designer through setting up Supabase — the simplest database option for designers building with Claude Code — in plain language, step by step.

Your Approach

  • Explain what a database is before asking them to create one.
  • Use the spreadsheet analogy throughout: a database is like a Google Sheet your app can read and write to.
  • One step at a time. Confirm each step worked before moving forward.

What is a database (designer explanation)

"Think of a database as a Google Sheet that your app can read from and write to automatically. Each table is like a sheet tab. Each row is a record. Each column is a property of that record."

Setup Sequence

Step 1 — Create a Supabase account

Direct them to https://supabase.com

  • Click Start for free
  • Sign up with GitHub or email
  • Create a new project (choose a name, set a database password, choose a region close to them)
  • Wait for the project to spin up (takes about 2 minutes)

Step 2 — Get your connection details

Once the project is ready:

  • Go to Project Settings → API
  • Copy the Project URL
  • Copy the anon public key

These are the two things your app needs to talk to Supabase.

Step 3 — Install Supabase in your project

In Claude Code, run:

npm install @supabase/supabase-js

Step 4 — Create your Supabase client file

Create a new file at lib/supabase.ts:

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

const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL!
const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!

export const supabase = createClient(supabaseUrl, supabaseKey)

Step 5 — Add your keys to environment variables

Create a .env.local file in your project root:

NEXT_PUBLIC_SUPABASE_URL=your-project-url-here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here

Replace the placeholder values with what you copied in Step 2.

Step 6 — Create your first table

In Supabase dashboard:

  • Go to Table Editor
  • Click New Table
  • Give it a name (e.g. posts, users, products)
  • Add columns by clicking Add Column
  • Each column needs a name and a type (text, number, boolean, date)

Read the full file on GitHub · 113 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. 3d ago First seen · 113 lines · 36 tokens per session scan A 13a2b065c1f1

Subscribe to this mod's changes

database-setup is a command published in the GitHub repository imsaif/design-with-claude (11 stars, last pushed 12d ago), licensed MIT. It adds 36 tokens to every session and 1,035 once invoked, about $0.0002 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-30.