database-design

database-design is a skill for Claude Code, Codex from DauQuangThanh/hanoi-rainbow. It costs 108 tokens per session (792 once invoked), scanned A, original, MIT.

A guide to planning how an application stores data in SQL databases such as PostgreSQL and MySQL, or in NoSQL databases such as MongoDB.

In plain words
What is it for?
Use it to design tables or document models, map relationships, choose data types and constraints, plan indexes and migrations, and review performance.
Why use it?
It helps prevent duplicated or inconsistent data and supports decisions about relationships, rules, indexes, and future growth.

Skill for Claude CodeCodex

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

Good fit Use it to design tables or document models, map relationships, choose data types and constraints, plan indexes and migrations, and review performance.

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

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/dauquangthanh/hanoi-rainbow/database-design/github.svg)](https://agentmods.dev/skills/dauquangthanh/hanoi-rainbow/database-design)
Your own site
<a href="https://agentmods.dev/skills/dauquangthanh/hanoi-rainbow/database-design"><img src="https://agentmods.dev/badge/skills/dauquangthanh/hanoi-rainbow/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/dauquangthanh/hanoi-rainbow/database-design"><img src="https://agentmods.dev/badge/skills/dauquangthanh/hanoi-rainbow/database-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 792 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.00108 $0.00792
Opus 5 $0.00054 $0.00396
Sonnet 5 $0.00022 $0.00158
Haiku 4.5 $0.00011 $0.00079

Measured 10d ago against content hash ed24f7f3f331, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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.

skills/database-design/SKILL.md · 80 lines

How it starts

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

Database Design

Overview

Provides comprehensive guidance for designing robust, scalable, and maintainable database schemas for both relational (SQL) and NoSQL databases, from conceptual modeling to physical implementation.

Design Workflow

  1. Requirements Analysis - Gather data requirements and usage patterns
  2. Conceptual Modeling - Create entity-relationship diagrams (ERD)
  3. Logical Modeling - Define normalized schema with relationships
  4. Physical Modeling - Select data types, indexes, and constraints
  5. Validation - Review design against requirements and best practices

Quick Start

Basic E-commerce Schema:

-- Users table
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  email VARCHAR(255) UNIQUE NOT NULL,
  password_hash VARCHAR(255) NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Products table
CREATE TABLE products (
  id SERIAL PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  description TEXT,
  price DECIMAL(10,2) NOT NULL,
  stock_quantity INTEGER DEFAULT 0,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  INDEX idx_name (name)
);

-- Orders table
CREATE TABLE orders (
  id SERIAL PRIMARY KEY,
  user_id INTEGER REFERENCES users(id),
  total_amount DECIMAL(10,2) NOT NULL,
  status VARCHAR(50) DEFAULT 'pending',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  INDEX idx_user_created (user_id, created_at)
);

Core Principles

  • Start normalized, denormalize only when proven necessary
  • Index strategically based on actual query patterns
  • Use constraints to enforce data integrity at database level
  • Choose appropriate data types to optimize storage and performance
  • Plan for growth with partitioning and sharding strategies
  • Document design decisions and their rationale
  • Test with realistic data volumes

When to Load References

  • Design Workflow: See database-design-workflow.md for step-by-step design process including requirements analysis, conceptual/logical/physical modeling, normalization steps, and relationship patterns

Read the full file on GitHub · 80 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 · 80 lines · 108 tokens per session scan A ed24f7f3f331

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository DauQuangThanh/hanoi-rainbow (16 stars, last pushed 7mo ago), licensed MIT. It adds 108 tokens to every session and 792 once invoked, about $0.0005 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.