system-and-data-design

Assess system feasibility and determine data placement: analyze requirements and load, produce rough capacity estimates, consider building blocks (cache, queue, load balancer, CDN), and dive into the data layer (storage engine, indexes, replication, partitioning, transactions and consistency, batch and stream processing). Suitable for evaluating capacity or scalability, choosing databases/caches/queues/indexes, answering whether a design can be supported and how many machines are needed, whether read replicas or sharding are required, whether to use eventual consistency, diagnosing why a query slows at scale, or designing data ingestion/processing pipelines. Not suitable for module boundaries or dependency direction decisions, function-level code quality reviews, large-code refactoring advice, or simplified answers for low-traffic internal tools.

Last repository push
GitHub Stars
218
Forks
33
Issues / PRs
5

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "system-and-data-design" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-330c8f3d98c5d536cb192d590246767ea41c4515cd0da92ad86dbf722406cd25. Verify the upstream source and version against https://github.com/AnastasiyaW/codex-claude-code-config before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Assess system feasibility and determine data placement: analyze requirements and load, produce rough capacity estimates, consider building blocks (cache, queue, load balancer, CDN), and dive into the data layer (storage engine, indexes, replication, partitioning, transactions and consistency, batch and stream processing). Suitable for evaluating capacity or scalability, choosing databases/caches/queues/indexes, answering whether a design can be supported and how many machines are needed, whether read replicas or sharding are required, whether to use eventual consistency, diagnosing why a query slows at scale, or designing data ingestion/processing pipelines. Not suitable for module boundaries or dependency direction decisions, function-level code quality reviews, large-code refactoring advice, or simplified answers for low-traffic internal tools.

0 Downloads

Introduction source: third_party · AnastasiyaW · 0.0.1 Reference

SkillPi interpretation

Tasks
Two questions that are usually asked together and answered separately, badly. Capacity without storage internals gives a diagram that cannot be built; storage internals without capacity gives a database choice with no reason behind it.
Software, accounts and paid services
**Functional**: what must it actually do? Write it as verbs, not components. **Non-functional, with numbers**: users, requests/sec at peak, payload size, growth, read:write ratio, acceptable latency, acceptable staleness, retention. **Constraints**: budget, team size, existing stack, compliance, where data may live. "Acceptable staleness" is the single most useful number and the one nobody asks for. It decides caching, replication and consistency all at once.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: system-and-data-design
description: >
  Decide whether the system will hold, and where the data lives: requirements and load
  first, then back-of-the-envelope numbers, building blocks (cache, queue, load
  balancer, CDN), and the data layer in depth — storage engines, indexes, replication,
  partitioning, transactions and consistency, batch vs stream. Use when sizing or
  scaling anything; choosing a database, cache, queue or index; when asked "will this
  hold", "how many machines", "which database", "do we need a queue", "read replica",
  "sharding", "eventual consistency", "why is this query slow at scale"; when designing
  an ingestion or processing pipeline; or when a service is slow under load rather than
  wrong. Do NOT use for module layout, dependency direction or domain boundaries (use
  architecture-first), for function- and naming-level quality (use code-complexity), for
  restructuring code that is already too large (use refactoring-safely), or for a
  low-traffic internal tool where the honest answer is one process and one database.

System and data design — will it hold, and where does the data live

Two questions that are usually asked together and answered separately, badly. Capacity without storage internals gives a diagram that cannot be built; storage internals without capacity gives a database choice with no reason behind it.

Scope guard — read first

The most common failure here is answering at the wrong scale.

Situation Honest answer
Internal tool, tens of users One process, one database, no cache. Stop.
Product with real traffic, single region Estimate first; add a cache and a queue only where the numbers say
Multi-region, or data outgrowing one machine Full pass: estimation → building blocks → replication/partitioning → consistency

Adding a cache before measuring is the canonical way to convert one problem into two.

Step 1 — requirements before architecture

  • Functional: what must it actually do? Write it as verbs, not components.
  • Non-functional, with numbers: users, requests/sec at peak, payload size, growth, read:write ratio, acceptable latency, acceptable staleness, retention.
  • Constraints: budget, team size, existing stack, compliance, where data may live.

"Acceptable staleness" is the single most useful number and the one nobody asks for. It decides caching, replication and consistency all at once.

Step 2 — back-of-the-envelope, before any diagram

Estimate storage/day, bandwidth at peak, QPS, and working-set size. The point is not precision; it is discovering that the answer is "one machine" or "this cannot work as described" before drawing anything.

Anchors worth remembering: memory reads are ~100ns, SSD ~100µs, a same-region round trip ~0.5ms, cross-continent ~150ms. Anything crossing a network is ~1000× a memory access — which is why one N+1 query pattern outweighs most micro-optimisation.

Step 3 — building blocks, each with a reason

Block Add it when Cost you accept
Cache Read-heavy, tolerable staleness, measured hot set Invalidation becomes your problem
Queue Work can be async; spikes must be absorbed Ordering, retries, duplicate delivery
Read replica Reads dominate; stale reads acceptable Replication lag becomes visible to users
Partitioning One machine cannot hold data or throughput Cross-partition queries and transactions get hard
CDN Static or cacheable content, geographically spread Purge and versioning discipline

Each row is a trade, not an upgrade. A block added without its reason written down is a future mystery.

