Token导航 LogoToken导航

Agent Skill · 研究检索

ddia-principles(DDI 原则)

ddia-principles 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

ddia-principles 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 48,319。

总安装 696周安装 29GitHub Stars 166下载 232核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ddia-principles(DDI 原则)
来源仓库:https://github.com/luoling8192/ai-coding-principles
仓库路径:skills/ddia-principles
安装命令:
npx skills add https://github.com/luoling8192/ai-coding-principles --skill ddia-principles
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/luoling8192/ai-coding-principles --skill ddia-principles

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

提炼《Designing Data-Intensive Applications》核心原则的知识库技能。适合理解可靠性、可扩展性和可维护性三大支柱的数据系统设计场景。重点传达数据持久性高于代码变更的理念,强调长期数据架构决策重要性。不包含具体实现细节,需结合其他工程技能进行实践应用。

ddia-principles 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ddia-principles

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/luoling8192/ai-coding-principles --skill ddia-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ddia-principles 怎么安装?

在终端执行 npx skills add https://github.com/luoling8192/ai-coding-principles --skill ddia-principles。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ddia-principles 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ddia-principles 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

ddia-principles 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ddia-principles 用的人多吗?

公开数据是累计安装 696 次,近一周安装 29 次,下载 232 次,GitHub 166 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ddia-principles 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
ddia-principles

DDI 原则 · 本页

696166需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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
PillarDefinitionKey Metric
ReliabilitySystem works correctly even when faults occurFault ≠ Failure; tolerate faults, prevent failures
ScalabilitySystem handles load growth gracefullyMeasure with percentiles: p50, p95, p99, p999
MaintainabilitySystem is easy to operate, understand, evolveOperability + 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
ModelBest ForWeakness
RelationalStructured data, complex joins, ACID transactionsRigid schema, impedance mismatch with OOP
DocumentHierarchical data, flexible schema, data localityPoor joins, many-to-many relationships
GraphHighly connected data, variable-depth traversalsLess mature tooling, harder to partition
Schema Strategy
  • Schema-on-write (relational): Enforce structure at write time. Early error detection, migration cost.
  • Schema-on-read (document): Interpret structure at read time. Flexible but validation burden on app.
Normalization vs Denormalization
  • Normalize: Single source of truth, consistent updates, requires joins.
  • Denormalize: Faster reads, risks inconsistency, update anomalies.

Trend: Models converge — PostgreSQL supports JSON, MongoDB added joins. Choose based on access patterns, not ideology.


Chapter 3: Storage & Retrieval

Storage Engine Comparison
FeatureB-TreeLSM-Tree
Write throughputLower (in-place update + WAL)Higher (sequential append)
Read latencyMore predictableMay check multiple SSTables
Write amplificationHigherLower
Space efficiencyFragmentation possibleBetter compression
Transaction supportSimpler (lock on tree node)More complex
Used byPostgreSQL, MySQL, OracleLevelDB, RocksDB, Cassandra
OLTP vs OLAP
AspectOLTPOLAP
AccessRandom, few recordsSequential scan, millions of rows
UsersEnd usersAnalysts
DataCurrent stateHistorical events
ScaleGB–TBTB–PB
Optimize forLow latencyThroughput
Data Warehousing
  • ETL: Extract from OLTP → Transform → Load into warehouse.
  • Star schema: Central fact table (events) + dimension tables (attributes). Fact tables can have 100+ columns and petabyte scale.
  • Column-oriented storage: Store each column separately. Huge I/O savings when queries touch few columns. Enables bitmap encoding, run-length compression, vectorized processing.

Chapter 4: Encoding & Evolution

Format Comparison
FormatSize (example)SchemaEvolutionCross-language
JSON81 bytesImplicitManualExcellent
Thrift59 bytesRequiredField tagsGood
Protobuf33 bytesRequiredField tagsExcellent
Avro32 bytesRequiredName matchingGood
Compatibility Rules
  • Backward compatible: New code reads old data. *(Always required)*
  • Forward compatible: Old code reads new data. *(Required for rolling upgrades)*
  • Rule: Only add/remove fields with default values. Never reuse deleted field tags.
