database-design

database-design is a skill for Claude Code from parisgroup-ai/imersao-ia-setup. It costs 47 tokens per session (1,195 once invoked), scanned A, original, MIT.

Guidance for designing database tables, relationships, indexes, and changes to a database over time.

In plain words
What is it for?
Use it when modeling data, writing SQL, creating tables, adding indexes, or planning database migrations.
Why use it?
It helps prevent confusing data structures, slow queries, and migrations that are difficult or unsafe to apply.

Skill for Claude Code

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

Part of the imersao plugin — 51 skills, 7 commands shipped together

Good fit Use it when modeling data, writing SQL, creating tables, adding indexes, or planning database migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/parisgroup-ai/imersao-ia-setup/database-design
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 parisgroup-ai/imersao-ia-setup --skill database-design
Clone the repo
git clone --depth 1 https://github.com/parisgroup-ai/imersao-ia-setup

Made for: Claude Code.

Or install imersao, the plugin that ships this one along with the rest of its 51 skills, 7 commands.

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 database-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/database-design/github.svg)](https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/database-design)
Your own site
<a href="https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/database-design"><img src="https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/database-design/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 database-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/parisgroup-ai/imersao-ia-setup/database-design"><img src="https://agentmods.dev/badge/skills/parisgroup-ai/imersao-ia-setup/database-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,195 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.00047 $0.01195
Opus 5 $0.00023 $0.00598
Sonnet 5 $0.00009 $0.00239
Haiku 4.5 $0.00005 $0.00120

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

Security

Grade A, and why

database-design 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.

plugins/imersao/skills/database-design/SKILL.md · 190 lines

How it starts

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

Database Design Skill

Naming Conventions

Element Convention Example
Tables snake_case, plural users, order_items
Columns snake_case created_at, user_id
Primary Key id UUID or BIGINT
Foreign Key {table_singular}_id user_id
Indexes idx_{table}_{columns} idx_users_email

Required Columns

Every table MUST have:

CREATE TABLE example (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

Data Types (PostgreSQL)

Use Case Type
Primary Key UUID or BIGINT
Text TEXT or VARCHAR(n)
Integer INTEGER or BIGINT
Money NUMERIC(12,2)
Boolean BOOLEAN
Timestamp TIMESTAMPTZ
JSON JSONB

Indexing Strategy

Always index:

  • Foreign keys
  • Columns in WHERE clauses
  • Columns in ORDER BY
-- Composite index (order matters!)
CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DESC);

-- Partial index
CREATE INDEX idx_users_active ON users(email) WHERE status = 'active';

Relationships

-- One-to-Many
CREATE TABLE books (
  id UUID PRIMARY KEY,
  author_id UUID NOT NULL REFERENCES authors(id) ON DELETE CASCADE
);
CREATE INDEX idx_books_author ON books(author_id);

-- Many-to-Many
CREATE TABLE categories_products (
  category_id UUID REFERENCES categories(id) ON DELETE CASCADE,
  product_id UUID REFERENCES products(id) ON DELETE CASCADE,
  PRIMARY KEY (category_id, product_id)
);

Soft Deletes

ALTER TABLE users ADD COLUMN deleted_at TIMESTAMPTZ;
CREATE INDEX idx_users_active ON users(id) WHERE deleted_at IS NULL;

Migration Rules

  1. Never modify existing migrations
  2. Always include down() for rollbacks
  3. Test both directions
  4. Use CONCURRENTLY for large table indexes

Checklist

  • All tables have id, created_at, updated_at
  • Foreign keys are indexed
  • Naming conventions consistent
  • Cascade behavior explicit
  • Migrations reversible

Read the full file on GitHub · 190 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 · 190 lines · 47 tokens per session scan A 6a1afe4f60dc

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository parisgroup-ai/imersao-ia-setup (1 stars, last pushed 28d ago), licensed MIT. It adds 47 tokens to every session and 1,195 once invoked, about $0.0002 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

supabase-postgres

Postgres optimization — 70 rules (queries, indexes, RLS, concurrency). Use when writing SQL or reviewing schema.

martineserios/thebrana · 30 tokens

ddia-systems

Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…

wondelai/skills · 138 tokens

drizzle-orm

Use when modeling data or querying with Drizzle ORM in TypeScript — pgTable schema in .ts, type-safe select/insert/relational queries, drizzle-kit migrations. NOT Prisma Client or schema.prisma (that is prisma-orm), NOT ORM-agnostic migration strategy (that is db-migrations), NOT Postgres engine tuning or EXPLAIN…

ericrisco/rsc-harness · 96 tokens

database-migration-patterns

Manage database schema changes safely with migration tools, zero-downtime strategies, and rollback procedures. Covers Alembic, SQL migrations, data migrations, and testing strategies. Triggers on database migration, schema changes, or Alembic configuration requests.

organvm-iv-taxis/a-i--skills · 56 tokens

relational-database-design

Designs or reviews a relational database schema for a given domain. Covers table structure, normalization, indexes, constraints, and migration strategy. Invoked when the user asks to design a schema, review a database structure, or optimize a data model.

soulcodex/agentic · 55 tokens

Migration Safety Review (framework-agnostic)

A framework-independent review guide for database and data migrations. A migration is a controlled change to database structure or existing data, such as adding, changing, or removing a column.

s977043/river-review · 89 tokens