By Mosweed
A complete reference for the 23 Gang of Four design patterns: explain a pattern, choose between patterns, or review and refactor code toward the right one, with idiomatic examples in 8 languages loaded only when needed.
Use to actually APPLY a design-pattern refactor to code — extract a Strategy from a big conditional, introduce a Factory, add a State machine, wrap with a Decorator, etc. Unlike the read-only mentor, this agent edits files. Delegate here when the user says "refactor this toward X", "extract a Strategy here", or "apply the pattern" and wants the change made, not just advised.
Use to produce UML class diagrams for design patterns — either the canonical structure of a named GoF pattern, or a diagram of the design patterns actually present in a codebase. Outputs Mermaid (for Markdown), PlantUML, or draw.io (.drawio, editable in diagrams.net). Delegate here when someone says "draw/diagram the Observer pattern", "show me a UML of this code", or "map the patterns in this repo".
Use for Gang of Four design-pattern work — explaining a pattern, choosing between patterns, reviewing or refactoring code toward a pattern, or auditing a codebase for pattern-implementation mistakes across Python, Java, C++, C#, TypeScript, Go, PHP, and Ruby. Especially useful to delegate a whole-codebase pattern audit so it runs in its own context. Not a general debugger — declines bugs that have no pattern angle.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Skill that turns Claude into a reliable reference for all 23 Gang of Four design patterns. Ask about a pattern, get help choosing between patterns, or have Claude review and refactor your code toward the right one — with idiomatic examples in 8 languages, loaded only when needed instead of dumped into every conversation.
scan_patterns.py codebase scanner.design-patterns-vX.Y.Z.zip from the
latest release,
or clone this repo and zip the plugins/design-patterns/ folder yourself.This repo doubles as a plugin marketplace, so you can install it once and get automatic updates instead of copying files by hand.
/plugin marketplace add Mosweed/design-patterns-skill
/plugin install design-patterns@mosweed-plugins
To try it straight from a local clone before it's pushed anywhere:
/plugin marketplace add ./design-patterns-skill
/plugin install design-patterns@mosweed-plugins
Update later with /plugin marketplace update mosweed-plugins, and remove with
/plugin uninstall design-patterns@mosweed-plugins. The same commands work as
claude plugin … from a normal shell.
Prefer not to use a marketplace? Copy the plugins/design-patterns/ folder into a skills directory:
# Personal — available in all your projects
cp -r plugins/design-patterns ~/.claude/skills/
# Or project-scoped — committed with a repo, shared with your team
cp -r plugins/design-patterns .claude/skills/
Restart Claude Code if the skills directory didn't already exist.
This repo also ships a GitHub Copilot custom agent that follows the same
workflow, in agents/design-patterns.agent.md.
To use it in your own workspace, copy it into .github/agents/ so VS Code Copilot
detects it:
mkdir -p .github/agents
cp agents/design-patterns.agent.md .github/agents/
Then select Design Patterns Mentor from the agent dropdown in Copilot Chat.
The agent is self-contained, but if it can see this repo's
plugins/design-patterns/references/, it will use those files as its source of truth.
The skill picks the right shape for the task automatically:
| You ask | Claude responds with |
|---|---|
| "Explain the Observer pattern in Go" | Intent, structure, one idiomatic Go example, pitfalls |
| "Strategy or State here?" | A comparison table and a single recommendation |
| "Is this a correct Singleton?" + code | A findings table (correctness / robustness / deviation) |
| "Audit the codebase for pattern mistakes" | A report first; fixes only after you approve |
| "Refactor this if/else toward a pattern" | The target pattern and the smallest safe change |
It will also tell you when no pattern is the better answer, rather than forcing one.
npx claudepluginhub mosweed/design-patterns-skill --plugin design-patternsMulti-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses