From arch-crew
Use when choosing or assessing object-level design patterns (GoF and Python-idiomatic) — 'which pattern fits here', 'how should I structure this class', 'is this the right use of a factory/strategy/observer', 'how do I make these algorithms swappable', or any design-pattern code review. Branches automatically: greenfield → a short interview that returns one recommended pattern (with its Pythonic form); existing code → a review that maps smells to the patterns that fix them. Strongly prefers the language feature over the ceremony — reach for this whenever pattern/class-design questions come up, even if no pattern is named, and especially in Python.
How this skill is triggered — by the user, by Claude, or both
Slash command
/arch-crew:design-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design patterns are **answers to recurring problems, not goals**. The two failure modes are
Design patterns are answers to recurring problems, not goals. The two failure modes are
opposite and equally common: writing tangled code that needed a pattern, and bolting a GoF
pattern onto a problem the language already solves. This skill exists to land between them — and in
Python specifically, the idiomatic answer is frequently "you don't need the pattern, you need a
function / a module / a decorator / a dataclass / with / singledispatch / asyncio." Name the
pattern so the concept is clear; steer to the idiom.
Unlike architecture, patterns don't compose one-per-axis — so the recommendation is one primary pattern (plus an optional alternative), not a stack.
Knowledge lives in two references you read on demand:
references/decision-tree.md — the "what are you trying to do?" router → one pattern + its
Pythonic caveat.references/catalog.md — the refactoring lens: code smells mapped to the pattern (and the
language feature) that resolves them.Branch on greenfield or refactoring? Are we shaping new code, or assessing code that exists?
The request usually tells you: "how should I design X?" / "what's the cleanest way to…" = greenfield; "is this the right pattern?" / a file to look at / "review this class" = refactoring. Ask only if genuinely ambiguous.
Read references/decision-tree.md and route.
Output:
**Recommended: <Pattern>** — <why it fits, one or two lines>.
**In Python:** <the idiomatic form — the actual code shape to write>.
**Skip the pattern if:** <the simpler thing that's enough, when applicable>.
_Alternative:_ <other pattern> if <condition>. ← only when a real fork exists
Show a tight idiomatic snippet when it makes the recommendation concrete — patterns are easier to judge as five lines of real code than as a noun.
The deliverable favours the smallest change that improves clarity — and a real possibility that the best change is removing a hand-rolled pattern.
references/catalog.md (smell → pattern). Common
tells: big construction/algorithm conditionals, subclass explosions, manual resource cleanup,
getter/setter pairs, hand-rolled singletons, if obj is not None guards, SQL inlined in logic.
The catalog's smells lean OOP/web-flavored; in library, scientific, or script code the highest-value
finding is often plain duplication or an import-time side effect that maps to no pattern at
all — the fix is "extract a shared function / helper, move the imports," and that is a perfectly
legitimate review item. Never skip a real problem just because no catalog row names it; the goal
is clearer code, not pattern coverage.with instead of try/finally, a dataclass instead of a builder, singledispatch instead of a
visitor).Output:
## Pattern review
### Findings
1. **<smell>** — <where, file ref> · Fix: **<Pattern>** → in Python, <idiom> · Why: <the pain it
removes> · Effort: <small/medium>
2. ...
**Leave as-is:** <patterns/classes that are already appropriate.>
**Consider simplifying away:** <hand-rolled patterns a language feature could replace.>
"Already idiomatic — no pattern needed" is a valid, even ideal, verdict. If the code reads well and reaches for patterns only where they earn it, say so and stop. Don't manufacture findings; the most Pythonic review is often a short one.
Most pattern picks are tactical — the right home for them is the code and its comments, not a standing record — so this skill is chat-first. Don't create files by default.
Write a file when the decision is consequential enough to outlive the conversation, or when the user asks:
docs/adr/NNNN-short-title.md (lowercase words joined by hyphens;
4-digit number, one past the highest in docs/adr/, else 0001), with Context / Decision /
Consequences — and record the Pythonic
form chosen in the Decision, since that's the part future readers will second-guess.docs/design-pattern-review-<YYYY-MM-DD>.md
(the Findings + Leave-as-is / Simplify-away sections).Otherwise present the recommendation in chat and let the code be the record.
The Pythonic caveat is attached to every recommendation on purpose: the most valuable thing this
skill can do is stop someone from building a metaclass singleton or a visitor hierarchy when a
module or singledispatch would do. A pattern earns its ceremony only when the plain-language
version genuinely falls short — so the recommendation always carries the cheaper alternative next to
it, and review mode is as willing to delete structure as to add it.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub adamkrysztopa/architectural-decisions --plugin arch-crew