Data Flow Patterns
  1. Via databases: Multiple code versions coexist during rolling deploys. Data outlives code.
  2. Via services (REST/RPC): Servers update before clients. Backward compat on requests, forward compat on responses.
  3. Via async messaging: Decouples producers/consumers. Supports independent version evolution.

Avoid: Language-specific serialization (Java Serializable, Python pickle) — vendor lock-in + security risk.


Part II: Distributed Data

Chapter 5: Replication

Replication Models
ModelWritesConflictUse Case
Single-leaderOne nodeNoneMost common (PostgreSQL, MySQL)
Multi-leaderMultiple nodesMust resolveMulti-datacenter, offline clients
LeaderlessAny nodeMust resolveCassandra, Riak, Voldemort
Sync vs Async Replication
  • Sync: Durable, blocks on replica failure.
  • Async: Fast, risks data loss on leader failure.
  • Semi-sync: One replica sync, rest async. Practical compromise.
Replication Lag Problems & Solutions
ProblemSymptomSolution
Read-after-writeUser doesn't see own writeRead from leader for user's own data
Monotonic readsData goes backward in timeStick user to one replica
Consistent prefix readsCausal order violatedWrite causally related data to same partition
Conflict Resolution
  • Last-Write-Wins (LWW): Simple but loses data. Only safe if keys are immutable.
  • Merge: Union values, concatenate, CRDT data structures.
  • Application-level: Return all versions ("siblings"), let app decide.
  • Version vectors: Track causal dependencies per replica.
Quorum: w + r > n
  • w = write acknowledgments, r = read queries, n = total replicas.
  • Sloppy quorum: Accept writes on non-home nodes during partitions (hinted handoff). Improves availability, weakens consistency.

Chapter 6: Partitioning (Sharding)

Partitioning Strategies
StrategyProsCons
Key-rangeEfficient range queriesHotspot risk on sequential keys
HashEven distributionNo range queries
CompoundFirst part hashed, rest sortedMore complex, best of both
Secondary Index Partitioning
  • Local (document-based): Each partition indexes its own data. Writes simple, reads scatter-gather.
  • Global (term-based): Index partitioned by term. Reads efficient, writes update multiple partitions.
Rebalancing
  • Fixed partition count: More partitions than nodes. Redistribute on node changes. (Riak, Elasticsearch)
  • Dynamic: Split/merge based on size. (HBase, RethinkDB)
  • Proportional to nodes: Fixed partitions per node. (Cassandra)
Request Routing
  • Round-robin to any node (node forwards if needed)
  • Routing layer (partition-aware proxy)
  • Client-aware (client knows partition map)
  • ZooKeeper: Authoritative partition → node mapping. Used by HBase, Kafka.

Chapter 7: Transactions

Isolation Levels (Weakest → Strongest)
LevelPreventsAllowsImplementation
Read CommittedDirty reads, dirty writesNon-repeatable reads, lost updatesRow locks + old value copy
Snapshot Isolation+ Non-repeatable readsWrite skew, phantomsMVCC (multi-version)
SerializableEverythingNothing2PL, serial execution, or SSI
Concurrency Anomalies
AnomalyDescriptionExample
Dirty readSee uncommitted dataReading half-written transfer
Dirty writeOverwrite uncommitted dataTwo buyers "winning" same item
Lost updateRead-modify-write raceTwo concurrent counter increments
Write skewDecision based on stale readTwo doctors both going off-call
PhantomNew rows change query resultMeeting room double-booking
Serializable Implementations
  1. Serial execution: Single thread, in-memory. Fast but limited throughput. (VoltDB, Redis)
  2. Two-Phase Locking (2PL): Shared/exclusive locks held until commit. Strong but slow, deadlock-prone.
  3. SSI (Serializable Snapshot Isolation): Optimistic — execute freely, detect conflicts at commit. Best performance for read-heavy workloads. (PostgreSQL 9.1+)

