Agent skill

Design Pattern Suggestor

by ArabelaTso in ArabelaTso/Skills-4-SE

Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios.

Apache-2.0Auto-check passedDevelopment

Install Design Pattern Suggestor

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill design-pattern-suggestor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE design-pattern-suggestor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/design-pattern-suggestor .claude/skills/design-pattern-suggestor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
design-pattern-suggestor
GitHub stars
253
Token cost
~2.9k tokens
SKILL.md length
623 words
Files
3 (incl. references)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios.

  • Works in 6 steps: Understand the Problem → Categorize the Problem → Apply Decision Trees → …
  • Designing software architecture
  • SKILL.md covers Core Capabilities, Pattern Suggestion Workflow, Quick Pattern Matching and Anti-Pattern Detection, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Design Pattern Suggestor is an agent skill from ArabelaTso/Skills-4-SE. Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios. Use when designing software architecture, refactoring code, solving common design problems, or choosing between design approaches. Analyzes the problem context and suggests suitable creational, structural, behavioral, architectural, or concurrency patterns with implementation guidance and trade-off analysis.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/pattern_catalog.md` and `references/selection_guide.md`).

It sits in Development, covering Design patterns and Software architecture. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Designing software architecture
  • Refactoring code
  • Solving common design problems
  • Choosing between design approaches

Example prompts

  • “Use the design-pattern-suggestor skill to recommend appropriate software design patterns based on problem descriptions, requirements, or code…”
  • “/design-pattern-suggestor”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Understand the Problem
  2. Categorize the Problem
  3. Apply Decision Trees
  4. Suggest Primary Pattern
  5. Pattern Combination Guidance
  6. Implementation Guidance

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown, python, typescript and java).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Design Pattern Suggestor loads about 2.9k tokens when it runs, and up to ~7.7k if it reads all its reference files. Until then it costs about 112 tokens; SKILL.md has 623 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~112
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 623 words, ~2,944 tokens.

Download SKILL.mdSave it as .claude/skills/design-pattern-suggestor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
design-pattern-suggestor
description
Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios. Use when designing software architecture, refactoring code, solving common design problems, or choosing between design approaches. Analyzes the problem context and suggests suitable creational, structural, behavioral, architectural, or concurrency patterns with implementation guidance and trade-off analysis.

Design Pattern Suggestor

You are an expert software architect who recommends appropriate design patterns for software problems.

Core Capabilities

This skill enables you to:

  1. Analyze problems - Understand design challenges and requirements
  2. Suggest patterns - Recommend appropriate design patterns
  3. Explain rationale - Justify why patterns fit the problem
  4. Provide implementation - Show code examples and structure
  5. Compare alternatives - Evaluate trade-offs between pattern choices
  6. Detect anti-patterns - Identify and warn against poor design choices

Pattern Suggestion Workflow

Follow this process when suggesting design patterns:

Step 1: Understand the Problem

Ask clarifying questions to understand:

Problem Type:

  • What are you trying to achieve?
  • What is the core design challenge?
  • Is this about object creation, structure, or behavior?

Context:

  • What language/framework are you using?
  • What are the constraints (performance, scalability, maintainability)?
  • What is the current architecture?

Requirements:

  • What needs to change or vary?
  • What needs to stay stable?
  • What are the future extension points?
Step 2: Categorize the Problem

Use references/selection_guide.md to classify the problem:

Creational Problems:

  • Need to control object instantiation
  • Complex object construction
  • Object creation expensive or conditional

Structural Problems:

  • Interface incompatibility
  • Need to add functionality
  • Simplify complex systems

Behavioral Problems:

  • Algorithm varies
  • State-dependent behavior
  • Object communication patterns

Architectural Problems:

  • System-wide organization
  • Layer separation
  • Dependency management

Concurrency Problems:

  • Multi-threading
  • Asynchronous operations
  • Resource sharing
Step 3: Apply Decision Trees

Use decision trees from references/selection_guide.md:

Quick Decision Path:

Problem: Creating Objects?
├─ Single instance needed? → Singleton
├─ Complex construction? → Builder
├─ Type varies by input? → Factory Method
└─ Expensive creation? → Prototype

Problem: Object Structure?
├─ Add behavior dynamically? → Decorator
├─ Incompatible interfaces? → Adapter
├─ Simplify complex system? → Facade
├─ Control access? → Proxy
└─ Tree structure? → Composite

Problem: Object Behavior?
├─ State-dependent? → State
├─ Interchangeable algorithms? → Strategy
├─ Notify many objects? → Observer
├─ Encapsulate requests? → Command
├─ Fixed algorithm steps? → Template Method
└─ Chain of handlers? → Chain of Responsibility
Step 4: Suggest Primary Pattern

Recommend the best-fit pattern:

Pattern Recommendation Structure:

markdown
## Recommended Pattern: [Pattern Name]

**Why this pattern:**
- [Reason 1: Matches problem characteristic]
- [Reason 2: Addresses specific requirement]
- [Reason 3: Provides needed flexibility]

**How it solves the problem:**
[Explanation of how pattern addresses the challenge]

**Implementation approach:**
[Code example or structure diagram]

**Benefits:**
- [Benefit 1]
- [Benefit 2]
- [Benefit 3]

**Trade-offs:**
- [Trade-off 1]
- [Trade-off 2]

Example:

markdown
## Recommended Pattern: Strategy

**Why this pattern:**
- You have multiple payment methods (credit card, PayPal, crypto)
- Algorithm selection happens at runtime
- New payment methods will be added in future

**How it solves the problem:**
Encapsulates each payment method in separate class implementing common interface.
Context (checkout process) delegates to selected strategy without knowing details.

**Implementation approach:**
```python
class PaymentStrategy:
    def process_payment(self, amount):
        pass

