Skip to content
Back to skills

Design Review

ASecurity

Use when reviewing implementation plans for anti-patterns.

  • 23 stars
  • 0 votes
  • 1 copy
  • 4 views
  • Added September 3, 2026
developmentrustgoapisecurityperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add dean0x/devflow --skill design-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dean0x-design-review/badge)](https://www.skillsdirectory.com/skills/dean0x-design-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-review
description: Use when reviewing implementation plans for anti-patterns.
user-invocable: false
allowed-tools: Read, Grep, Glob
---

# Design Review

## Iron Law

> **CATCH IT IN THE PLAN, NOT IN THE PR**
>
> A plan that implies N+1 queries will produce N+1 queries. A plan that omits error
> handling will produce code with no error handling. Review the plan as rigorously as
> the code: every implementation decision follows it.

## Anti-Pattern Detection Rules

A concrete case is an external call in this change, a stated or measured hot path, or a repeated delivery.

### 1. N+1 Queries

**What to look for in a plan:**
- Steps that fetch a list, then loop to fetch related data per item
- "For each X, get Y" or "Display X with Y" language, with no JOIN or batch fetch named

**How to flag:**
```
[N+1 RISK] Step {N}: "{quoted plan text}" — fetches {entity} per iteration.
Resolution: Replace loop with batch query: {proposed batch operation}.
```

**Suggest:** collect the IDs first and batch-fetch the related rows in one query, or eager-load them (JOIN) in the list query.

### 2. God Functions

**What to look for in a plan:**
- Single step handling more than 3 distinct responsibilities
- "Validate AND process AND notify AND log AND update" in one step
- Steps described as "the main handler" that touch multiple subsystems
- No one-sentence description of what the function does

**How to flag:**
```
[GOD FUNCTION RISK] Step {N}: "{quoted plan text}" — handles {n} responsibilities.
Resolution: Split into: {responsibility 1} → {responsibility 2} → {responsibility 3}.
```

**Suggest:** one purpose per function; move notification, logging and other side effects to their own functions, and compose them at the service layer.

### 3. Missing Parallelism

**What to look for in a plan:**
- Sequential steps with no data dependency between them ("First do A, then B, then C")
- Multiple external API calls or DB queries listed sequentially
- Fan-out operations (notify all users, update all records) without parallel mention

**How to flag:**
```
[SEQUENTIAL BOTTLENECK] Steps {N}-{M}: "{quoted steps}" — no dependency between them.
Resolution: Execute {step A} and {step B} in parallel: {proposed parallel pattern}.
```

**Suggest:** run independent steps in parallel (`Promise.all`, goroutines, `asyncio.gather`), and name the steps that must stay in order.

### 4. Error Handling Gaps

**What to look for in a plan:**
- Happy path fully described, failure paths absent or vague
- "If error, return error" without specifying what the caller does with it
- Partial operations (multi-step) that can lose data, without rollback plan
- External calls (API, DB, queue) without failure mode specification
- Retry or compensation absent: a finding only with a concrete case. Error handling at a trust boundary or for data loss needs no case.

**How to flag:**
```
[ERROR HANDLING GAP] Step {N}: "{quoted plan text}" — failure path unspecified.
Resolution: Add: {on failure scenario} → {specific recovery action}.
```

**Suggest:** for each external call, the action on timeout, 4xx and 5xx; a compensation step only for a partial write that loses data; Result types or explicit error returns, never a silent failure.

### 5. Missing Caching

**What to look for in a plan:**
Only with a concrete case; else no finding.
- "Fetch configuration on each request", "call third-party API per user action"
- Reference data (categories, settings, permissions) loaded repeatedly
- Computed aggregates recalculated on every read

**How to flag:**
```
[CACHING GAP] Step {N}: "{quoted plan text}" — {expensive operation} on every request.
Resolution: Cache {data} for {TTL}: {proposed cache strategy and invalidation}.
```

**Suggest:** an application cache for cross-request data, a short-TTL in-memory cache for process-local reference data, and the invalidation (on update, by TTL, or both).

### 6. Poor Decomposition

**What to look for in a plan:**
- Steps combining unrelated concerns (auth + business logic + presentation)
- Unclear ownership — which module/layer owns each step?
- Cross-cutting steps that appear multiple times without abstraction
- "Also update X" or "also send to Y" appended to otherwise focused steps

**How to flag:**
```
[DECOMPOSITION ISSUE] Step {N}: "{quoted plan text}" — combines {concern A} and {concern B}.
Resolution: {concern A} belongs in {layer/module}; {concern B} belongs in {layer/module}.
```

**Suggest:** one layer per step (presentation, business logic, data access); cross-cutting concerns (logging, auth, validation) in middleware or decorators; one bounded context per module.

## Extended References

| Reference | Content |
|-----------|---------|
| `references/anti-patterns.md` | Before/after plan examples for each anti-pattern |

## Severity Guidelines

| Level | An anti-pattern that |
|-------|----------|
| **CRITICAL** | will cause correctness failures (data loss, security breach) |
| **HIGH** | will cause significant performance or maintainability problems |
| **MEDIUM** | will require architectural rework post-implementation |
| **LOW** | reduces code quality but is easily refactored |

Files in this skill

  • SKILL.md6 KB
  • references/anti-patterns.md7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.