database-design-patterns

database-design-patterns is a skill for Claude Code, Codex from NickCrew/Claude-Cortex. It costs 37 tokens per session (1,209 once invoked), scanned A, original, MIT.

A guide to designing and improving database structures for both relational databases, such as SQL systems, and NoSQL databases. It covers data organization, query speed, scaling, caching, replication, and consistency.

In plain words
What is it for?
Use it to design schemas, choose normalization or denormalization, plan partitioning and replication, add caching, migrate database technologies, and design for high availability.
Why use it?
It helps avoid slow queries, difficult migrations, data inconsistencies, and database designs that cannot handle growth.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/nickcrew/claude-cortex/database-design-patterns
Any agent
npx skills add NickCrew/Claude-Cortex --skill database-design-patterns
Clone the repo
git clone --depth 1 https://github.com/NickCrew/Claude-Cortex

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/nickcrew/claude-cortex/database-design-patterns.svg)](https://agentmods.dev/skills/nickcrew/claude-cortex/database-design-patterns)
Your own site
<a href="https://agentmods.dev/skills/nickcrew/claude-cortex/database-design-patterns"><img src="https://agentmods.dev/badge/skills/nickcrew/claude-cortex/database-design-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.01209
Opus 5 $0.00018 $0.00605
Sonnet 5 $0.00007 $0.00242
Haiku 4.5 $0.00004 $0.00121

Measured yesterday against content hash c045e38e354e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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-patterns/SKILL.md · 139 lines

How it starts

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

Database Design Patterns

Expert guidance for designing scalable database schemas, optimizing query performance, and implementing robust data persistence layers across relational and NoSQL databases.

When to Use This Skill

  • Designing database schemas for new applications
  • Optimizing slow queries and database performance
  • Choosing between normalization and denormalization strategies
  • Implementing partitioning, sharding, or replication strategies
  • Migrating between database technologies (SQL to NoSQL or vice versa)
  • Designing for high availability and disaster recovery
  • Implementing caching strategies and read replicas
  • Scaling databases horizontally or vertically
  • Ensuring data consistency in distributed systems

Core Concepts

Data Modeling

Design schemas that reflect business domain, access patterns, and consistency requirements. Balance normalization (data integrity) with denormalization (read performance) based on workload characteristics.

ACID vs. BASE

  • ACID (Relational): Atomicity, Consistency, Isolation, Durability - strong guarantees
  • BASE (NoSQL): Basically Available, Soft state, Eventually consistent - flexibility

CAP Theorem

Distributed systems choose two of three: Consistency, Availability, Partition Tolerance.

Polyglot Persistence

Use the right database for each use case: PostgreSQL for transactions, MongoDB for documents, Redis for caching, Elasticsearch for search, Cassandra for time-series, Neo4j for graphs.

Quick Reference

Task Load reference
Core database principles (ACID, BASE, CAP) skills/database-design-patterns/references/core-principles.md
Schema patterns (normalization, star schema, documents) skills/database-design-patterns/references/schema-design-patterns.md
Index types and strategies (B-tree, hash, covering) skills/database-design-patterns/references/indexing-strategies.md
Partitioning and sharding approaches skills/database-design-patterns/references/partitioning-patterns.md
Replication modes (primary-replica, multi-leader) skills/database-design-patterns/references/replication-patterns.md
Query optimization and caching skills/database-design-patterns/references/query-optimization.md

Read the full file on GitHub · 139 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 139 lines · 37 tokens per session scan A c045e38e354e

Subscribe to this mod's changes

database-design-patterns is a skill published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 1,209 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-09-03.