ddia-principles

ddia-principles is a skill for Claude Code, Codex from luoling8192/ai-coding-principles. It costs 185 tokens per session (4,138 once invoked), scanned A, original, MIT.

A reference guide for designing systems that store and process large amounts of data, based on Martin Kleppmann’s book Designing Data-Intensive Applications.

In plain words
What is it for?
Use it when designing database schemas, choosing storage engines, planning replication or partitioning, handling distributed transactions, or building batch and streaming pipelines.
Why use it?
It helps you reason about reliability, scalability, data storage, replication, and consistency before choosing an architecture.

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/luoling8192/ai-coding-principles/ddia-principles
Any agent
npx skills add luoling8192/ai-coding-principles --skill ddia-principles
Clone the repo
git clone --depth 1 https://github.com/luoling8192/ai-coding-principles

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 ddia-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/luoling8192/ai-coding-principles/ddia-principles.svg)](https://agentmods.dev/skills/luoling8192/ai-coding-principles/ddia-principles)
Your own site
<a href="https://agentmods.dev/skills/luoling8192/ai-coding-principles/ddia-principles"><img src="https://agentmods.dev/badge/skills/luoling8192/ai-coding-principles/ddia-principles.svg" alt="Measured on agentmods" height="20"></a>
Per session 185 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,138 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.00185 $0.04138
Opus 5 $0.00093 $0.02069
Sonnet 5 $0.00037 $0.00828
Haiku 4.5 $0.00018 $0.00414

Measured 5d ago against content hash 3360b207b193, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ddia-principles 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

ddia-principles/SKILL.md · 422 lines

How it starts

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

Designing Data-Intensive Applications — Distilled Guide

Source: Martin Kleppmann, Designing Data-Intensive Applications Central thesis: Data is the core challenge of modern applications — not compute.


Part I: Foundations of Data Systems

Chapter 1: Reliability, Scalability, Maintainability

Three Pillars
Pillar Definition Key Metric
Reliability System works correctly even when faults occur Fault ≠ Failure; tolerate faults, prevent failures
Scalability System handles load growth gracefully Measure with percentiles: p50, p95, p99, p999
Maintainability System is easy to operate, understand, evolve Operability + Simplicity + Evolvability
Fault Categories
  • Hardware: Random, independent (disk, RAM, power). Mitigate with redundancy (RAID, dual power).
  • Software: Systematic bugs affecting all nodes simultaneously (leap-second bug). Mitigate with process isolation, monitoring, chaos engineering.
  • Human: #1 cause of outages (config errors). Mitigate with good abstractions, sandboxes, canary deployments, fast rollback.
Scalability Patterns
  • Vertical (scale-up): Bigger machine. Simple but has ceiling.
  • Horizontal (scale-out): More machines (shared-nothing). Complex but unlimited.
  • Elastic: Auto-scale on load detection. Good for unpredictable workloads.

Twitter fan-out case study: 4.6k writes/s but 300k reads/s. Solution: pre-compute timelines (write fan-out) for most users; read-time merge for celebrities.

Performance: Use Percentiles, Not Averages
  • p50 = median. p99 = tail latency matters for user experience.
  • Amazon: 100ms delay = 1% revenue loss.
  • Tail latency amplification: One slow backend call slows entire parallel request.

Chapter 2: Data Models & Query Languages

Model Selection Guide
Model Best For Weakness
Relational Structured data, complex joins, ACID transactions Rigid schema, impedance mismatch with OOP
Document Hierarchical data, flexible schema, data locality Poor joins, many-to-many relationships
Graph Highly connected data, variable-depth traversals Less mature tooling, harder to partition

Read the full file on GitHub · 422 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. 5d ago First seen · 422 lines · 185 tokens per session scan A 3360b207b193

Subscribe to this mod's changes

ddia-principles is a skill published in the GitHub repository luoling8192/ai-coding-principles (171 stars, last pushed 5mo ago), licensed MIT. It adds 185 tokens to every session and 4,138 once invoked, about $0.0009 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-30.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

bigquery-bigframes

Generates Python code using BigQuery DataFrames (BigFrames), the pandas/scikit-learn-style API over BigQuery. Use when writing BigFrames code or doing pandas-style dataframe/ML work against BigQuery (e.g. in a notebook). Don't use for SQL-first workflows or the google-cloud-bigquery client library — use…

google/skills · 76 tokens

cloud-databases-onboarding

Guides users through discovering their database requirements, recommends a Google Cloud database based on a recommendation matrix, and assists in database creation. Use when a user asks 'What database service should I use?', 'Help me pick a database', or when a user wants to create a new database on Google Cloud.…

google/skills · 83 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens