关于 sc-design
sc-design 是用于系统与组件设计的技能,面向规划架构、API、组件接口和数据库的开发者。它可按指定类型与格式生成规格、图表或代码,并支持借助 PAL MCP 分析验证设计及通过 Rube MCP 分享文档。
主要功能
- 01设计架构、API、组件和数据库
- 02生成图表、规格或代码
- 03分析需求并验证设计
- 04可用 PAL MCP 进行规划与共识验证
- 05可用 Rube MCP 分享文档和协作
适用场景
- 01规划系统架构与服务边界
- 02编写 API 规格和请求响应模式
- 03设计组件接口或数据库结构
- 04将设计文档分享至协作工具
MCP 相关
可选用 PAL MCP 工具进行规划、深入分析和设计共识验证。可通过 Rube MCP 搜索外部工具、分享设计文档并建立工作流。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ tony363/ superclaude --skill sc-design安装后在 Claude Code 中输入/sc-design确认已加载。
详细介绍
系统与组件设计技能
基于行业最佳实践进行架构规划和接口设计。
快速开始
# Architecture design
/sc:design [target] --type architecture
# API specification
/sc:design payment-api --type api --format spec
# Database schema
/sc:design e-commerce --type database --format diagram
行为流程
- 分析 - 检查需求和现有系统上下文
- 规划 - 根据类型和格式确定设计方案
- 设计 - 运用最佳实践创建规范
- 验证 - 确保可维护性和可扩展性
- 文档化 - 生成图表和规范
标志
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
--type | 字符串 | architecture | architecture、api、component、database |
--format | 字符串 | spec | diagram、spec、code |
证据要求
此技能不要求提供确凿证据。交付物包括:
- 设计规范和图表
- 接口定义
- 架构文档
设计类型
架构(--type architecture)
- 系统结构和组件关系
- 可扩展性与可靠性模式
- 服务边界和通信
API(--type api)
- RESTful/GraphQL 端点设计
- 请求/响应架构
- 身份验证和版本控制
组件(--type component)
- 接口契约和依赖项
- 状态管理模式
- 集成点
数据库(--type database)
- 实体关系和约束
- 规范化和索引
- 性能考量
输出格式
图表(--format diagram)
- ASCII 或 Mermaid 图表
- 组件关系可视化
- 数据流表示
规范(--format spec)
- API 的 OpenAPI/Swagger
- 详细的接口文档
- 技术要求
代码(--format code)
- 接口定义
- 类型声明
- 骨架实现
示例
系统架构
/sc:design user-management --type architecture --format diagram
# Component relationships, data flow, scalability patterns
API 设计
/sc:design payment-api --type api --format spec
# OpenAPI spec with endpoints, schemas, auth patterns
组件接口
/sc:design notification-service --type component --format code
# TypeScript/Python interfaces with clear contracts
数据库架构
/sc:design inventory-db --type database --format diagram
# ER diagrams with relationships and constraints
MCP 集成
PAL MCP(设计验证)
| 工具 | 使用时机 | 用途 |
|---|---|---|
mcp__pal__planner | 架构规划 | 针对设计决策进行带分支的顺序规划 |
mcp__pal__consensus | 设计决策 | 使用多个模型验证架构选择 |
mcp__pal__thinkdeep | 复杂系统 | 深入分析系统需求 |
mcp__pal__chat | 集思广益 | 协作探索设计方案 |
mcp__pal__apilookup | API 标准 | 获取最新的 API 设计最佳实践 |
PAL 使用模式
# Architecture planning
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?"
)
# 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"]
)
Rube MCP(文档与协作)
| 工具 | 使用时机 | 用途 |
|---|---|---|
mcp__rube__RUBE_SEARCH_TOOLS | 外部工具 | 查找绘图和文档工具 |
mcp__rube__RUBE_MULTI_EXECUTE_TOOL | 分享设计 | 发布到 Notion、Confluence、Slack |
mcp__rube__RUBE_CREATE_UPDATE_RECIPE | 设计工作流 | 保存可复用的设计流程 |
Rube 使用模式
# Create design document in 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..."
}}
])
# 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"
}}
])
标志(扩展)
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
--pal-plan | 布尔值 | false | 使用 PAL planner 进行系统化设计 |
--consensus | 布尔值 | false | 使用多模型共识验证设计 |
--share | 字符串 | - | 通过 Rube 分享(notion、confluence、slack) |
--create-ticket | 布尔值 | false | 通过 Rube 创建评审工单 |
工具协调
- Read - 需求分析
- Grep/Glob - 模式分析
- Write - 设计文档
- Bash - 外部工具集成
- PAL MCP - 设计规划、共识验证、深入分析
- Rube MCP - 文档分享、协作、评审工作流
评论
支持 Markdown