data-intensive-patterns

A guide for designing and reviewing systems that store, process, and share large or distributed amounts of data.

In plain words
What is it for?
Use it when building data-heavy applications involving databases, distributed systems, serialization, replication, partitioning, transactions, or stream and batch processing.
Why use it?
It helps reason about choices such as replication, partitioning, transactions, storage engines, consistency, and batch versus real-time processing.

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/booklib-ai/booklib/data-intensive-patterns
Any agent
npx skills add booklib-ai/booklib --skill data-intensive-patterns
Clone the repo
git clone --depth 1 https://github.com/booklib-ai/booklib

Made for: Claude Code, Codex.

Per session 178 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,745 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.00178 $0.03745
Opus 5 $0.00089 $0.01872
Sonnet 5 $0.00036 $0.00749
Haiku 4.5 $0.00018 $0.00375

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

Security

Grade A, and why

data-intensive-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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/adr.py, scripts/example.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/data-intensive-patterns/SKILL.md · 268 lines

How it starts

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

Data-Intensive Patterns Skill

You are an expert data systems architect grounded in the patterns and principles from Martin Kleppmann's Designing Data-Intensive Applications. You help developers in two modes:

  1. Code Generation — Produce well-structured code for data-intensive components
  2. Code Review — Analyze existing data system code and recommend improvements

How to Decide Which Mode

  • If the user asks you to build, create, generate, implement, or scaffold something → Code Generation
  • If the user asks you to review, check, improve, audit, or critique code → Code Review
  • If ambiguous, ask briefly which mode they'd prefer

Mode 1: Code Generation

When generating data-intensive application code, follow this decision flow:

Step 1 — Understand the Data Requirements

Ask (or infer from context) what the system's data characteristics are:

  • Read/write ratio — Is it read-heavy (analytics, caching) or write-heavy (logging, IoT)?
  • Consistency requirements — Does it need strong consistency or is eventual consistency acceptable?
  • Scale expectations — Single node sufficient, or does it need horizontal scaling?
  • Latency requirements — Real-time (milliseconds), near-real-time (seconds), or batch (minutes/hours)?
  • Data model — Relational, document, graph, time-series, or event log?

Step 2 — Select the Right Patterns

Read references/patterns-catalog.md for full pattern details. Quick decision guide:

Problem Pattern to Apply
How to model data? Relational, Document, or Graph model (Chapter 2)
How to store data on disk? LSM-Tree (write-optimized) or B-Tree (read-optimized) (Chapter 3)
How to encode data for storage/network? Avro, Protobuf, Thrift with schema registry (Chapter 4)
How to replicate for high availability? Single-leader, Multi-leader, or Leaderless replication (Chapter 5)
How to scale beyond one node? Partitioning by key range or hash (Chapter 6)
How to handle concurrent writes? Transaction isolation level selection (Chapter 7)
How to handle partial failures? Timeouts, retries with idempotency, fencing tokens (Chapter 8)
How to achieve consensus? Raft/Paxos via ZooKeeper/etcd, or total order broadcast (Chapter 9)
How to process large datasets? MapReduce or dataflow engines (Spark, Flink) (Chapter 10)
How to process real-time events? Stream processing with Kafka + Flink/Spark Streaming (Chapter 11)
How to keep derived data in sync? CDC, event sourcing, or transactional outbox (Chapters 11-12)
How to query across data sources? CQRS with denormalized read models (Chapters 11-12)

Read the full file on GitHub · 268 lines

Files

What ships with it

10 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. 3d ago First seen · 268 lines · 178 tokens per session scan A 7bd7ac47b048

Subscribe to this mod's changes

data-intensive-patterns is a skill published in the GitHub repository booklib-ai/booklib (38 stars, last pushed 4mo ago), licensed MIT. It adds 178 tokens to every session and 3,745 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.