Chapter 8: Troubles with Distributed Systems

The Three Unreliabilities

Networks: Async packet networks — no delivery guarantee, no timing guarantee. Cannot distinguish crash from network delay. Timeouts are the only failure detector, but no correct timeout value exists.

Clocks:

  • Wall clocks: Can jump backward (NTP correction). Never use for ordering events.
  • Monotonic clocks: Safe for elapsed time, not cross-node comparison.
  • Quartz drift: ~200ppm → 6ms error every 30 seconds.

Processes: GC pauses, VM suspension, page faults — threads stop without warning. A paused node doesn't know time passed.

Key Principles
  • Fault ≠ failure: Design for partial failures. Some nodes work while others don't.
  • Truth is defined by majority: Individual nodes cannot determine system state alone. Quorum votes decide.
  • Fencing tokens: Monotonically increasing tokens prevent zombie processes from corrupting state.
  • Safety vs liveness: Safety (bad things never happen) must hold always. Liveness (good things eventually happen) may have conditions.

Chapter 9: Consistency & Consensus

Consistency Models (Strongest → Weakest)
ModelGuaranteeCost
LinearizabilityBehaves as if one copy, all ops atomicHigh latency, reduced availability during partition
Causal consistencyRespects cause-effect orderingBetter performance, partition-tolerant
Eventual consistencyReplicas converge eventuallyBest performance, weakest guarantee
Linearizability Use Cases
  • Leader election / distributed locks
  • Uniqueness constraints (usernames, filenames)
  • Cross-channel coordination (message queue + storage)
Consensus Algorithms
  • 2PC: Coordinator-based, blocking on coordinator failure. Practical but fragile.
  • Paxos/Raft/Zab: Epoch-based leader election + quorum voting. Non-blocking. Used by etcd, ZooKeeper, Consul.
  • FLP impossibility: Consensus impossible in pure async systems with crashes. Practical algorithms use timeouts.
Total Order Broadcast ≡ Consensus ≡ Linearizable CAS

These three problems are mathematically equivalent. Solving one solves all.

ZooKeeper / etcd Pattern
  • Small consensus cluster (3–5 nodes) for coordination.
  • Linearizable atomic CAS operations.
  • Failure detection via session heartbeats.
  • Applications: leader election, partition assignment, distributed locks, service discovery.

Part III: Derived Data

Chapter 10: Batch Processing

Unix Philosophy → MapReduce
  • Each program does one thing well.
  • Output of one program = input of another.
  • Immutable inputs, deterministic processing.
MapReduce Pipeline

Input → Mapper (extract key-value) → Sort/Partition → Reducer (aggregate by key) → Output

Distributed Join Strategies
Join TypeWhenHow
Sort-mergeBoth inputs largeSort by join key, merge in reducer
Broadcast hashOne input small (fits in RAM)Load small side as hash table
Partitioned hashBoth inputs partitioned identicallyPer-partition hash join
Beyond MapReduce: Dataflow Engines (Spark, Flink, Tez)
  • Treat entire workflow as single job.
  • Pipeline intermediate results (avoid full materialization to HDFS).
  • Keep data in memory where possible.
  • Track computation lineage for fault recovery (RDDs).
  • Support iterative algorithms (graph processing via Pregel/BSP model).

Chapter 11: Stream Processing

Message Broker Models
ModelDeliveryOrderingReplayUse Case
AMQP/JMSPer-message ack, delete afterNo ordering guaranteeNoTask queues, async RPC
Log-based (Kafka)Offset-based, retainedPer-partition orderingYesEvent streaming, CDC
Change Data Capture (CDC)

Extract database changes as event stream → keep derived systems (search indexes, caches, warehouses) in sync. Source of truth stays in database; derived views are consumers.

