database-design

database-design is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 15 tokens per session (2,594 once invoked), scanned A, original, MIT.

A guide to designing database schemas—the structures that define how data is stored and related. It covers relational databases, document stores, key-value databases, and graph databases.

In plain words
What is it for?
Use it to choose database types, normalize or denormalize tables, model relationships, design schemas around access patterns, and optimize queries.
Why use it?
It helps choose a suitable database structure and balance data integrity with query speed. It also reduces problems caused by duplicated, poorly organized, or hard-to-access data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose database types, normalize or denormalize tables, model relationships, design schemas around access patterns, and optimize queries.

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

Made for: Claude Code, Codex.

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/fabioc-aloha/alex_skill_mall/database-design/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/database-design)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/database-design"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/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/fabioc-aloha/alex_skill_mall/database-design"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/database-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,594 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.00015 $0.02594
Opus 5.5 $0.00006 $0.01038
Sonnet 5.5 $0.00003 $0.00519
Haiku 4.5 $0.00002 $0.00259

Measured 1mo ago against content hash cb74d4d26c66, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/data-analytics/database-design/skills/database-design/SKILL.md · 418 lines

How it starts

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

Database Design Skill

Model data to match access patterns. Normalize for integrity, denormalize for performance.


Choosing a Database

Decision Matrix

Factor SQL (Relational) NoSQL (Document) Key-Value Graph
Schema Fixed, strict Flexible None Nodes/edges
Transactions ACID built-in Eventually consistent (usually) Limited Varies
Joins Native support Expensive/manual N/A Native (relationships)
Scale Vertical → Horizontal Horizontal native Horizontal native Specialized
Best for Structured data, complex queries Rapid iteration, varied shape Cache, sessions Relationships

Common Choices (2026)

Database Type Best For
PostgreSQL Relational General purpose, full-featured
SQLite Relational Embedded, serverless
MongoDB Document Rapid prototyping, flexible schema
Redis Key-Value Caching, sessions, pub/sub
Cosmos DB Multi-model Azure-native, global distribution
DynamoDB Key-Value/Document AWS-native, massive scale
Neo4j Graph Social networks, recommendations

Schema Design Principles

Normalization Levels

Form Rule Trade-off
1NF No repeating groups Basic structure
2NF No partial dependencies Remove redundancy
3NF No transitive dependencies Data integrity
BCNF Every determinant is a key Strict integrity

When to Denormalize

  • Read-heavy workloads
  • Complex queries hitting many tables
  • When consistency can be eventual
  • Reporting/analytics tables

Example: E-Commerce Schema

-- Normalized (3NF)
CREATE TABLE customers (
    id SERIAL PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    name VARCHAR(255) NOT NULL
);

CREATE TABLE orders (
    id SERIAL PRIMARY KEY,
    customer_id INTEGER REFERENCES customers(id),
    created_at TIMESTAMP DEFAULT NOW(),
    status VARCHAR(50) NOT NULL
);

CREATE TABLE order_items (
    id SERIAL PRIMARY KEY,
    order_id INTEGER REFERENCES orders(id),
    product_id INTEGER REFERENCES products(id),
    quantity INTEGER NOT NULL,
    unit_price DECIMAL(10,2) NOT NULL
);

-- Denormalized for reporting
CREATE TABLE order_summary (
    order_id INTEGER PRIMARY KEY,
    customer_email VARCHAR(255),
    customer_name VARCHAR(255),
    total_amount DECIMAL(10,2),
    item_count INTEGER,
    created_at TIMESTAMP
);

Read the full file on GitHub · 418 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 · 418 lines · 15 tokens per session scan A cb74d4d26c66

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (5 stars, last pushed 8d ago), licensed MIT. It adds 15 tokens to every session and 2,594 once invoked, about $0.0001 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