AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks

AI Blocks › Build and ship software

Postgres performance tuner

Give it your queries or schema. Get Postgres fixes for speed, indexes and security, ranked by impact.

Postgres performance tuner is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.

Free · No account · CC BY 4.0 licence · Made by sickn33 · Level: advanced

Start this task

Download the complete instructions and supporting files. Add the material the task needs in an AI that supports those files and tools.

Download all files

Made by sickn33. See the original on GitHub; we copied it as it is, with its licence.

What it does

Faster Postgres without guessing. Hand over your queries or schema and get a list of fixes ranked by how much each one helps. The rules come from Supabase and are grouped into eight areas in priority order: query speed, connections, security and row-level access, schema design, locking, data access patterns, monitoring and advanced features. The skill checks your SQL and table design against each area, starting with the changes that matter most, such as missing indexes and wasteful queries. Each finding says what to change and why. It suits anyone writing or reviewing Postgres, not only Supabase users.

You give it

You get

Use it when

More for Build and ship software

Every build and ship software skill

Full instructions
  • Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  • Ask for the job in your own words. Your AI opens the skill when it fits.
  • It works best when your AI can read your project files.
Full instruction file

Supabase Postgres Best Practices

When to Use

Use this skill when you need postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.

When to Apply

Reference these guidelines when:

  • Writing SQL queries or designing schemas
  • Implementing indexes or query optimization
  • Reviewing database performance issues
  • Configuring connection pooling or scaling
  • Optimizing for Postgres-specific features
  • Working with Row-Level Security (RLS)

Rule Categories by Priority

Priority Category Impact Prefix
1 Query Performance CRITICAL query-
2 Connection Management CRITICAL conn-
3 Security & RLS CRITICAL security-
4 Schema Design HIGH schema-
5 Concurrency & Locking MEDIUM-HIGH lock-
6 Data Access Patterns MEDIUM data-
7 Monitoring & Diagnostics LOW-MEDIUM monitor-
8 Advanced Features LOW advanced-

How to Use

Read individual rule files for detailed explanations and SQL examples:

references/query-missing-indexes.md
references/query-partial-indexes.md
references/_sections.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect SQL example with explanation
  • Correct SQL example with explanation
  • Optional EXPLAIN output or metrics
  • Additional context and references
  • Supabase-specific notes (when applicable)

References

Limitations

  • Use this skill only when the task clearly matches its upstream product or API scope.
  • Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
  • Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.