backend-data-modeling

backend-data-modeling is a skill for Claude Code from contactandrewchl-wq/turtle-mcp. It costs 55 tokens per session (1,107 once invoked), scanned A, original, MIT.

Guidance for designing relational database schemas, including tables, keys, indexes, constraints, and safe migrations, which are controlled changes to a database structure.

In plain words
What is it for?
It helps create or modify tables and columns, choose data types, define relationships, add indexes, plan migrations, and avoid repeated database queries known as the N+1 problem.
Why use it?
It reduces invalid data, accidental deletion behavior, slow queries, and risky production database changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the turtle plugin — 26 skills shipped together

Good fit It helps create or modify tables and columns, choose data types, define relationships, add indexes, plan migrations, and avoid repeated database queries known as the N+1 problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling
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 contactandrewchl-wq/turtle-mcp --skill backend-data-modeling
Clone the repo
git clone --depth 1 https://github.com/contactandrewchl-wq/turtle-mcp

Made for: Claude Code.

Or install turtle, the plugin that ships this one along with the rest of its 26 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 backend-data-modeling

README.md
[![agentmods](https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling/github.svg)](https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling)
Your own site
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling/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 backend-data-modeling

Your own site · 80×15
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/backend-data-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 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.00055 $0.01107
Opus 5 $0.00028 $0.00553
Sonnet 5 $0.00011 $0.00221
Haiku 4.5 $0.00006 $0.00111

Measured 10d ago against content hash 13ab2128b886, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

backend-data-modeling 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 10d ago.

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/backend-data-modeling/SKILL.md · 98 lines

How it starts

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

Backend data modeling

Cuándo usar

  • Crear o modificar tablas, columnas, índices, constraints.
  • Diseñar una migración que se va a correr en producción.
  • Resolver un problema de performance que apunta a la base.

Reglas de esquema

  • Una clave primaria por tabla. UUID v7 / ULID si necesitás generarla del lado app; bigserial si la base la genera.
  • NOT NULL por defecto. Permitir NULL es una decisión, no el descuido.
  • DEFAULT explícito en columnas booleanas y de estado.
  • Tipos correctos: text (no varchar(N) salvo restricción real), timestamptz (no timestamp), numeric(p,s) para dinero (nunca float/double).
  • CHECK constraints para invariantes simples (status IN (...), monto >= 0).
  • FK con ON DELETE explícito: CASCADE / SET NULL / RESTRICT. Sin pensar = bomba de tiempo.

Convenciones

  • Nombres en snake_case, plural para tablas (usuarios, sesiones).
  • PK: id. FK: <tabla_singular>_id (usuario_id).
  • Timestamps en toda tabla: created_at, updated_at (timestamptz NOT NULL DEFAULT now()).
  • Soft delete solo si hay requisito real de recuperación; preferí archivado a deleted_at.

Índices

  • Toda FK lleva índice (no se crea solo en Postgres).
  • Índice compuesto en el orden de la query (WHERE a=? AND b=?(a,b), no (b,a)).
  • Índices parciales para flags raros: CREATE INDEX ... WHERE status='active'.
  • No indexar por reflejo. Cada índice cuesta en escritura; medí con EXPLAIN ANALYZE antes.

Migraciones seguras (zero-downtime)

Para tablas grandes, dividí en pasos:

  1. Agregar columna NULL (instantáneo en Postgres ≥11).
  2. Backfill por lotes con cursor o batch.
  3. Agregar NOT NULL y DEFAULT cuando esté lleno.
  4. Cambio de aplicación que la use.
  5. Drop de la vieja en migración separada y posterior.

Nunca en una sola migración: ALTER ... ADD COLUMN NOT NULL DEFAULT ... en tabla grande sin pensar; bloquea por minutos en algunos motores.

Read the full file on GitHub · 98 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. 10d ago First seen · 98 lines · 55 tokens per session scan A 13ab2128b886

Subscribe to this mod's changes

backend-data-modeling is a skill published in the GitHub repository contactandrewchl-wq/turtle-mcp (2 stars, last pushed 2mo ago), licensed MIT. It adds 55 tokens to every session and 1,107 once invoked, about $0.0003 per session on Opus 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-08-31.

Related

Other skills, from other repositories

benchling-integration

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

synthetic-sciences/openscience · 44 tokens

lark-base

A guide for managing Lark Base, Feishu's spreadsheet-like database and workspace tool. It covers tables, fields, records, views, formulas, forms, dashboards, applications, workflows, and permissions.

Pinvou/pinvou-agent · 166 tokens

gno

Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…

gmickel/gno · 86 tokens

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

database

Query and manage SQLite, PostgreSQL, and MySQL databases from the command line. Use when the user asks to run SQL queries, inspect database schemas, create or alter tables, import or export data, manage indexes, analyze query performance with EXPLAIN, back up or restore databases, or perform CRUD operations via…

bug-ops/zeph · 76 tokens

qdrant

Manage Qdrant vector database via REST API. Use when the user asks to create or delete collections, upsert or search vectors, inspect points, filter by payload fields, manage snapshots, check cluster status, or debug semantic search issues. Covers collection CRUD, point upsert/search/scroll/count, payload indexes…

bug-ops/zeph · 88 tokens