Skip to main content
skill

postgres-best-practices · davila7 — Claude Code skill: SQL and setup

This skill guides Claude Code through Postgres queries, schemas, and configuration. Use it when tuning indexes, reviewing RLS, or investigating database performance.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill development/postgres-best-practices
Open on GitHub

What postgres-best-practices does

postgres-best-practices gives Claude Code a structured set of Supabase guidance for Postgres work. It covers query tuning, connection handling, access control with RLS, schema choices, locking, data access, diagnostics, and advanced features. The categories are ranked so critical query and connection concerns come before lower-priority topics.

The package is organized as individual rule files. They explain the issue, contrast flawed and corrected SQL, and may include EXPLAIN output or Supabase-specific notes. The compiled reference is AGENTS.md; focused material includes rules/query-missing-indexes.md and rules/schema-partial-indexes.md. For a Postgres review, this makes the skill useful beyond query text: it also checks the surrounding schema and database setup.

What it helps with

  • spot missing indexes in a Postgres query
  • review a schema against access-control rules
  • investigate locks between concurrent operations
  • adjust connection pooling and scaling choices
  • check database settings with diagnostic rules

Example prompts for the agent

  • Review this Postgres query and suggest indexes using postgres-best-practices.
  • Inspect the schema with RLS and connection management in mind.
  • Compare this change with rules/query-missing-indexes.md and AGENTS.md.

How to install postgres-best-practices

1claude-code-templates

npx claude-code-templates@latest --skill development/postgres-best-practices

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill postgres-best-practices -a claude-code

3Manually: put the files in place

~/.claude/skills/postgres-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/postgres-best-practices/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about postgres-best-practices

How do I install postgres-best-practices in Claude Code?

Run npx claude-code-templates@latest --skill development/postgres-best-practices.

What does postgres-best-practices do?

It supplies Claude Code with Supabase guidance for Postgres queries, schemas, and configuration. The skill includes focused rules with SQL examples and review notes.

Does the skill cover Row-Level Security?

Yes. RLS appears in the security category, which has critical priority in the rule set.

Similar skills

All skills for Data and databases →

postgres-best-practices by other authors comes first.

From the same set361

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor