pluginagentmarketplace/custom-plugin-cloudflare
custom-plugin-cloudflare
skills/system-design/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-cloudflare/blob/main/skills/system-design/SKILL.md -a claude-code --skill system-designInstallation paths:
.claude/skills/system-design/# System Design Skill
## Quick Reference
| Pattern | Best For | Complexity | Scaling |
|---------|----------|------------|---------|
| **Monolith** | Startups, MVPs | Low | Limited |
| **Microservices** | Large teams | High | Excellent |
| **Serverless** | Event-driven | Medium | Auto |
| **Event-Driven** | High throughput | High | Excellent |
---
## Scalability Progression
```
Level 1: Single Server
│
▼ Bottleneck: CPU/Memory
Level 2: Load Balancer + Multiple Servers
│
▼ Bottleneck: Database reads
Level 3: Caching Layer (Redis)
│
▼ Bottleneck: Database writes
Level 4: Read Replicas
│
▼ Bottleneck: Single DB limits
Level 5: Sharding / Partitioning
│
▼ Bottleneck: Cross-shard queries
Level 6: CQRS + Event Sourcing
```
---
## Architecture Decision Tree
```
What's your team size and product stage?
│
├─► Team < 10, product unclear
│ └─► Monolith (start simple)
│
├─► Team > 10, clear domain boundaries
│ └─► Microservices
│
├─► Variable workloads, pay-per-use
│ └─► Serverless
│
└─► High throughput, async workflows
└─► Event-Driven
```
---
## API Design
### REST Best Practices
```
GET /api/v1/users # List
GET /api/v1/users/{id} # Get
POST /api/v1/users # Create
PUT /api/v1/users/{id} # Replace
PATCH /api/v1/users/{id} # Update
DELETE /api/v1/users/{id} # Delete
GET /api/v1/users/{id}/orders # Nested
```
### HTTP Status Codes
| Code | Meaning | Use When |
|------|---------|----------|
| 200 | OK | GET/PUT/PATCH success |
| 201 | Created | POST success |
| 204 | No Content | DELETE success |
| 400 | Bad Request | Invalid input |
| 401 | Unauthorized | No/invalid auth |
| 403 | Forbidden | No permission |
| 404 | Not Found | Resource missing |
| 429 | Too Many Requests | Rate limited |
| 500 | Server Error | Server failure |
---
## Database Selection
| Use Case | Best Choice | Notes |
|----------|-------------|-------|
| Transactions | Po