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

database-patterns

Skill by softspark

Gives an AI assistant guidance on database schema design and query tuning, covering indexing, N+1 queries, transactions and EXPLAIN. Written for developers working with PostgreSQL, MySQL or Qdrant.

  • Score 61
  • 180 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install database-patterns

Built from the published package, never by AI.

git clone --depth 1 https://github.com/softspark/ai-toolkit /tmp/ai-toolkit && mkdir -p ~/.claude/skills && cp -r /tmp/ai-toolkit/app/skills/database-patterns ~/.claude/skills/database-patterns

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

Step-by-step: install database-patterns in Claude Code

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

About

The database-patterns skill gives an AI assistant reference guidance for database schema design and query tuning. It covers ORM choice for Node.js, Python and PHP, naming conventions, soft delete and audit columns, UUID versus serial keys, index types and composite index order, EXPLAIN ANALYZE, N+1 prevention, safe migration steps, and PgBouncer connection pooling settings. It also includes Qdrant vector database patterns for client setup, collections, upserts, filtered search and payload indexes.

The skill is loaded as reference material when trigger words such as schema, slow query, N+1, EXPLAIN and deadlock appear. It sets rules, such as profiling with EXPLAIN (ANALYZE, BUFFERS) before adding an index, and indexing every foreign key. It lists common gotchas, including lazy loading and long-running transactions that hold row locks. It is aimed at developers working with PostgreSQL, MySQL or Qdrant. It is not user-invocable, and it points to other skills for migrations, profiling and observability.

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

What it can do

  • ORM selectionMaps scenarios to Prisma, Drizzle, SQLAlchemy 2.0, SQLModel, Doctrine or Eloquent.
  • Schema naming conventionsSets rules for plural snake_case tables and idx_ and fk_ prefixed indexes and foreign keys.
  • Common schema patternsShows soft delete, audit columns and guidance on UUID versus serial keys.
  • Index strategiesExplains when to index, index types such as B-tree, GIN and BRIN, and composite index column order.
  • Query optimizationCovers EXPLAIN ANALYZE, common plan issues and N+1 prevention with eager loading.
  • Safe migrationsGives patterns for adding NOT NULL columns and a migration checklist.
  • Connection poolingShows PgBouncer settings and pool size formulas for different workloads.
  • Qdrant vector patternsCovers Qdrant client setup, collection creation, upserts, filtered search and payload indexes.

What you need

  • Python qdrant_client library for the Qdrant examples
  • A running Qdrant server for the Qdrant examples

Try asking

  • Review this schema for missing indexes on foreign key columns.
  • Explain why this PostgreSQL EXPLAIN ANALYZE shows a sequential scan.
  • Find N+1 queries in this ORM code and fix them with eager loading.

Good to know

  • Set to user-invocable false, so it is loaded by trigger words rather than called directly.
  • Allowed tools are limited to Read.
  • Schema evolution, migration tasks and observability are handled by other skills.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

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

Inside the skill

Allowed tools: Read

Alternatives to database-patterns

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

database-patterns: common questions

Does this skill cover Qdrant?

Yes. It includes Qdrant vector database patterns with Python client examples for setup, collections, upserts, filtered search and payload indexes.

Which ORMs does it recommend?

It lists Prisma and Drizzle for Node.js, SQLAlchemy 2.0 and SQLModel for Python, and Doctrine or Eloquent for PHP, chosen by scenario.

Can I call this skill directly?

No. The source sets user-invocable to false and allows only the Read tool, so it loads when trigger words such as slow query or EXPLAIN appear.

How do I install database-patterns?

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

Is database-patterns free?

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

Is database-patterns safe to use?

It scores 61 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to database-patterns?

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

database-patterns Install

Add to stack

Loading.