Step 4 — the data layer

  • Storage engines: log-structured (LSM) favours writes and compaction; B-tree favours predictable reads and in-place updates. Choose by the workload's read:write shape, not by brand.
  • Indexes are a write-cost you pay for a read-benefit. An index nobody's query plan uses is pure cost.
  • Replication: single-leader is the default and enough for most systems; multi-leader and leaderless buy availability and pay in conflict resolution you must then design.
  • Partitioning: choose the key by access pattern, not by what looks even. Hot keys and unbounded partitions are the two failures; both are visible in a histogram before they are visible in production.
  • Transactions: know which isolation level you actually get. Read-committed does not prevent lost updates; "we use transactions" is not a consistency argument.
  • Batch vs stream: batch for correctness and reprocessing, stream for freshness. Streams that cannot be replayed lose the ability to fix a bug retroactively.

Review pass

  • Is every component justified by a number, or by habit?
  • What happens at 10× — which part breaks first, and is that acceptable?
  • Where can it lose data, and is that written down?
  • What is the failure mode of each dependency: degrade, queue, or fail loudly?
  • Does any user-visible read cross a replication lag nobody bounded?

References — load on demand

  • references/system-design/four-step-process.md, estimation-numbers.md, building-blocks.md, database-scaling.md, common-designs.md, reliability-operations.md
  • references/ddia-systems/storage-engines.md, data-models.md, replication.md, partitioning.md, transactions.md, batch-stream.md, fault-tolerance.md
  • *-original.md — the source skills' own framework prose, kept verbatim

Gotchas

  • Designing for a scale you do not have. The cost is paid now, the benefit maybe never. Estimate first; the estimate frequently says "one machine".
  • Cache as a fix for a slow query. It hides the query and adds invalidation. Fix the query, then decide about the cache.
  • Eventual consistency chosen by accident. A read replica added for speed silently makes some reads stale. Decide which reads may be stale, and say so.
  • The queue that became a database. Unbounded retention plus a consumer that never catches up is a data store with none of the guarantees of one.

Troubleshooting

Symptom Likely cause Where to look
Fine in test, slow in production Working set exceeds memory; disk seeks per request Storage engine, index coverage
Latency spikes at intervals Compaction, GC, or a cron competing for IO Storage engine internals, host metrics
One shard hot, others idle Partition key follows structure, not access Partitioning
Users see their own write disappear Read served by a lagging replica Replication, read-your-writes
Duplicate side effects At-least-once delivery without idempotency Queue semantics

Version history

  1. v2026.10.24 GitHub ↗
    Original release notes

    Three ideas from this month's agent-harness news, adopted as checks rather than prompts. ## New - **Output legibility** — [`docs/output-legibility.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/output-legibility.md). Karpathy's readability ladder (STE-style text, diagram, HTML, video), plus the two ASD-STE100 rules that need no licensed dictionary: one concept keeps one term, and sentences stay short. - **`scripts/term_drift_check.py`** — checks agent output against a project glossary. It flags synonyms of your terms (`stem*` covers inflection, so it works in Russian too) and overlong sentences, and skips code, URLs and HTML comments. Exit `0` clean, `1` findings, `2` not checked. It ships with a self-test whose must-fail controls catch six deliberate breaks of the logic. - **Bounded harness-improvement pilot** — [`docs/harness-improvement-pilot.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/docs/harness-improvement-pilot.md). The method behind Google Research's Harness², without the auto-patcher: a frozen suite with a held-out case, one change per candidate, strict improvement and no safety regression. - **Dead-code sweep** — a new reference in the `refactoring-safely` skill, after OpenAI's GPT-6 maintenance guide. It covers a read-only audit with production evidence and one small draft PR per removal, and keeps killswitches and safeguards out of scope. ## Changed - `rules/quality-code.md`: when you change code, update or delete the comment next to it in the same commit. Research suggests a wrong or stale comment misleads a model more than a missing one. - `CLAUDE.md`: new Harness² and Output Legibility sections. Full changelog: [`UPDATES.md`](https://github.com/AnastasiyaW/codex-claude-code-config/blob/main/UPDATES.md) · PRs #18, #19

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供系统容量估算与数据架构设计的完整方法论
  • 明确区分适用与不适用场景,避免误用
  • 涵盖从需求收集到故障排查的全生命周期指导
Trigger Precision95/100

Highlights

  • 触发词覆盖多种自然语言提问变体
  • 边界清晰,与架构优先、代码复杂度等 Skill 无重叠
  • description 位置正确且内容完整
Structure and Standards88/100

Highlights

  • 四步流程结构清晰,每步有明确目标
  • 包含多个实用表格(场景判断、构建块、故障排查)
  • frontmatter 完整,文档长度适中
Execution Reliability72/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    SKILL.md 引用了 references/system-design/*.md 和 references/ddia-systems/*.md 等文件,但未传入任何引用文件,影响用户获取完整参考资料。

    Recommendation: 请补充所有被引用的参考文件,或移除引用链接以避免误导用户。

Highlights

  • 覆盖缓存、队列、复制、分区等核心组件的 trade-off 分析
  • 明确提示 eventual consistency、分区热点等常见陷阱
  • 提供可操作的故障排查对照表
Evidence Verifiability (mean of the first four)87/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

**Functional**: what must it actually do? Write it as verbs, not components. **Non-functional, with numbers**: users, requests/sec at peak, payload size, growth, read:write ratio, acceptable latency, acceptable staleness, retention. **Constraints**: budget, team size, existing stack, compliance, where data may live. "Acceptable staleness" is the single most useful number and the one nobody asks for. It decides caching, replication and consistency all at once.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.