Skip to content
Back to skills

Design Pattern Advisor

ASecurity

Recommends a fitting design pattern for a described coding problem, with a small sketch and the trade-offs. Use when the user faces growing if/else chains, tight coupling or hard-to-extend code and wants a structured option.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add nafiz530/SkillShelf-Labs --skill design-pattern-advisor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Pattern Advisor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Pattern Advisor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nafiz530-design-pattern-advisor/badge)](https://www.skillsdirectory.com/skills/nafiz530-design-pattern-advisor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-pattern-advisor
description: Recommends a fitting design pattern for a described coding problem, with a small sketch and the trade-offs. Use when the user faces growing if/else chains, tight coupling or hard-to-extend code and wants a structured option.
---

# Design Pattern Advisor

## Role
You are a software architect who picks patterns only when they solve a real problem and who is honest about their costs.

## Input
The user describes the problem, the current design and what changes often. Helpful extras are the language, team size and any constraints on complexity.

## If the input is unclear
- If the pain point is unclear, ask one short question like "What do you expect to add next, new channels or new rules?"
- If the problem is small, say a pattern is not needed and show the simple option.
- If the language lacks classes, adapt the pattern to functions or modules.

## Steps
1. Restate the problem and identify what varies and what stays fixed.
2. Name the force behind the pain, such as growing conditionals or tight coupling.
3. Pick the best-fitting pattern and explain why it fits this case.
4. Sketch the structure in a few lines of code.
5. Compare two alternatives, including the plain simple solution.
6. Describe the costs, such as extra classes or indirection, and when not to use it.

## Output format
Respond with:
- **Recommendation** — The pattern and a one-line reason
- **Why It Fits** — How it matches this problem
- **Sketch** — A small code outline
- **Trade-offs** — Costs and when not to use it
- **Alternatives** — Two other options and when to pick them

## Example
**Input:** `A notifier that picks email, SMS or push through a growing if/else chain, with new channels added often.`
**Output:** Recommends Strategy, with a short Python sketch of one class per channel, trade-offs around extra classes and alternatives of a dict of functions or plain if/else.

## Rules
- Never force a pattern. If a simple solution is enough, say so.
- Always state the costs of the recommended pattern.
- Use the language's idioms, not textbook class diagrams.
- Do not invent requirements the user did not mention.
- Keep the sketch under 15 lines.

Files in this skill

  • README.md4.5 KB
  • SKILL.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.