Skip to main content
BuildReviewed Aug 30, 2026

System Design Building Blocks

Select infrastructure components by the constraint each removes: load balancers, caches and invalidation, queues and pub/sub, CDN, API gateway, rate limiting, consistent hashing. Use when choosing cache, queue, replica, or edge layers; defer engine tuning to the database category.

v1.0.21 install

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install multi-language-standards-system-design-building-blocks
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/multi-language-standards-system-design-building-blocks/SKILL.md

Setup guide →
0Save

Instructions

System Building Blocks

Priority: P1 (HIGH)

Add a component only to remove a named constraint. Every component adds failure modes and cost.

Selection Table

Constraint observedComponentCost accepted
One instance saturates CPU or connectionsHorizontal scaling behind a load balancerStatelessness required; session moves to a store
Read QPS exceeds store ceiling; data tolerates stalenessRead-through cacheStale reads up to TTL; invalidation complexity
Write spikes exceed sustainable store throughputQueue plus async workerEventual completion; needs idempotent consumers
Slow non-critical work blocks the request pathBackground job or eventExtra delivery guarantees to reason about
Static or media bytes dominate egressCDNCache purge lag; origin still needed for misses
Cross-cutting authn, quota, routing repeated per serviceAPI gatewayCentral chokepoint; fails closed and needs its own failure capacity
One tenant or key can exhaust capacityRate limiter or admission controlRejections need clear client contracts
Cache or shard nodes change count during scalingConsistent hashingRebalancing logic; hot-key skew persists

Caching Rules

  • Default to cache-aside for read-heavy paths; use write-through only when read-after-write must be exact.
  • Set TTL from tolerable staleness, not from convenience. Every cached key needs a stated TTL and an invalidation trigger.
  • Guard the miss path by scope: in-process single-flight or coalescing is one fill per instance; use bounded cross-instance protection only when sizing shows origin headroom requires it. See Miss-Path Protection.
  • Never cache what you cannot invalidate. Never cache per-user data under a shared key.

Queue Rules

  • Choose delivery semantics explicitly: at-least-once plus idempotent consumers is the safe default.
  • Partition by the entity that must stay ordered; ordering is per partition, never global.
  • Size the queue for the burst, and define the drain rate. An unbounded queue converts a throughput problem into a latency and memory problem.
  • Apply backpressure at the producer when depth exceeds the drain budget; shedding beats silent growth.

Session State

  • Default to a stateless token (signed JWT or opaque id verified at the edge); the app tier keeps nothing per user.
  • Move to a shared session store (Redis) when sessions must be revocable immediately or carry more than a token can hold.
  • Sticky sessions are a last resort: they survive one deploy badly and block scale-in. Never store session state in app memory.

Edge and Traffic Rules

  • L4 balances connections, L7 balances requests. HTTP/2 and HTTP/3 multiplex many streams over one connection, so connection counts understate load; choose the layer by the unit you must route, enforce, or shed.
  • Least connections assumes equal work per unit in flight. For mixed or long-lived requests, weight by measured request cost or track active requests instead.
  • Readiness means "serve this request now" and may depend on required dependencies. Liveness means "this process is broken" and must not. An optional dependency degrades its response and must never eject the fleet; a mandatory one — auth, quota — fails closed for the request instead. Shared blast radius never makes a mandatory check optional.
  • Capacity is what survives failure: admitted demand must fit surviving instances × safe per-instance load after the largest in-scope instance or zone loss. Otherwise shed or degrade at admission rather than claim HA.
  • One retrying layer per chain, with the remaining deadline propagated; caller timeout, queue wait, and retries must fit inside that deadline.
  • Gateway authentication and quota enforcement fail closed when their dependency is unreachable; only optional enrichment may pass through degraded.
  • Rate limit at the edge by identity and by cost class; return a retry hint the client can honor.

Anti-Patterns

  • No component without a constraint: a box that solves no stated problem gets removed.
  • No cache as a correctness fix: caching hides a slow query; fix the query, then cache.
  • No queue without a consumer budget: define drain rate and DLQ before shipping.
  • No shared mutable session in app memory: it blocks horizontal scaling.
  • No HA from instance count: redundancy that cannot carry the load after a failure is cost, not a guarantee.

References

  • Building Blocks Detail - per-component decisions, health detection and drain, failure capacity, gateway authority, limiter atomicity, stream bounds
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →

More from Multi-Language Standards

View source →
typescript-best-practicesWrite idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic.27 installscavemanUltra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.25 installsphp-securityPHP-only security standards for database access, password handling, and input validation. Use when securing PHP apps against SQL injection, XSS, or weak password storage; defer Laravel middleware and security questions in other languages.14 installscommon-security-auditProbe for hardcoded secrets, injection surfaces, unguarded routes, business logic flaws, and platform-specific weaknesses across backend (Node, Go, Java, Python, Rust), frontend (React, Angular, Vue), and mobile (iOS, Android, Flutter) codebases. Use when performing security audits, vulnerability scans, secrets detection, or penetration testing.11 installsandroid-performanceOptimize Android app startup, UI rendering, frame stability, and benchmark performance with Baseline Profiles, Macrobenchmark, and lazy initialization. Use when reducing startup time, diagnosing jank, or measuring rendering; defer Compose state API and test-only questions.10 installsnextjs-architectureStructure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy. Use when organizing features into FSD layers, enforcing slice boundaries, or keeping page.tsx thin.9 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.648 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.550 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.359 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.260 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.183 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions147 installs

Frequently asked questions about system-design-building-blocks

What does the system-design-building-blocks skill do?

Select infrastructure components by the constraint each removes: load balancers, caches and invalidation, queues and pub/sub, CDN, API gateway, rate limiting, consistent hashing. Use when choosing cache, queue, replica, or edge layers; defer engine tuning to the database category. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the system-design-building-blocks skill?

Run `npx @skills-hub-ai/cli install multi-language-standards-system-design-building-blocks` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/multi-language-standards-system-design-building-blocks/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does system-design-building-blocks work with?

system-design-building-blocks runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the system-design-building-blocks skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use system-design-building-blocks after installing it?

In Claude Code, type `/multi-language-standards-system-design-building-blocks` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the system-design-building-blocks skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.