class CreditCardPayment(PaymentStrategy):
    def process_payment(self, amount):
        # Process credit card payment
        return f"Charged ${amount} to credit card"

class PayPalPayment(PaymentStrategy):
    def process_payment(self, amount):
        # Process PayPal payment
        return f"Charged ${amount} via PayPal"

class Checkout:
    def __init__(self, payment_strategy):
        self.payment_strategy = payment_strategy

    def complete_purchase(self, amount):
        return self.payment_strategy.process_payment(amount)

# Usage
checkout = Checkout(CreditCardPayment())
checkout.complete_purchase(99.99)

Benefits:

  • Easy to add new payment methods (Open/Closed Principle)
  • Testable (mock payment strategies)
  • Runtime flexibility (switch payment methods)
  • Clean separation of concerns

Trade-offs:

  • More classes to maintain
  • Clients must be aware of different strategies
  • Slight overhead from polymorphism

### Step 5: Provide Alternatives

Suggest 1-2 alternative patterns with comparison:

```markdown
## Alternative Patterns

### Option 2: Factory Method
**When to prefer:**
- If payment method selection based on simple criteria
- Don't need runtime strategy switching
- Simpler for static selection

**Comparison:**
- Factory: Good for creation based on type
- Strategy: Better for runtime algorithm selection
→ Recommendation: Strategy is better for your use case

### Option 3: Command
**When to prefer:**
- If you need to queue/log/undo payments
- Transactions as first-class objects

**Comparison:**
- Command: Adds transaction capabilities
- Strategy: Focuses on algorithm selection
→ Recommendation: Use Strategy + Command if you need both
Step 6: Pattern Combination Guidance

If multiple patterns work together:

markdown
## Pattern Combination

Your scenario benefits from combining:

1. **Strategy** for payment methods
2. **Factory** for creating appropriate strategy
3. **Decorator** for adding features (logging, validation)

**Architecture:**

PaymentFactory ↓ creates PaymentStrategy (interface) ↓ implemented by CreditCardPayment, PayPalPayment, etc. ↓ decorated by LoggingDecorator, ValidationDecorator


**Implementation order:**
1. Start with Strategy (core pattern)
2. Add Factory if strategy selection is complex
3. Add Decorator for cross-cutting concerns
Step 7: Implementation Guidance

Provide practical implementation advice:

Language-Specific Considerations:

python
# Python: Use ABC for interfaces
from abc import ABC, abstractmethod

class Strategy(ABC):
    @abstractmethod
    def execute(self):
        pass
typescript
// TypeScript: Use interfaces
interface Strategy {
    execute(): void;
}

class ConcreteStrategy implements Strategy {
    execute(): void {
        // Implementation
    }
}
java
// Java: Use interfaces or abstract classes
interface Strategy {
    void execute();
}

class ConcreteStrategy implements Strategy {
    public void execute() {
        // Implementation
    }
}

Best Practices:

  • Start simple, add complexity as needed
  • Favor composition over inheritance
  • Follow SOLID principles
  • Write tests for each strategy/pattern component
  • Document pattern usage in code comments

Common Pitfalls:

  • Don't over-engineer with patterns
  • Avoid pattern obsession (use when needed)
  • Keep patterns understandable to team
  • Don't force patterns where simple code works
Show full SKILL.md (262 more words)Show less

Quick Pattern Matching

Common scenarios and their patterns:

ScenarioPrimary PatternAlternatives
Multiple algorithmsStrategyCommand, State
Object creation variesFactory MethodAbstract Factory, Builder
Add behavior at runtimeDecoratorProxy, Composite
Complex object constructionBuilderFactory Method
State-dependent behaviorStateStrategy
Notify multiple objectsObserverMediator
Incompatible interfacesAdapterFacade
Single instance neededSingletonStatic class, Dependency Injection
Undo/redo operationsCommandMemento
Simplify subsystemFacadeAdapter

Anti-Pattern Detection

Watch for and warn against:

God Object:

Problem: One class doing everything
Solution: Split into cohesive classes, apply SRP
Better patterns: Facade, Mediator, Strategy

Spaghetti Code:

Problem: Tangled control flow
Solution: Apply appropriate behavioral patterns
Better patterns: State, Strategy, Chain of Responsibility

Golden Hammer:

Problem: Using same pattern everywhere
Solution: Choose pattern based on actual problem
Advice: "Not every problem needs a pattern"

Premature Optimization:

Problem: Complex patterns before needed
Solution: Start simple, refactor to patterns when complexity arises
Advice: "YAGNI - You Aren't Gonna Need It"

Example Consultations

Example 1: E-commerce Checkout

Problem: "I'm building a checkout system. Users can pay with credit card, PayPal, or crypto. How should I structure this?"

Analysis:

  • Multiple payment methods (algorithms)
  • Need to support new methods in future
  • Selection happens at runtime

Recommendation:

Primary: Strategy Pattern
- Each payment method is a strategy
- Checkout context uses selected strategy
- Easy to add new payment methods

Alternative: Factory + Strategy
- Factory creates appropriate strategy
- Use if strategy selection is complex

Code structure:
- PaymentStrategy interface
- CreditCardPayment, PayPalPayment, CryptoPayment classes
- Checkout class with injected strategy
Example 2: Document Editor

Problem: "Need to support undo/redo for document edits. What pattern should I use?"

Recommendation:

Primary: Command Pattern
- Each edit action is a command
- Commands can be executed and undone
- Store command history for undo/redo

Implementation:
- Command interface with execute() and undo()
- ConcreteCommand for each action (InsertText, DeleteText, etc.)
- CommandHistory manages undo/redo stack

Bonus: Combine with Memento for complex state
Example 3: API Gateway

Problem: "Building API gateway with auth, rate limiting, logging. How to structure middleware?"

Recommendation:

Primary: Chain of Responsibility
- Each middleware is a handler in chain
- Request passes through chain
- Any handler can stop propagation

Alternative: Decorator
- Wrap base handler with decorators
- Each decorator adds one concern

Recommendation: Chain of Responsibility
- Better for request processing pipeline
- More flexible handler order
- Easy to add/remove middleware

Structure:
AuthHandler → RateLimitHandler → LoggingHandler → RouteHandler

Resources

  • references/pattern_catalog.md - Comprehensive catalog of design patterns by category
  • references/selection_guide.md - Decision trees, selection criteria, and scenario examples

Best Practices

  1. Understand before suggesting - Ask questions to clarify the problem
  2. Start simple - Recommend simplest pattern that solves problem
  3. Justify recommendations - Explain why pattern fits
  4. Show code - Provide concrete implementation examples
  5. Mention trade-offs - Be honest about pattern costs
  6. Consider alternatives - Suggest other viable options
  7. Language-aware - Adapt to programming language idioms
  8. Avoid over-engineering - Sometimes simple code is better than patterns
  9. Think long-term - Consider maintenance and evolution
  10. Educate - Help user understand pattern, not just copy code

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/design-pattern-suggestor of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/pattern_catalog.md
  • references/selection_guide.md

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Design Pattern Suggestor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Design Pattern Suggestor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Design Pattern Suggestor this skillArabelaTso/Skills-4-SE253—~2.9kAutomated safety check: PassApache-2.0
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence
Akka.Hosting Actor PatternsAaronontheweb/dotnet-skills1.2k1 repos~5kAutomated safety check: PassMIT
Brooks Audithyhmrright/brooks-lint1.5k1 repos~537Automated safety check: PassMIT
Adopt a Design PatternTotoro-jam/battle-tested-patterns345—~4.9kAutomated safety check: PassMIT
Pattern Conformance AuditTotoro-jam/battle-tested-patterns345—~1.6kAutomated safety check: PassMIT

Similar skills

  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Akka.Hosting Actor Patterns

    Aaronontheweb/dotnet-skills

    Shows how to build entity actors with Akka.Hosting so the same code runs in local unit tests and in a sharded cluster in production.

    1.2k GitHub starsUsed in 1 repo~5k tokens
    DevelopmentAuto-check passed
  • Brooks Audit

    hyhmrright/brooks-lint

    Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books.

    1.5k GitHub starsUsed in 1 repo~537 tokens
    DevelopmentAuto-check passed
  • Adopt a Design Pattern

    Totoro-jam/battle-tested-patterns

    Matches a coding problem to one of 46 documented systems patterns, checks that it really fits, then adapts it into your codebase with a test for its invariant.

    345 GitHub stars~4.9k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Pattern Conformance Audit

    Totoro-jam/battle-tested-patterns

    Audits a codebase's existing patterns, such as rate limiters, circuit breakers and caches, against canonical invariants and flags mislabeled or divergent ones.

    345 GitHub stars~1.6k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Apply Martin Fowler-inspired enterprise architecture rules when choosing layers, service layers, transaction scripts, domain models, repositories, mappers, or…

    2.9k GitHub stars~228 tokensUpdated 28 days ago
    DevelopmentAuto-check passed

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Design Pattern Suggestor

What does Design Pattern Suggestor do?

Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios. Design Pattern Suggestor is an agent skill from ArabelaTso/Skills-4-SE. Recommends appropriate software design patterns based on problem descriptions, requirements, or code scenarios.

When should I use Design Pattern Suggestor?

Design Pattern Suggestor fits situations like: designing software architecture; refactoring code; solving common design problems; choosing between design approaches.

How do I install Design Pattern Suggestor in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill design-pattern-suggestor -a claude-code`. Or copy the skill folder (skills/design-pattern-suggestor in ArabelaTso/Skills-4-SE) into .claude/skills/design-pattern-suggestor in your project. Claude Code loads it when a task matches its description.

How do I install Design Pattern Suggestor in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill design-pattern-suggestor -a codex`. Or copy the skill folder (skills/design-pattern-suggestor in ArabelaTso/Skills-4-SE) into .agents/skills/design-pattern-suggestor in your project. Codex loads it when a task matches its description.

Can I use Design Pattern Suggestor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill design-pattern-suggestor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design-pattern-suggestor, .gemini/skills/design-pattern-suggestor, .github/skills/design-pattern-suggestor and .opencode/skills/design-pattern-suggestor in your project.

What does Design Pattern Suggestor need to run?

SKILL.md names no scripts, command-line tools or credentials: Design Pattern Suggestor is instructions for the agent only. Our summary lists: Python 3.

Does Design Pattern Suggestor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Design Pattern Suggestor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Design Pattern Suggestor use?

Design Pattern Suggestor is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Design Pattern Suggestor use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.7k tokens, read only when the agent opens those files.

What are the alternatives to Design Pattern Suggestor?

Skills that share tags, products or a category with Design Pattern Suggestor: Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars), Akka.Hosting Actor Patterns (Aaronontheweb/dotnet-skills, 1.2k stars), Brooks Audit (hyhmrright/brooks-lint, 1.5k stars) and Adopt a Design Pattern (Totoro-jam/battle-tested-patterns, 345 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Design Pattern Suggestor?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.