From coding
Selects and applies GoF design patterns (Factory, Builder, Strategy, Observer, Adapter, Decorator) for recurring design problems and multi-component changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/coding:design-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Modeling business concepts (Entity, Value Object)? → Use **domain-modeling** instead
| Condition | Pass | Fail |
|---|---|---|
| Multi-component change | Feature affects multiple components | Single component change |
| Recognizable problem | Matches known design problem | Unique/novel problem |
| Flexibility needed | Requires extensible solution | Fixed requirements |
| Recurring challenge | Solving common design issue | One-off implementation |
Apply when: Any condition passes
1. Identify the problem
↓
2. Match problem to pattern category
↓
3. Evaluate pattern candidates
↓
4. Consider trade-offs
↓
5. Apply pattern minimally
| Category | Purpose | Common Patterns |
|---|---|---|
| Creational | Object creation | Factory, Builder, Singleton |
| Structural | Object composition | Adapter, Decorator, Facade |
| Behavioral | Object interaction | Strategy, Observer, Command |
| Category | Pattern | Use When | Example |
|---|---|---|---|
| Creational | Factory Method | Object creation varies by context | createLogger(type) |
| Creational | Builder | Complex object with many optional parts | Fluent configuration |
| Creational | Singleton | Single instance needed globally | Configuration manager |
| Structural | Adapter | Interface incompatibility | Wrap legacy API |
| Structural | Decorator | Add behavior dynamically | Logging wrapper |
| Structural | Facade | Simplify complex subsystem | Unified API client |
| Structural | Composite | Tree structures | UI components |
| Behavioral | Strategy | Algorithm varies at runtime | Payment methods |
| Behavioral | Observer | One-to-many notifications | Event system |
| Behavioral | Command | Encapsulate operations | Undo/redo actions |
| Behavioral | State | Behavior changes with state | Order status |
| Criterion | Pass | Fail |
|---|---|---|
| Problem identification | Problem clearly defined | Vague problem statement |
| Real need | Solves actual problem | Hypothetical/speculative |
| Simpler alternatives | Considered simpler options first | Jumped to pattern |
| Team familiarity | Team understands pattern | Pattern is obscure |
| Criterion | Pass | Fail |
|---|---|---|
| Minimal application | Pattern applied minimally | Over-applied |
| Clear naming | Names reflect pattern intent | Generic/unclear names |
| Intent preservation | Pattern intent maintained | Pattern misused |
| Appropriate complexity | Complexity justified | Over-engineered |
| Criterion | Pass | Fail |
|---|---|---|
| Flexibility gained | Code more flexible | Same or less flexible |
| Documented | Pattern documented if not obvious | Undocumented complexity |
| Tested | Tests cover pattern behavior | Pattern untested |
Pattern Fever: Applying patterns everywhere
Signs:
Cure: YAGNI - Use patterns only when they solve real problems
npx claudepluginhub elct9620/claudekit --plugin codingProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.