Supabase Cost Tuning
jeremylongshore/tons-of-skills-marketplace
Optimize Supabase costs through plan selection, database tuning, storage cleanup, connection pooling, and Edge Function optimization.
Core Supabase CLI, migrations, RLS, Edge Functions. An agent skill from alinaqi/maggy.
$ npx skills add alinaqi/maggy --skill supabase -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alinaqi/maggy supabase --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/supabase .claude/skills/supabase && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .claude/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alinaqi/maggy/tree/main/skills/supabaseType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alinaqi/maggy --skill supabase -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alinaqi/maggy supabase --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/supabase .agents/skills/supabase && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .agents/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill supabase -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alinaqi/maggy supabase --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/supabase .cursor/skills/supabase && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .cursor/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alinaqi/maggy.git --path skills/supabase--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alinaqi/maggy --skill supabase -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alinaqi/maggy supabase --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/supabase .gemini/skills/supabase && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .gemini/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alinaqi/maggy supabaseInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alinaqi/maggy --skill supabase -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/supabase .github/skills/supabase && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .github/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill supabase -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alinaqi/maggy supabase --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/supabase .opencode/skills/supabase && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "supabase" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/supabase into .opencode/skills/supabase/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "supabase", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
supabaseCore Supabase CLI, migrations, RLS, Edge Functions. An agent skill from alinaqi/maggy.
Supabase is an agent skill from alinaqi/maggy. Core Supabase CLI, migrations, RLS, Edge Functions
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases. It works with Supabase. The repository describes itself as: What started as an opinionated Claude Code setup kit is now an autonomous AI engineering command center. The licence is MIT.
Read from SKILL.md and the folder at commit 72a456e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
supabasebrewnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
supabase.comxxxxx.supabase.codeno.landesm.shFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
SUPABASE_ANON_KEYSUPABASE_ACCESS_TOKENSUPABASE_DB_PASSWORDSUPABASE_SERVICE_ROLE_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Supabase loads about 2.4k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 214 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
hs: ["supabase/**", "**/supabase.*", "**/.env*"]# .env.local (local development)# .env.production (remote)- **Committing .env** - Add to .gitignoreAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from alinaqi/maggy at commit 72a456e, republished under its MIT licence (© alinaqi). 214 words, ~2,439 tokens.
.claude/skills/supabase/SKILL.md (or your agent's skills folder).Core concepts, CLI workflow, and patterns common to all Supabase projects.
Sources: Supabase Docs | Supabase CLI
Local-first, migrations in version control, never touch production directly.
Develop locally with the Supabase CLI, capture all changes as migrations, and deploy through CI/CD.
| Service | Purpose |
|---|---|
| Database | PostgreSQL with extensions |
| Auth | User authentication, OAuth providers |
| Storage | File storage with RLS |
| Edge Functions | Serverless Deno functions |
| Realtime | WebSocket subscriptions |
| Vector | AI embeddings (pgvector) |
# macOS
brew install supabase/tap/supabase
# npm (alternative)
npm install -g supabase
# Login
supabase login# In your project directory
supabase init
# Creates:
# supabase/
# ├── config.toml # Local config
# ├── seed.sql # Seed data
# └── migrations/ # SQL migrations# Get project ref from dashboard URL: https://supabase.com/dashboard/project/<ref>
supabase link --project-ref <project-id>
# Pull existing schema
supabase db pullsupabase start
# Output:
# API URL: http://localhost:54321
# GraphQL URL: http://localhost:54321/graphql/v1
# DB URL: postgresql://postgres:postgres@localhost:54322/postgres
# Studio URL: http://localhost:54323
# Anon key: eyJ...
# Service role key: eyJ...# 1. Make changes in local Studio (localhost:54323)
# 2. Generate migration from diff
supabase db diff -f <migration_name>
# 3. Review generated SQL
cat supabase/migrations/*_<migration_name>.sql
# 4. Reset to test
supabase db reset# 1. Create empty migration
supabase migration new create_users_table
# 2. Edit the migration file
# supabase/migrations/<timestamp>_create_users_table.sql
# 3. Apply locally
supabase db resetUse Drizzle (TypeScript) or SQLAlchemy (Python) - see framework-specific skills.
# Push to remote (staging/production)
supabase db push
# Check migration status
supabase migration list-- Always enable RLS
ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
-- Default deny - must create policies
CREATE POLICY "Users can view own profile"
ON public.profiles
FOR SELECT
USING (auth.uid() = id);-- Public read
CREATE POLICY "Public read access"
ON public.posts FOR SELECT
USING (true);
-- Authenticated users only
CREATE POLICY "Authenticated users can insert"
ON public.posts FOR INSERT
WITH CHECK (auth.role() = 'authenticated');
-- Owner access
CREATE POLICY "Users can update own records"
ON public.posts FOR UPDATE
USING (auth.uid() = user_id);
-- Admin access (using custom claim)
CREATE POLICY "Admins have full access"
ON public.posts FOR ALL
USING (auth.jwt() ->> 'role' = 'admin');-- Profile table linked to auth
CREATE TABLE public.profiles (
id UUID PRIMARY KEY REFERENCES auth.users(id) ON DELETE CASCADE,
username TEXT UNIQUE NOT NULL,
avatar_url TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Auto-create profile on signup
CREATE OR REPLACE FUNCTION public.handle_new_user()
RETURNS TRIGGER AS $$
BEGIN
INSERT INTO public.profiles (id, username)
VALUES (NEW.id, NEW.email);
RETURN NEW;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
CREATE TRIGGER on_auth_user_created
AFTER INSERT ON auth.users
FOR EACH ROW EXECUTE FUNCTION public.handle_new_user();-- Runs on `supabase db reset`
-- Use ON CONFLICT for idempotency
INSERT INTO public.profiles (id, username, avatar_url)
VALUES
('d0e1f2a3-b4c5-6d7e-8f9a-0b1c2d3e4f5a', 'testuser', null),
('a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d', 'admin', null)
ON CONFLICT (id) DO NOTHING;# Public (safe for client-side)
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=eyJ...
# Private (server-side only - NEVER expose)
SUPABASE_SERVICE_ROLE_KEY=eyJ...
DATABASE_URL=postgresql://postgres.[ref]:[password]@aws-0-region.pooler.supabase.com:6543/postgres# .env.local (local development)
SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=<from supabase start>
DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
# .env.production (remote)
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=<from dashboard>
DATABASE_URL=<connection pooler URL># Transaction mode (recommended for serverless)
# Add ?pgbouncer=true to URL
DATABASE_URL=postgresql://...@pooler.supabase.com:6543/postgres?pgbouncer=true
# Session mode (for migrations, long transactions)
DATABASE_URL=postgresql://...@pooler.supabase.com:5432/postgressupabase functions new hello-world// supabase/functions/hello-world/index.ts
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
serve(async (req) => {
const { name } = await req.json();
return new Response(
JSON.stringify({ message: `Hello ${name}!` }),
{ headers: { 'Content-Type': 'application/json' } }
);
});import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2';
serve(async (req) => {
const supabase = createClient(
Deno.env.get('SUPABASE_URL') ?? '',
Deno.env.get('SUPABASE_ANON_KEY') ?? '',
{
global: {
headers: { Authorization: req.headers.get('Authorization')! },
},
}
);
const { data: { user } } = await supabase.auth.getUser();
if (!user) {
return new Response('Unauthorized', { status: 401 });
}
return new Response(JSON.stringify({ user_id: user.id }));
});# Serve locally
supabase functions serve
# Deploy single function
supabase functions deploy hello-world
# Deploy all
supabase functions deployINSERT INTO storage.buckets (id, name, public)
VALUES ('avatars', 'avatars', true);
-- Storage policies
CREATE POLICY "Avatar images are publicly accessible"
ON storage.objects FOR SELECT
USING (bucket_id = 'avatars');
CREATE POLICY "Users can upload own avatar"
ON storage.objects FOR INSERT
WITH CHECK (
bucket_id = 'avatars' AND
auth.uid()::text = (storage.foldername(name))[1]
);# Lifecycle
supabase start # Start local stack
supabase stop # Stop local stack
supabase status # Show status & credentials
# Database
supabase db reset # Reset + migrations + seed
supabase db push # Push to remote
supabase db pull # Pull remote schema
supabase db diff -f <name> # Generate migration from diff
supabase db lint # Check for issues
# Migrations
supabase migration new <name> # Create migration
supabase migration list # List migrations
supabase migration up # Apply pending (remote)
# Functions
supabase functions new <name> # Create function
supabase functions serve # Local dev
supabase functions deploy # Deploy all
# Types
supabase gen types typescript --local > types/database.ts
# Project
supabase link --project-ref <id> # Link to remote
supabase projects list # List projects# .github/workflows/supabase.yml
name: Supabase CI/CD
on:
push:
branches: [main]
pull_request:
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
- name: Start Supabase
run: supabase start
- name: Run migrations
run: supabase db reset
- name: Lint database
run: supabase db lint
deploy:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
- name: Link project
run: supabase link --project-ref $SUPABASE_PROJECT_ID
- name: Push migrations
run: supabase db push
- name: Deploy functions
run: supabase functions deploy© alinaqi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/supabase of alinaqi/maggy.
Open the folder on GitHubat commit 72a456e
Supabase next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Supabase this skillalinaqi/maggy | 707 | — | ~2.4k | Automated safety check: Notes | MIT | |
| Supabase Cost Tuningjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2k | Automated safety check: Pass | MIT | |
| Supabase Load Scalejeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Supabase Migration Deep Divejeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Supabase Performance Tuningjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Take Doc Screenshotspgplex/pgconsole | 155 | — | ~841 | Automated safety check: Pass | Apache-2.0 |
jeremylongshore/tons-of-skills-marketplace
Optimize Supabase costs through plan selection, database tuning, storage cleanup, connection pooling, and Edge Function optimization.
jeremylongshore/tons-of-skills-marketplace
A skill your agent uses when preparing a Supabase project for production load — traffic spikes, connection-limit tuning, read replicas for analytics queries, CDN caching for Storage, regional Edge…
jeremylongshore/tons-of-skills-marketplace
Database migration patterns with the Supabase CLI: npx supabase migration new, zero-downtime migrations, data backfill strategies, schema versioning, rollback strategies, and TypeScript type…
jeremylongshore/tons-of-skills-marketplace
Optimize Supabase query performance with indexes, EXPLAIN ANALYZE, connection pooling, column selection, pagination, RPC functions, materialized views, and diagnostics.
pgplex/pgconsole
Take screenshots of the running pgconsole app for documentation.
supabase/supabase
Execute runnable docs snippets and examples inside a disposable Docker Compose sandbox (runner container + local Supabase stack via supabase start).
alinaqi/maggy
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
alinaqi/maggy
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
alinaqi/maggy
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
alinaqi/maggy
Android Java development with MVVM, ViewBinding, and Espresso testing
alinaqi/maggy
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
alinaqi/maggy
AI-driven testing agent that auto-discovers, generates, executes, evaluates, and fixes tests for any project type
Works with
Categories
Core Supabase CLI, migrations, RLS, Edge Functions. An agent skill from alinaqi/maggy. Supabase is an agent skill from alinaqi/maggy.
Supabase fits situations like: databases work in your project.
Run `npx skills add alinaqi/maggy --skill supabase -a claude-code`. Or copy the skill folder (skills/supabase in alinaqi/maggy) into .claude/skills/supabase in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alinaqi/maggy --skill supabase -a codex`. Or copy the skill folder (skills/supabase in alinaqi/maggy) into .agents/skills/supabase in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alinaqi/maggy --skill supabase -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/supabase, .gemini/skills/supabase, .github/skills/supabase and .opencode/skills/supabase in your project.
Going by SKILL.md and its folder, Supabase needs the command-line tools its instructions call (supabase, brew and npm) and credentials named SUPABASE_ANON_KEY, SUPABASE_ACCESS_TOKEN, SUPABASE_DB_PASSWORD and SUPABASE_SERVICE_ROLE_KEY. Our summary lists: Node.js; A credential in SUPABASE_ANON_KEY; A credential in SUPABASE_SERVICE_ROLE_KEY.
SKILL.md names 4 domains. In commands or code: supabase.com, xxxxx.supabase.co, deno.land and esm.sh; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Supabase is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Supabase: Supabase Cost Tuning (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Supabase Load Scale (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Supabase Migration Deep Dive (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Supabase Performance Tuning (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alinaqi (a GitHub user) maintains it in alinaqi/maggy, which has 707 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on September 24, 2026.
Source: alinaqi/maggy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.