design-patterns-advisor

design-patterns-advisor is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 70 tokens per session (1,927 once invoked), scanned A, original, MIT.

A guide to choosing and applying design patterns, which are reusable ways to organize code around common problems. It compares a small number of suitable patterns and explains their trade-offs.

In plain words
What is it for?
Use it to compare patterns such as Factory, Observer, Strategy, Adapter, CQRS, or pipelines, then implement and explain the recommended choice.
Why use it?
It helps address tight coupling, duplicated code, difficult testing, complex conditionals, and changes that require editing too many places.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compare patterns such as Factory, Observer, Strategy, Adapter, CQRS, or pipelines, then implement and explain the recommended choice.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/design-patterns-advisor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill design-patterns-advisor
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-patterns-advisor

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for design-patterns-advisor

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/design-patterns-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 182
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01927
Opus 5 $0.00035 $0.00963
Sonnet 5 $0.00014 $0.00385
Haiku 4.5 $0.00007 $0.00193

Measured 9d ago against content hash c9985c0a836c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

design-patterns-advisor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dev-skills/design-patterns-advisor/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design Patterns Advisor

Workflow

  1. Qualifier le problème — poser 1-2 questions précises sur la douleur actuelle : couplage fort ? code dupliqué ? difficile à tester ? trop de if/switch ? besoin d'extension sans modification ?
  2. Classifier le besoin — mapper sur la bonne famille :
    • Création : instanciation complexe, cache d'instances, familles d'objets
    • Structure : adapter une interface, décorer un comportement, encapsuler une hiérarchie
    • Comportement : algorithmes interchangeables, notifications, état interne variable
    • Architectural : séparation UI/logique, CQRS, pipeline de traitement
  3. Proposer 2-3 candidats avec critères de décision (voir tableau ci-dessous) — pas de liste exhaustive, uniquement ceux pertinents
  4. Implémenter le pattern recommandé dans le langage du projet — code complet, copiable, commenté
  5. Montrer l'avant/après — mettre en évidence les gains mesurables (testabilité, lignes supprimées, points d'extension)
  6. Signaler les garde-fous — cas où le pattern est inutile ou contre-productif
  7. Relier aux principes SOLID concernés — expliquer le lien de façon pratique

Critères de décision rapide

Symptôme du code Famille Patterns à considérer
new ConcreteClass() éparpillé Création Factory Method, Abstract Factory, Builder
Une seule instance globale nécessaire Création Singleton (avec précaution), Monostate
Interfaces incompatibles Structure Adapter, Facade
Ajout de comportement sans héritage Structure Decorator, Proxy
Plusieurs algorithmes interchangeables Comportement Strategy, Command
Couplage fort entre producteur/consommateur Comportement Observer, Mediator, Event Bus
État interne qui change le comportement Comportement State
Pipeline de transformations Comportement Chain of Responsibility, Pipeline
Logique métier + UI mélangées Architectural MVC, MVP, MVVM, Clean Architecture
Lecture/écriture asymétriques Architectural CQRS, Repository

Read the full file on GitHub · 185 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 185 lines · 70 tokens per session scan A c9985c0a836c

Subscribe to this mod's changes

design-patterns-advisor is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 19d ago), licensed MIT. It adds 70 tokens to every session and 1,927 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.