Skip to contentSkip to content

AI Skills

┌─────────────────────────────────────────────────────────┐
│  SYSTEM DESIGN ADVISOR v1.0.0                           │
│                                                         │
│  > 6 skills    > 24 reference files   > 31 chapters     │
│  > Claude Code + Cursor support                         │
│                                                         │
│  $ claude /system-design-advisor                        │
└─────────────────────────────────────────────────────────┘

31 chapters of system design and design patterns knowledge — distilled into AI coding assistant skills. Get real-time architectural guidance, generate design plans, review your codebase, and visualize architectures with Mermaid diagrams.

All skills ask clarifying questions before responding — ensuring answers are tailored to your specific scale, constraints, and context.

Which Skill When?

📚 Learning / Studying
  → /system-design-advisor"Explain CAP theorem"
  → /design-patterns-advisor"When to use Factory vs Builder?"

🏗️ Building a New System
  → /design-plan-generator"Design a chat system for 10M DAU"
  → /pattern-implementation-guide"Implement CQRS for my order service"

🔍 Reviewing Existing Code
  → /architecture-reviewer"Is my system scalable?"
  → /code-pattern-reviewer"Review my code for anti-patterns"

❓ Making a Decision
  → /system-design-advisor"SQL or NoSQL for my use case?"
  → /design-patterns-advisor"Strategy vs State pattern?"

Available Skills

/system-design-advisor

Answer system design questions. Ask about scalability, databases, caching, CAP theorem, load balancing, microservices, or any distributed systems concept. Get structured answers with trade-off tables, recommendations, key numbers, and Mermaid architecture diagrams.

Asks about your scale, access pattern, and constraints when context is missing. Skips for conceptual questions.

Example prompts:

  • "Should I use SQL or NoSQL for my use case?"
  • "Explain the trade-offs between push and pull fan-out"
  • "When should I add a message queue?"

/design-plan-generator

Generate complete system design plans. Uses the 4-step framework (Requirements → Estimation → High-Level Design → Deep Dive) to produce structured plans with Mermaid architecture diagrams, data models, and scaling strategies.

Always asks 2-5 scoping questions first — target DAU, read/write ratio, consistency model, tech constraints — then generates a tailored plan.

Example prompts:

  • "Design a URL shortener"
  • "Architect a real-time chat messaging system"
  • "Plan a video streaming platform"

/architecture-reviewer

Auto-scan and review your project architecture. Reads your project configuration, identifies components, and evaluates against scalability, reliability, security, and observability checklists. Outputs a findings table with severity and recommendations.

Gathers context about your scale targets, top concerns, and SLA before scanning. Say "just scan it" to skip.

Example prompts:

  • "Review my architecture"
  • "Is my system scalable?"
  • "What are the bottlenecks in this project?"

/design-patterns-advisor

Answer design pattern questions. Covers GoF (creational, structural, behavioral), modern application patterns, distributed system patterns, and anti-patterns. Includes Mermaid class diagrams showing pattern structure and relationships.

Example prompts:

  • "When should I use Factory vs Builder?"
  • "Explain the Observer pattern with a diagram"
  • "What pattern fixes my giant switch statement?"

/pattern-implementation-guide

Generate pattern implementation plans. Analyzes your problem, selects the right pattern(s), and produces step-by-step implementation with code examples and Mermaid class/component diagrams.

Example prompts:

  • "Implement Strategy pattern for payment processing"
  • "Add CQRS to my order service"
  • "Refactor this God Object using patterns"

/code-pattern-reviewer

Auto-scan code for pattern opportunities. Identifies anti-patterns (God Object, Spaghetti Code), suggests pattern improvements, and checks for design principle violations.

Example prompts:

  • "Review my code for design patterns"
  • "Is this a good use of Singleton?"
  • "What patterns could improve this codebase?"

Installation

bash
# Add marketplace & install
claude plugin marketplace add bachdx2812/system-design-advisor
claude plugin install system-design-advisor

After installing, invoke with /system-design-advisor:system-design-advisor, /system-design-advisor:design-plan-generator, etc.

Claude Code (global skills)

