agentleFS
sumuligesumulige/sumulige-claude/.claude/skills/design-brain/SKILL.md

design-brain

Skill2 starsChanged 10 months agoMITView on GitHub

设计大脑 - 合并: planner + architect-design 统一处理设计和规划工作: ┌─────────────┐ ┌─────────────┐ │ Component A │────▶│ Component B │ └─────────────┘ └─────────────┘ 原则:好的设计是演进出来的。保持简单,按需扩展。先规划后动手。

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Design Brain

设计大脑 - 合并: planner + architect-design

核心职责

统一处理设计和规划工作:

  1. 需求分析 - 理解和澄清需求
  2. 架构设计 - 系统设计、技术选型
  3. 实现规划 - 步骤分解、风险评估

工作模式

模式 1:快速规划(默认)

触发:一般任务
输出:简洁的实现步骤
耗时:< 2 分钟

模式 2:深度设计

触发:--deep 或复杂架构决策
输出:完整设计文档
耗时:5-10 分钟

快速规划流程

1. 理解需求(30s)
   - 核心目标是什么?
   - 有哪些约束?

2. 识别依赖(30s)
   - 需要修改哪些文件?
   - 需要什么外部包?

3. 制定步骤(1min)
   - 分解为可验证的小步骤
   - 确定步骤顺序

深度设计流程

1. 需求分析(2min)
   - 功能需求
   - 非功能需求(性能、安全、可用性)
   - 边界条件

2. 架构设计(3min)
   - 组件划分
   - 接口定义
   - 数据流设计

3. 技术选型(2min)
   - 框架/库选择
   - 权衡分析

4. 实现规划(3min)
   - 详细步骤
   - 风险评估
   - 测试策略

输出格式

快速规划

# Plan: [功能名称]

## Goal
[一句话描述]

## Steps
1. [ ] [步骤 1]
2. [ ] [步骤 2]
3. [ ] [步骤 3]

## Files
- `path/to/file.ts` - [修改内容]

## Risk
- [主要风险] → [缓解策略]

深度设计

# Design: [系统/功能名称]

## Overview
[背景和目标]

## Architecture

### Components

┌─────────────┐ ┌─────────────┐ │ Component A │────▶│ Component B │ └─────────────┘ └─────────────┘


### Data Flow
[数据如何流动]

## Technical Decisions

### Decision 1: [名称]
- **Choice**: [选择]
- **Reason**: [原因]
- **Alternatives**: [备选方案]
- **Trade-offs**: [权衡]

## Implementation Plan

### Phase 1: [阶段名]
1. [ ] Step 1
2. [ ] Step 2

### Phase 2: [阶段名]
...

## Risks
| Risk | Impact | Mitigation |
|------|--------|------------|

## Success Criteria
- [ ] 标准 1
- [ ] 标准 2

设计原则

1. 简单优于复杂

能用简单方案就不要复杂化
避免过度设计
YAGNI - 不需要的就不做

2. 最小变更

优先复用现有代码
避免不必要的重构
保持向后兼容

3. 可测试性

每个步骤都可验证
定义清晰的成功标准
考虑自动化测试

常用设计模式

场景推荐模式
数据访问Repository
业务逻辑Service Layer
对象创建Factory
算法切换Strategy
事件驱动Observer
UI 组件Compound Components

使用方式

# 快速规划(默认)
/plan

# 深度设计
/plan --deep

# 仅架构设计
/plan --arch

原则:好的设计是演进出来的。保持简单,按需扩展。先规划后动手。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.