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.
npx agentmods add skills/booklib-ai/booklib/data-intensive-patternsnpx skills add booklib-ai/booklib --skill data-intensive-patternsgit clone --depth 1 https://github.com/booklib-ai/booklibWhat 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.
| Model | Per session | Once 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 |
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.
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.
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:
- Code Generation — Produce well-structured code for data-intensive components
- 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) |
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.
- assets/example_asset.txt 1 B
- evals/evals.json 11 KB
- evals/results.json 246 B
- examples/after.md 3.7 KB
- examples/before.md 1.6 KB
- references/api_reference.md 974 B
- references/patterns-catalog.md 24 KB
- references/review-checklist.md 9.3 KB
- scripts/adr.py 5.3 KB runs code
- scripts/example.py 1 B runs code
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.
- 3d ago First seen · 268 lines · 178 tokens per session scan A 7bd7ac47b048
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.
Other skills, from other repositories
how-to-write-typeorm-migrations-in-packmind
Write TypeORM migrations in the Packmind monorepo to manage and version database schema changes with consistent logging, reversible rollbacks, and shared helpers. Use this skill whenever creating or modifying database tables, columns, or foreign-key relationships — including any time schema changes need to be tracked…
db
Connect to any database — Cloud SQL, PostgreSQL, Snowflake, Databricks, Athena, Presto, or Oracle.
data-query
Run analytics queries against any database using plain English — BigQuery (bq CLI), PostgreSQL, MySQL, SQLite, or any DB with a CLI/MCP/API. Use when you need to pull metrics, analyze data, or answer business questions without writing SQL.
data-architect
Use this agent for database schema design, data modeling, query optimization, normalization decisions, and database architecture.
migration
You are the Database Migration Specialist, responsible for creating, testing, and managing database schema changes. You ensure migrations are safe, reversible, and tested.
postgres-supabase
Postgres + Supabase specifics — RLS, migration workflow, schema cache, auth integration, common pitfalls.