Event Sourcing

Model state as append-only sequence of business events (not DB operations). Events are immutable facts. Current state = fold over event history.

Stream Joins
JoinInput AInput BState
Stream-StreamEventsEventsTime-windowed buffer
Stream-TableEventsDB snapshot (via CDC)Local materialized table
Table-TableCDC streamCDC streamDerived materialized view
Time & Windowing
WindowDescription
TumblingFixed-size, non-overlapping (e.g., every 1 min)
HoppingFixed-size, overlapping (e.g., 1 min window every 30s)
SlidingAll events within time threshold of each other
SessionGrouped by activity gap (e.g., 30 min inactivity)

Event time ≠ processing time. Always use event time for correctness. Handle late events with watermarks or correction publishes.

Processing Guarantees
  • Microbatching (Spark Streaming): ~1s latency, atomic small batches.
  • Checkpointing (Flink): Periodic snapshots with message barriers.
  • Idempotency: Deduplicate using message offsets or unique IDs.
  • End-to-end exactly-once requires idempotent output + deduplication.

Chapter 12: The Future of Data Systems

Data Integration Pattern

No single database does everything. Use event log as integration backbone:

  1. All writes go through authoritative event log.
  2. Derived systems (indexes, caches, ML models) consume the log.
  3. Deterministic, idempotent functions transform between layers.
Unbundling Databases

Separate concerns:

  • Record system: Captures authoritative writes.
  • Derived systems: Indexes, caches, materialized views consume change streams.
  • Enables gradual migration — run old and new systems in parallel.
End-to-End Exactly-Once

Low-level guarantees (TCP, DB transactions) don't ensure application correctness. Require:

  • Operation identifiers: UUID-based deduplication at application level.
  • Idempotent operations: Same effect whether executed once or many times.
  • Unique constraint enforcement: Via partitioned stream processing.
Async Constraint Enforcement

Instead of distributed transactions:

  1. Route requests by constraint field to partitioned log.
  2. Stream processor sequences competing requests.
  3. Reject violations, notify clients via output stream.
  4. Some applications tolerate temporary violations with compensating transactions.
Auditability
  • Treat data like immutable event log — enables reconstruction and verification.
  • Implement cryptographic audit trails (Merkle trees).
  • Periodically test backup restoration and data reconstruction.

Decision Framework: Quick Reference

Choosing a Data Model

Many-to-many relationships?     → Relational or Graph
Hierarchical / nested data?     → Document
Highly connected data?          → Graph
Flexible / evolving schema?     → Document (schema-on-read)
Strong consistency required?    → Relational (ACID)

Choosing a Storage Engine

Write-heavy workload?           → LSM-tree (RocksDB, Cassandra)
Read-heavy, predictable?        → B-tree (PostgreSQL, MySQL)
Analytical queries?             → Column store (ClickHouse, Redshift)
Full-text search?               → Inverted index (Elasticsearch)

Choosing a Replication Strategy

Single datacenter?              → Single-leader
Multi-datacenter?               → Multi-leader
Offline-first clients?          → Multi-leader or Leaderless
Maximum availability?           → Leaderless with sloppy quorum
Strong consistency?             → Single-leader with sync replication

Choosing an Isolation Level

Read-only analytics?            → Snapshot isolation
General OLTP?                   → Read committed (default in most DBs)
Financial / critical?           → Serializable (prefer SSI over 2PL)
High write contention?          → Serial execution (if data fits in RAM)

Choosing Batch vs Stream

Historical data reprocessing?   → Batch (Spark, Flink batch mode)
Real-time derived views?        → Stream (Kafka + Flink/Spark Streaming)
Both needed?                    → Unified engine (Flink) over Lambda architecture

平台分布

Codex

33.37%
按下载量换算77

Claude

31.14%
按下载量换算72

Cursor

17.62%
按下载量换算41

Gemini CLI

9.79%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills