using-relational-databases

using-relational-databases is a skill for Claude Code from ancoleman/ai-design-components. It costs 92 tokens per session (2,526 once invoked), scanned A, original, MIT.

A guide to storing structured application data in relational databases such as PostgreSQL, MySQL, and SQLite. It covers database design and common tools for Python, Rust, Go, and TypeScript.

In plain words
What is it for?
Use it for CRUD applications, user accounts, content systems, e-commerce data, transactions, schema migrations, and connection pooling.
Why use it?
It helps you choose a suitable database and avoid unsafe or hard-to-maintain data changes. It also explains how to handle related records, database updates, and connections efficiently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the backend-data-skills plugin — 6 skills shipped together

Good fit Use it for CRUD applications, user accounts, content systems, e-commerce data, transactions, schema migrations, and connection pooling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/using-relational-databases
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ancoleman/ai-design-components --skill using-relational-databases
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install backend-data-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-relational-databases

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-relational-databases/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/using-relational-databases)
Your own site
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/using-relational-databases"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-relational-databases/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-relational-databases

Your own site · 80×15
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/using-relational-databases"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-relational-databases.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,526 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.02526
Opus 5.5 $0.00037 $0.01010
Sonnet 5.5 $0.00018 $0.00505
Haiku 4.5 $0.00009 $0.00253

Measured 1mo ago against content hash 9a981374b2c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-relational-databases scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (examples/python-sqlalchemy/main.py, scripts/generate_migration.py, scripts/validate_schema.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/using-relational-databases/SKILL.md · 254 lines

How it starts

The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Relational Databases

Purpose

This skill guides relational database selection and implementation across multiple languages. Choose the optimal database engine, ORM/query builder, and deployment strategy for transactional systems, CRUD applications, and structured data storage.

When to Use This Skill

Trigger this skill when:

  • Building user authentication, content management, e-commerce applications
  • Implementing CRUD operations (Create, Read, Update, Delete)
  • Designing data models with relationships (users → posts, orders → items)
  • Migrating schemas safely in production
  • Setting up connection pooling for performance
  • Evaluating serverless database options (Neon, PlanetScale, Turso)
  • Integrating with frontend skills (forms, tables, dashboards, search-filter)

Skip this skill for:

  • Time-series data at scale (use time-series databases)
  • Real-time analytics (use columnar databases)
  • Document-heavy workloads (use document databases)
  • Key-value caching (use Redis, Memcached)

Quick Reference: Database Selection

Database Selection Decision Tree
═══════════════════════════════════════════════════════════

PRIMARY CONCERN?
├─ MAXIMUM FLEXIBILITY & EXTENSIONS (JSON, arrays, vector search)
│  └─ PostgreSQL
│     ├─ Serverless → Neon (scale-to-zero, database branching)
│     └─ Traditional → Self-hosted, AWS RDS, Google Cloud SQL
│
├─ EMBEDDED / EDGE DEPLOYMENT (local-first, global latency)
│  └─ SQLite or Turso
│     ├─ Global distribution → Turso (libSQL, edge replicas)
│     └─ Local-only → SQLite (embedded, zero-config)
│
├─ LEGACY SYSTEM / MYSQL REQUIRED
│  └─ MySQL
│     ├─ Serverless → PlanetScale (non-blocking migrations)
│     └─ Traditional → Self-hosted, AWS RDS, Google Cloud SQL
│
└─ RAPID PROTOTYPING
   ├─ Python → SQLModel (FastAPI) or SQLAlchemy 2.0
   ├─ TypeScript → Prisma (best DX) or Drizzle (performance)
   ├─ Rust → SQLx (compile-time checks)
   └─ Go → sqlc (type-safe code generation)

Quick Reference: ORM vs Query Builder

Read the full file on GitHub · 254 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 254 lines · 92 tokens per session scan A 9a981374b2c4

Subscribe to this mod's changes

using-relational-databases is a skill published in the GitHub repository ancoleman/ai-design-components (525 stars, last pushed 10mo ago), licensed MIT. It adds 92 tokens to every session and 2,526 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

kysely

Guidelines for developing with Kysely, a type-safe TypeScript SQL query builder with autocompletion support.

Mindrally/skills · 26 tokens

postgresql-best-practices

PostgreSQL development best practices for schema design, query optimization, and database administration.

Mindrally/skills · 23 tokens

database-migrator

Migrates databases between providers (Postgres, MySQL, Supabase, PlanetScale, MongoDB). Reads source schema, generates migration scripts, handles data type mapping, foreign keys, indexes, triggers, stored procedures. Validates migration with row counts and checksums. Generates migration-plan.md with step-by-step…

OneWave-AI/claude-skills · 76 tokens

database-schema-designer

Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default and MySQL, SQLite, and MongoDB supported.…

OneWave-AI/claude-skills · 141 tokens

data-supabase-patterns

Melhores práticas de Postgres e Supabase — indexação, RLS performática, connection pooling, schema design, locking e diagnóstico com EXPLAIN. Use ao escrever queries SQL, criar migrations, desenhar schema, implementar políticas RLS, otimizar queries lentas ou investigar timeouts e problemas de conexão em projetos…

joaoguirunas/team-os · 77 tokens

sql-optimization

A guide to improving SQL queries, the commands used to read and change data in databases. It covers examining how MySQL and PostgreSQL execute queries and designing indexes that help them find data faster.

chaterm/terminal-skills · 10 tokens