Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

supabase-performance-tuning

Skill by jeremylongshore

Optimizes Supabase query performance using indexes, EXPLAIN ANALYZE, connection pooling, column selection, pagination, RPC functions and materialized views. Aimed at developers facing slow queries, exhausted connections or bloated response payloads.

  • Score 76
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install supabase-performance-tuning

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/supabase-performance-tuning ~/.claude/skills/supabase-performance-tuning

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install supabase-performance-tuning in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill guides an assistant through tuning a Supabase project across three layers: the PostgreSQL engine, Supabase infrastructure, and client SDK patterns. It starts with diagnostics, using pg_stat_statements and Supabase CLI inspect commands to find slow queries, index usage, cache hit rates and table sizes. It then covers indexes and query plans, with examples of basic, composite and partial indexes and a query for finding missing foreign key indexes.

The skill also covers client and infrastructure changes. These include selecting only needed columns, paginating with range(), moving logic into RPC functions, creating materialized views, configuring Supavisor connection pooling, and using Edge Functions. The source says each technique should be measured with EXPLAIN ANALYZE before and after. It is intended for developers preparing Supabase projects for production-scale traffic.

Written from the project's SKILL.md and checked against it.

What it can do

  • Diagnose slow queriesFinds the slowest queries by average execution time using pg_stat_statements.
  • Check index usageRuns Supabase CLI inspect commands for index usage, cache hit rate and table sizes.
  • Read query plansUses EXPLAIN ANALYZE to spot Seq Scans and confirm that new indexes are used.
  • Create targeted indexesAdds basic, composite and partial indexes, and finds foreign keys that lack indexes.
  • Find unused indexesLists indexes with zero scans as candidates for removal to reduce write overhead.
  • Optimize client queriesLimits select columns, paginates with range() and replaces N+1 patterns with embedded joins.
  • Add RPC and materialized viewsMoves expensive aggregations into Postgres functions or precomputed materialized views.
  • Configure connection poolingSets up Supavisor transaction mode and pool sizing for serverless deployments.

What you need

  • Supabase project, local or hosted
  • @supabase/supabase-js v2 or later
  • Supabase CLI
  • Access to the SQL Editor or a direct Postgres connection
  • pg_stat_statements extension enabled
  • Claude Code

Try asking

  • Find the slowest queries in my Supabase database and suggest indexes.
  • Check my Supabase table for Seq Scans and add the right index.
  • Refactor my supabase.from('users').select('*') calls to limit columns and paginate.

Good to know

  • Read replicas are available on Pro and higher plans.
  • Some steps need SQL Editor access or a direct Postgres connection.
  • Production index creation should use CREATE INDEX CONCURRENTLY.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/supabase-performance-tuning/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditBash(npx:supabase)Bash(supabase:*)Grep

Alternatives to supabase-performance-tuning

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

supabase-performance-tuning: common questions

How do I find slow queries in Supabase?

The skill enables pg_stat_statements and runs a query that sorts statements by mean execution time. It also uses the Supabase CLI to check index usage and cache hit rates.

Does this skill change my database automatically?

The source describes SQL and code examples for the assistant to apply, such as CREATE INDEX and CREATE MATERIALIZED VIEW. It does not state that changes are made without review.

Which connection pooling does it recommend?

For serverless environments, it recommends the Supavisor pooled connection string in transaction mode. The Supabase JS SDK uses PostgREST and needs no pool configuration, according to the source.

How do I install supabase-performance-tuning?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is supabase-performance-tuning free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is supabase-performance-tuning safe to use?

It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to supabase-performance-tuning?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

supabase-performance-tuning Install

Add to stack

Loading.