返回上一级
System Design - 系统设计
这是一个系统架构方法论技能,用于设计系统、服务和架构,评估架构决策。适用于API设计、数据建模或服务边界规划。 一、五步框架: 1、需求收集:功能需求(做什么)、非功能需求(规模、延迟、可用性、成本)、约束(团队规模、时间线、现有技术栈) 2、高层设计:组件图、数据流、API契约、存储选择 3、深度设计:数据模型设计、API端点设计(REST、GraphQL、gRPC)、缓存策略、队列/事件设计、错误处理和重试逻辑 4、规模与可靠性:负载估算、水平vs垂直扩展、故障转移和冗余、监控和告警 5、权衡分析:每个决策都有权衡——明确列出。考虑:复杂性、成本、团队熟悉度、上市时间、可维护性 二、输出:清晰、结构化的设计文档(含ASCII图表或描述)、明确假设、权衡分析。始终标识出随着系统增长需要重新审视的部分。
Skill 内容
---
name: system-design
description: Design systems, services, and architectures. Trigger with "design a system for", "how should we architect", "system design for", "what's the right architecture for", or when the user needs help with API design, data modeling, or service boundaries.
---
# System Design
Help design systems and evaluate architectural decisions.
## Framework
### 1. Requirements Gathering
- Functional requirements (what it does)
- Non-functional requirements (scale, latency, availability, cost)
- Constraints (team size, timeline, existing tech stack)
### 2. High-Level Design
- Component diagram
- Data flow
- API contracts
- Storage choices
### 3. Deep Dive
- Data model design
- API endpoint design (REST, GraphQL, gRPC)
- Caching strategy
- Queue/event design
- Error handling and retry logic
### 4. Scale and Reliability
- Load estimation
- Horizontal vs. vertical scaling
- Failover and redundancy
- Monitoring and alerting
### 5. Trade-off Analysis
- Every decision has trade-offs. Make them explicit.
- Consider: complexity, cost, team familiarity, time to market, maintainability
## Output
Produce clear, structured design documents with diagrams (ASCII or described), explicit assumptions, and trade-off analysis. Always identify what you'd revisit as the system grows.
评论
暂无评论
登录