bash
# One-line install (or update)
bash <(curl -s https://raw.githubusercontent.com/bachdx2812/system-design-advisor/main/install.sh)

Or manually:

bash
git clone https://github.com/bachdx2812/system-design-advisor.git
cd system-design-advisor && bash install.sh

After installing, invoke with /system-design-advisor, /design-plan-generator, /architecture-reviewer, /design-patterns-advisor, /pattern-implementation-guide, or /code-pattern-reviewer.

Quick Install (Cursor)

bash
git clone https://github.com/bachdx2812/system-design-advisor.git
cd system-design-advisor && bash install-cursor.sh

Update Existing Installation

bash
cd system-design-advisor && git pull && bash install.sh

Rules auto-activate based on your prompts — no manual invocation needed.

Knowledge Base

The skills are powered by distilled knowledge from all 31 chapters of this handbook:

System Design (25 chapters)

Reference FileChaptersTopics
fundamentals-and-estimationCh 01–04Scalability, CAP, estimation formulas, latency numbers
dns-and-load-balancingCh 05–06DNS routing, L4 vs L7, LB algorithms
caching-and-cdnCh 07–08Cache strategies, invalidation, CDN push/pull
databasesCh 09–10SQL vs NoSQL, indexing, sharding, replication
queues-and-protocolsCh 11–12Kafka/RabbitMQ/SQS, REST/GraphQL/gRPC
architecture-patternsCh 13–17Microservices, event-driven, security, monitoring
case-studiesCh 18–22URL shortener, social feed, chat, video, ride-sharing, crawler, file sync
modern-and-interviewCh 23–25Cloud-native, ML systems, interview framework
search-and-indexingExtendedInverted index, trie, BM25, Elasticsearch, autocomplete, web crawler
real-time-and-streamingExtendedWebRTC, SFU/MCU, Flink, time-series DBs, stream processing
storage-and-infrastructureExtendedObject storage, HDFS, file sync, config mgmt, LSM-tree, OLAP, ELK
specialized-systemsExtendedUnique IDs, distributed locks, payments, stock exchange, game networking
recommendation-and-ml-systemsExtendedCollaborative/content-based filtering, two-tower model, feature store, fraud, ads
data-processing-and-analyticsExtendedMapReduce, Spark, Flink, windowing, ETL, data warehouse, lambda/kappa
authentication-and-security-deep-diveExtendedJWT, OAuth 2.0, SSO, SAML/OIDC, mTLS, RBAC/ABAC, rate limiting
low-level-design-patternsExtendedSOLID, parking lot, vending machine, elevator, leaderboard, LRU cache
collaborative-and-multi-tenantExtendedCRDTs vs OT, Yjs/Automerge, tenant isolation, usage metering, subscription billing
operational-troubleshootingExtendedRedis debugging/cluster, Kafka consumer lag, Postgres, ES health, S3 multipart, migrations

Design Patterns (6 chapters)

Reference FileChaptersTopics
foundations-creationalCh 01Factory, Abstract Factory, Builder, Singleton, Prototype
structural-patternsCh 02Adapter, Decorator, Facade, Proxy, Composite, Bridge
behavioral-patternsCh 03Observer, Strategy, Command, Chain of Responsibility, State
modern-applicationCh 04Repository, DI, Middleware, Circuit Breaker, Retry
distributed-systemsCh 05CQRS, Event Sourcing, Saga, Strangler Fig, Sidecar
anti-patterns-guideCh 06Anti-patterns, decision matrix, 27-pattern cheat sheet

Quality Validation

Tested across 4 rounds with 3 test methods: reference coverage (100 problems), live response generation (20 problems), and end-to-end workflow simulation (4 scenarios). Each round identified gaps, fixed them, and retested.

Test Methodology

How we tested

1. Reference Coverage Tests (Rounds 1-3) Each of 100 system design problems evaluated against the reference files:

  • Does the reference cover this topic? (Yes / Partial / No)
  • Accuracy (1-5): Is the information correct?
  • Actionability (1-5): Can you build a design from this alone?

2. Live Response Generation (Round 4) The skill reads its SKILL.md + relevant references, then generates a full response as if answering a real user. The response is scored on:

  • Accuracy, Completeness, Actionability (1-5 each)
  • Diagram Quality (1-5): Is the Mermaid diagram useful?
  • Practical Value (1-5): Would a senior engineer agree?

3. Workflow E2E Tests (Round 4) Simulates chaining multiple skills in sequence (e.g., reviewer → advisor → implementation guide) and evaluates cross-skill coherence, redundancy, and handoff quality.

Improvement Across 5 Rounds

MetricR1 (8 refs)R2 (12 refs)R3 (16 refs)R4 (23 refs)R5 (24 refs)
Sys Design Avg3.08/54.18/54.41/54.88/54.7/5
Pattern Avg4.88/54.1/5
Full Coverage31%61%80%95%100%
Zero-Coverage25%5%2%0%0%
Reference Files812162324

R5 new test problems: collaborative editing, multi-tenant billing, distributed scheduler, Redis split-brain, ES cluster health, S3 multipart uploads, event ordering, inheritance flattening, resilience composition, plugin architecture — all previously uncovered, now scored 4.0+ after fixes.

Round 4 Live Test Results

Skills generated full responses to 10 system design + 10 design pattern problems. Each response included trade-off tables, recommendations, Mermaid diagrams, and key numbers.

System Design — Sample Problems & Scores

ProblemTypeAccuracyCompletenessPractical
Kafka vs RabbitMQ for 10K orders/dayInterview555
Social Feed data model + caching (50M DAU)Interview555
URL Shortener 100M URLs/day, <50ms p99Interview555
Postgres at 90% CPU, 50M rows — scale without downtimeReal-world555
Idempotent payment webhook (Stripe duplicates)Real-world555
3 microservices deadlocking on shared PostgresReal-world555
API p99 spike 50ms→2s after adding 3 external callsReal-world555
WebSocket vs SSE for chat (1:1 + groups)Interview555
Push vs pull fan-out for notificationsInterview555
Distributed rate limiting across 20 serversInterview555

Overall: 4.88/5 — Interview questions: 4.76, Real-world scenarios: 5.0

Example response: "Postgres at 90% CPU, 50M rows, 5K QPS reads"

Phase 1: Quick Wins (hours, no downtime)

  1. Add indexes: CREATE INDEX CONCURRENTLY idx_user_id ON table(user_id);
  2. Covering indexes: INCLUDE (col1, col2) for zero heap lookup
  3. Connection pooling: PgBouncer in transaction mode

Phase 2: Add Caching (days)

  • Redis cache-aside: hot 20% users serve 80% reads
  • DB drops from 5K QPS to ~500 QPS (90%+ cache hit)

Phase 3: Read Replicas

  • Streaming replication, route reads to replicas
  • Replication lag typically <100ms

Decision flowchart (Mermaid): 90% CPU → indexes optimized? → connection pooling? → read-heavy? → cache → still hot? → replicas

Key insight: 50M rows is well within single Postgres capacity — don't shard yet.

Scored 5/5 on all criteria. Phased approach matches exactly what a senior DBA would recommend.

Design Patterns — Sample Problems & Scores

ProblemTypeAccuracyCompletenessPractical
Factory Method vs Abstract FactoryInterview555
Observer + pub/sub with diagramInterview555
Strategy for payment processingInterview555
Saga orchestration for checkout (TypeScript)Real-world555
God Object → Facade + Strategy refactoringReal-world545
Circuit Breaker for flaky external APIReal-world555
CQRS for read-heavy analytics dashboardReal-world555

Overall: 4.88/5 — Every response included Mermaid diagrams (class, sequence, or flowchart).

Workflow E2E Tests

Tested 4 scenarios simulating real user workflows across multiple skills:

ScenarioSkills ChainedCoherenceRedundancyScore
Interview Prepadvisor → plan-generator → advisor544.3
E-Commerce Checkoutplan-generator → patterns-advisor → implementation-guide534.5
Legacy Code Improvementcode-reviewer → patterns-advisor → implementation-guide → arch-reviewer534.5
Rapid Decision-Making4 quick A-vs-B questions453.5

Overall: 4.2/5 — Main issue: pattern re-explained across skill chain. Fixed with context-awareness instructions in R4.

Coverage by Domain

DomainStrengthExample Problems
Social/Feed/ChatStrongNews Feed, Twitter, Chat, Instagram
Caching/CDN/LBStrongDistributed Cache, CDN, Load Balancer
Databases/StorageStrongSQL vs NoSQL, Sharding, Replication
Video StreamingStrongYouTube, Netflix, Video Platform
Operational DebuggingStrongRedis SLOWLOG, Kafka lag, Postgres locks
GeospatialGoodRide Sharing, Nearby Friends, Maps
Search/IndexingGoodAutocomplete, Elasticsearch, Web Crawler
Real-Time MediaGoodWebRTC, Video Conferencing, Voice Chat
Financial SystemsGoodPayments, Digital Wallet, Stock Exchange
Design PatternsStrongGoF, Modern, Distributed (Go + TypeScript examples)

All 100 System Design Problems Tested

View complete problem list

Beginner (1-20): Rate Limiter, URL Shortener, Pastebin, Key-Value Store, Web Crawler, Unique ID Generator, Notification System, Authentication, Todo App, Vending Machine, Parking Lot, Leaderboard, CDN, Distributed Cache, Load Balancer, Message Queue, Search Typeahead, Hotel Booking, Distributed Lock, Simple Chat

Intermediate (21-60): News Feed, Chat System, Search Autocomplete, Video Streaming, Ride Sharing, Recommendation Engine, File Sharing, Social Network, E-commerce, Metrics Monitoring, Ad Click Aggregation, Logging System, Distributed Message Queue, Payment System, Digital Wallet, Stock Exchange, Gaming Leaderboard, Email Service, Proximity Service, Nearby Friends, Search Engine, Meeting Room Booking, Instagram Feed, Facebook Timeline, Pinterest, Slack Clone, Discord, Spotify, Dropbox, Airbnb, Uber Eats, Amazon Fresh, Snapchat, TikTok, Zoom, GitLab/GitHub, Stack Overflow, Quora, Medium, YouTube

Advanced (61-80): Google Maps, Distributed File System, NoSQL Database, Distributed Transaction, Event Sourcing, CQRS, Search System, Data Warehouse, Real-time Analytics, ML Pipeline, Advanced Recommendation, Stock Ticker, Multiplayer Game, Live Commenting, Online Judge, Cloud Storage, Blockchain, API Gateway, Service Mesh, Config Management

Expert (81-100): Distributed Tracing, APM Monitoring, Fraud Detection, Content Moderation, Distributed Rate Limiter, Circuit Breaker, Batch Processing, Stream Processing, Distributed Web Crawler, Search Index, YouTube Recommendation, Google Search, Twitter at Scale, Facebook Ads, Netflix Recommendation, Distributed Database, Real-time Data Warehouse, Autonomous Vehicle Platform, FinTech Trading, Global Mesh Network

Design Pattern Problems Tested

View pattern problems (40 total)

GoF Basics (20): Factory Method, Singleton vs static class, Observer + diagram, Strategy for payments, Adapter vs Facade, Builder vs telescoping constructor, Decorator for logging, Command + undo, Proxy types, Template Method for pipelines, Switch → Factory, Event decoupling, Open/Closed with Decorator, 15 constructor params, Tree traversal with Composite, Undo/redo with Command, Validation chain, Abstract Factory for DB adapters, Lazy caching, Interface adaptation

Real-World Patterns (20): Saga for distributed checkout, Circuit Breaker implementation, CQRS for read-heavy service, God Object decomposition, Event Sourcing for audit trail, Outbox pattern for reliable events, DI container setup, Middleware pipeline, Plugin architecture, Functional composition, Repository pattern, Options pattern in Go/TS, Anti-corruption layer, Bulkhead isolation, Feature flags, State machine for orders, Mediator for UI components, Flyweight for game objects, Memento for editor state, Iterator for paginated API

What Each Round Fixed

RoundRefsKey Improvements
R18Initial coverage — fundamentals, building blocks, architecture, case studies
R212Added search/indexing, real-time/streaming, storage, specialized systems
R316Added auth/security, low-level design, recommendations/ML, data processing
R423Added 6 design pattern refs + operational troubleshooting, TypeScript examples, context-aware workflows

Source Code

View on GitHub →

Last updated:

Comments powered by Giscus. Enable GitHub Discussions on the repo to activate.

Built with VitePress + Dracula Theme