CursorPool
← 返回首页

cursor-rules-pack

20

7 条经生产验证的 Cursor Rules,涵盖依赖管理、错误处理、状态管理、webhook 安全等,是完整 50 条规则包的免费样例。

4 条规则

## Parallel Data Fetching Pattern
```typescript
// ✅ Parallel — ~90ms total
const [user, posts, analytics] = await Promise.all([
  getUser(userId),
  getPosts(userId),
  getAnalytics(userId),
])

// ❌ Sequential — ~230ms total
const user = await getUser(userId)
const posts = await getPosts(userId)
const analytics = await getAnalytics(userId)
```

## Error Result Pattern
Return typed errors instead of throwing everywhere:
```typescript
type Result<T> = { ok: true; data: T } | { ok: false; error: string }
```