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.
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-tuningRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install supabase-performance-tuning in Claude Code
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/supabase-performance-tuning ~/.gemini/antigravity-cli/skills/supabase-performance-tuningAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install supabase-performance-tuning in Antigravity CLI
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 →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.
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.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
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.
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.
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.
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.
