Files
everything-claude-code/rules/zh/patterns.md
xingzihai da74f85c10 fix: address review feedback from PR #929
- Add missing code-review.md and development-workflow.md to zh/README.md directory listing
- Add mkdir -p command before copy in manual install instructions
- Fix TypeScript test command path in SKILL-DEVELOPMENT-GUIDE.md
- Add Anti-Patterns section to SKILL.md template
- Add Template category to Skill Categories table in CONTRIBUTING.md
- Add Pre-Review Requirements section to code-review.md (both en and zh)
- Add Pre-Review Checks step to development-workflow.md (both en and zh)
- Add trailing newlines to all files that were missing them
2026-03-26 04:37:08 +00:00

32 lines
872 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 常用模式
## 骨架项目
实现新功能时:
1. 搜索久经考验的骨架项目
2. 使用并行代理评估选项:
- 安全性评估
- 可扩展性分析
- 相关性评分
- 实现规划
3. 克隆最佳匹配作为基础
4. 在经验证的结构内迭代
## 设计模式
### 仓储模式
将数据访问封装在一致的接口后面:
- 定义标准操作findAll、findById、create、update、delete
- 具体实现处理存储细节数据库、API、文件等
- 业务逻辑依赖抽象接口,而非存储机制
- 便于轻松切换数据源,并简化使用模拟的测试
### API 响应格式
对所有 API 响应使用一致的信封:
- 包含成功/状态指示器
- 包含数据负载(错误时可为空)
- 包含错误消息字段(成功时可为空)
- 包含分页响应的元数据total、page、limit