sc-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSystem & Component Design Skill
系统与组件设计Skill
Architecture planning and interface design with industry best practices.
基于行业最佳实践的架构规划与接口设计。
Quick Start
快速开始
bash
undefinedbash
undefinedArchitecture design
架构设计
/sc:design [target] --type architecture
/sc:design [target] --type architecture
API specification
API 规范
/sc:design payment-api --type api --format spec
/sc:design payment-api --type api --format spec
Database schema
数据库 Schema
/sc:design e-commerce --type database --format diagram
undefined/sc:design e-commerce --type database --format diagram
undefinedBehavioral Flow
行为流程
- Analyze - Examine requirements and existing system context
- Plan - Define design approach based on type and format
- Design - Create specifications with best practices
- Validate - Ensure maintainability and scalability
- Document - Generate diagrams and specifications
- 分析 - 审视需求与现有系统环境
- 规划 - 根据类型与格式定义设计方法
- 设计 - 遵循最佳实践创建规范
- 验证 - 确保可维护性与可扩展性
- 文档化 - 生成图表与规范文档
Flags
标志参数
| Flag | Type | Default | Description |
|---|---|---|---|
| string | architecture | architecture, api, component, database |
| string | spec | diagram, spec, code |
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | architecture | 可选值:architecture、api、component、database |
| 字符串 | spec | 可选值:diagram、spec、code |
Evidence Requirements
证据要求
This skill does NOT require hard evidence. Deliverables are:
- Design specifications and diagrams
- Interface definitions
- Schema documentation
本Skill无需硬性证据。交付物包括:
- 设计规范与图表
- 接口定义
- Schema文档
Design Types
设计类型
Architecture (--type architecture
)
--type architecture架构(--type architecture
)
--type architecture- System structure and component relationships
- Scalability and reliability patterns
- Service boundaries and communication
- 系统结构与组件关系
- 可扩展性与可靠性模式
- 服务边界与通信机制
API (--type api
)
--type apiAPI(--type api
)
--type api- RESTful/GraphQL endpoint design
- Request/response schemas
- Authentication and versioning
- RESTful/GraphQL 端点设计
- 请求/响应 Schema
- 认证与版本控制
Component (--type component
)
--type component组件(--type component
)
--type component- Interface contracts and dependencies
- State management patterns
- Integration points
- 接口契约与依赖关系
- 状态管理模式
- 集成点
Database (--type database
)
--type database数据库(--type database
)
--type database- Entity relationships and constraints
- Normalization and indexing
- Performance considerations
- 实体关系与约束
- 规范化与索引
- 性能考量
Output Formats
输出格式
Diagram (--format diagram
)
--format diagram图表(--format diagram
)
--format diagram- ASCII or Mermaid diagrams
- Component relationship visualization
- Data flow representation
- ASCII 或 Mermaid 图表
- 组件关系可视化
- 数据流展示
Specification (--format spec
)
--format spec规范文档(--format spec
)
--format spec- OpenAPI/Swagger for APIs
- Detailed interface documentation
- Technical requirements
- API 对应的 OpenAPI/Swagger 文档
- 详细的接口文档
- 技术要求
Code (--format code
)
--format code代码(--format code
)
--format code- Interface definitions
- Type declarations
- Skeleton implementations
- 接口定义
- 类型声明
- 骨架实现
Examples
示例
System Architecture
系统架构
/sc:design user-management --type architecture --format diagram/sc:design user-management --type architecture --format diagramComponent relationships, data flow, scalability patterns
组件关系、数据流、可扩展性模式
undefinedundefinedAPI Design
API 设计
/sc:design payment-api --type api --format spec/sc:design payment-api --type api --format specOpenAPI spec with endpoints, schemas, auth patterns
包含端点、Schema、认证模式的 OpenAPI 规范
undefinedundefinedComponent Interface
组件接口
/sc:design notification-service --type component --format code/sc:design notification-service --type component --format codeTypeScript/Python interfaces with clear contracts
具备清晰契约的 TypeScript/Python 接口
undefinedundefinedDatabase Schema
数据库 Schema
/sc:design inventory-db --type database --format diagram/sc:design inventory-db --type database --format diagramER diagrams with relationships and constraints
包含关系与约束的 ER 图
undefinedundefinedMCP Integration
MCP 集成
PAL MCP (Design Validation)
PAL MCP(设计验证)
| Tool | When to Use | Purpose |
|---|---|---|
| Architecture planning | Sequential planning with branching for design decisions |
| Design decisions | Multi-model validation of architectural choices |
| Complex systems | Deep analysis of system requirements |
| Brainstorming | Collaborative design exploration |
| API standards | Get current API design best practices |
| 工具 | 使用场景 | 用途 |
|---|---|---|
| 架构规划 | 为设计决策提供带分支的顺序规划 |
| 设计决策 | 对架构选择进行多模型验证 |
| 复杂系统 | 深度分析系统需求 |
| 头脑风暴 | 协作式设计探索 |
| API 标准 | 获取当前 API 设计最佳实践 |
PAL Usage Patterns
PAL 使用模式
bash
undefinedbash
undefinedArchitecture planning
架构规划
mcp__pal__planner(
step="Designing microservices architecture for e-commerce platform",
step_number=1,
total_steps=4,
more_steps_needed=True
)
mcp__pal__planner(
step="Designing microservices architecture for e-commerce platform",
step_number=1,
total_steps=4,
more_steps_needed=True
)
Validate design with consensus
用共识机制验证设计
mcp__pal__consensus(
models=[
{"model": "gpt-5.2", "stance": "for"},
{"model": "gemini-3-pro", "stance": "against"},
{"model": "deepseek", "stance": "neutral"}
],
step="Evaluate: Should we use event sourcing for the order management system?"
)
mcp__pal__consensus(
models=[
{"model": "gpt-5.2", "stance": "for"},
{"model": "gemini-3-pro", "stance": "against"},
{"model": "deepseek", "stance": "neutral"}
],
step="Evaluate: Should we use event sourcing for the order management system?"
)
Deep system analysis
深度系统分析
mcp__pal__thinkdeep(
step="Analyzing scalability requirements for real-time notification system",
hypothesis="WebSocket with Redis pub/sub will handle 100k concurrent users",
confidence="medium",
focus_areas=["scalability", "reliability", "performance"]
)
undefinedmcp__pal__thinkdeep(
step="Analyzing scalability requirements for real-time notification system",
hypothesis="WebSocket with Redis pub/sub will handle 100k concurrent users",
confidence="medium",
focus_areas=["scalability", "reliability", "performance"]
)
undefinedRube MCP (Documentation & Collaboration)
Rube MCP(文档与协作)
| Tool | When to Use | Purpose |
|---|---|---|
| External tools | Find diagramming, documentation tools |
| Share designs | Post to Notion, Confluence, Slack |
| Design workflows | Save reusable design processes |
| 工具 | 使用场景 | 用途 |
|---|---|---|
| 外部工具调用 | 查找绘图、文档工具 |
| 设计分享 | 发布至 Notion、Confluence、Slack |
| 设计工作流 | 保存可复用的设计流程 |
Rube Usage Patterns
Rube 使用模式
bash
undefinedbash
undefinedCreate design document in Notion
在 Notion 中创建设计文档
mcp__rube__RUBE_SEARCH_TOOLS(queries=[
{"use_case": "create notion page", "known_fields": "database:Architecture"}
])
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "NOTION_CREATE_PAGE", "arguments": {
"title": "Payment API Design v2",
"content": "## Overview\n..."
}}
])
mcp__rube__RUBE_SEARCH_TOOLS(queries=[
{"use_case": "create notion page", "known_fields": "database:Architecture"}
])
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "NOTION_CREATE_PAGE", "arguments": {
"title": "Payment API Design v2",
"content": "## Overview\n..."
}}
])
Share design for review
分享设计以供评审
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
"channel": "#architecture",
"text": "New design ready for review: Payment API v2"
}},
{"tool_slug": "JIRA_CREATE_ISSUE", "arguments": {
"project": "ARCH",
"summary": "Review: Payment API Design",
"issue_type": "Task"
}}
])
undefinedmcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
"channel": "#architecture",
"text": "New design ready for review: Payment API v2"
}},
{"tool_slug": "JIRA_CREATE_ISSUE", "arguments": {
"project": "ARCH",
"summary": "Review: Payment API Design",
"issue_type": "Task"
}}
])
undefinedFlags (Extended)
扩展标志参数
| Flag | Type | Default | Description |
|---|---|---|---|
| bool | false | Use PAL planner for systematic design |
| bool | false | Validate design with multi-model consensus |
| string | - | Share via Rube (notion, confluence, slack) |
| bool | false | Create review ticket via Rube |
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 布尔值 | false | 使用 PAL planner 进行系统化设计 |
| 布尔值 | false | 通过多模型共识验证设计 |
| 字符串 | - | 通过 Rube 分享至指定平台(notion、confluence、slack) |
| 布尔值 | false | 通过 Rube 创建评审工单 |
Tool Coordination
工具协同
- Read - Requirements analysis
- Grep/Glob - Pattern analysis
- Write - Design documentation
- Bash - External tool integration
- PAL MCP - Design planning, consensus validation, deep analysis
- Rube MCP - Documentation sharing, collaboration, review workflows
- Read - 需求分析
- Grep/Glob - 模式分析
- Write - 设计文档编写
- Bash - 外部工具集成
- PAL MCP - 设计规划、共识验证、深度分析
- Rube MCP - 文档分享、协作、评审工作流