# gof-design-patterns

gof-design-patterns finds the right Gang of Four pattern for the problem you describe and writes a working implementation in one of eight languages.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 145 installs · ★ 25 repo stars
- Author: markpitt
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/markpitt/claude-skills/tree/HEAD/skills/gof-design-patterns/SKILL.md
- Updated: 2026-02-19
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/gof-design-patterns

## What it does

Describe a design problem and the skill picks a pattern from the creational, structural or behavioral group, says why it fits, then writes the code. You get a usage example, the trade-offs, notes on the idioms of your chosen language and a hint on how to test the result. Reference files ship with it: a selection guide and per-category pattern write-ups.

Eight languages are covered: C#, Rust, Python, Dart, Go, GenAIScript, TypeScript and C. Ask for Java or Kotlin and the code half of the answer disappears, leaving only the pattern choice and the reasoning.

You can also name a pattern outright, ask for two that work together (a Factory that produces Strategy objects), or compare lookalikes such as Strategy and State. Everything comes from your description, so a vague request tends to return a generic pattern. Say what varies in your code and what stays fixed.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add markpitt/claude-skills --skill gof-design-patterns -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/gof-design-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/gof-design-patterns/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add markpitt/claude-skills --skill gof-design-patterns -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/gof-design-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add markpitt/claude-skills --skill gof-design-patterns -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/gof-design-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install markpitt/claude-skills skills/gof-design-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/gof-design-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add markpitt/claude-skills --skill gof-design-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/markpitt/claude-skills --path skills/gof-design-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/gof-design-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add markpitt/claude-skills --skill gof-design-patterns -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/markpitt/claude-skills/tree/HEAD/skills/gof-design-patterns/SKILL.md

## When to use it
- pick a pattern for payments that run through several providers
- write a Builder in TypeScript for a config object
- compare Strategy and State on real examples
- combine Factory and Strategy in Rust
- get a working Observer example in Go

## Example prompts
- Payments go through several providers with different interfaces, which pattern fits and show me the Python code
- Write a Builder in TypeScript for my config object with a fluent interface
- Show Factory and Strategy together in Rust and explain why you would pair them

## Similar
- [implementation-design-patterns-python](https://affpapa.org/en/nevibecode/skills/implementation-design-patterns-python.md) — skill · 143 installs
- [design-patterns](https://affpapa.org/en/nevibecode/skills/design-patterns.md) — skill · 2000 installs
- [implementation-design-patterns](https://affpapa.org/en/nevibecode/skills/implementation-design-patterns.md) — skill · 151 installs
- [design-patterns-implementation](https://affpapa.org/en/nevibecode/skills/design-patterns-implementation.md) — skill · 601 installs
- [golang-design-patterns](https://affpapa.org/en/nevibecode/skills/golang-design-patterns.md) — skill · 44600 installs
- [python-design-patterns](https://affpapa.org/en/nevibecode/skills/python-design-patterns.md) — skill · 22842 installs

From the same set: [markpitt/claude-skills](https://affpapa.org/en/nevibecode/by/markpitt/claude-skills.md) — 10 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
