Claude
Skills
Sign in
Back

blueprint:bad-pattern

Included with Lifetime
$97 forever

Document an anti-pattern to avoid (any subject — code, schema, UI, infra)

Design

What this skill does


# Document Anti-Pattern

**COMMAND:** Document something to avoid and the correct alternative. Anti-patterns are tree-agnostic — file all entries in `patterns/bad/anti-patterns.md` regardless of subject (code, database model, UI, infra).

## Execute

1. **Parse** argument for anti-pattern and correct approach
2. **Create** patterns/bad/ if needed
3. **Add** entry to patterns/bad/anti-patterns.md
4. **Report** what was documented

## Input Handling

| Input | Action |
|-------|--------|
| `/bad-pattern any type - use unknown` | Document with both bad and good |
| `/bad-pattern inline SQL` | Ask for correct approach |
| `/bad-pattern modal traps focus on close - return focus to trigger` | UI anti-pattern, same file |
| `/bad-pattern` | Ask what to document |

## Anti-Pattern Template

Add to `patterns/bad/anti-patterns.md`:

```markdown
## [Category]: [Description]

**Severity:** Critical | High | Medium | Low

### Don't Do This
```[language]
[bad code]
```

**Problems:**
- [Issue]

### Do This Instead
```[language]
[good code]
```

**Why:** [Explanation]
```

## Severity Guide

- **Critical**: Security, data loss, accessibility violations (WCAG failures), destructive actions without confirmation
- **High**: Performance, maintenance burden, broken interaction patterns
- **Medium**: Code smell, inconsistent visual language
- **Low**: Style preference

## Output

```
Anti-pattern documented in patterns/bad/anti-patterns.md
```

If details missing, use TBD markers.

Related in Design