Creator · pproenca
Last updated · Sep 6, 2026
Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type
Creator · pproenca
Last updated · Sep 6, 2026
Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type
Creator · pproenca
Last updated · Sep 6, 2026
Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type
Creator · pproenca
Last updated · Sep 6, 2026
Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type
Sandbox only
Install targets
Codex install prompt
Install the "implementation-design-patterns" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.curated/implementation-design-patterns. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"pproenca-implementation-design-patterns","task":"Install implementation-design-patterns","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Maintenance
fresh
21d since push
Risk
Risky
Permission surface may require sandboxing
GitHub quality
202
70/100 Quality · 74/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
202 GitHub stars
Repo activity
202 stars, 17 forks
Maintenance
21d since push
License
MIT
Install
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add pproenca/dot-skills --skill implementation-design-patternsDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
Agent should check
Copy prompt
Task: Use implementation-design-patterns in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install
Install command: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
LLM text format
/api/skills/pproenca-implementation-design-patterns/install?format=text
Find alternatives
/api/skills/search?q=implementation-design-patterns&limit=3
Agent prompt
Use implementation-design-patterns for this task. Review https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install, then install with: npx skills add pproenca/dot-skills --skill implementation-design-patternsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/pproenca-implementation-design-patterns
LLM text
/api/registry/manifest/pproenca-implementation-design-patterns?format=text
Install alias
/api/registry/install/pproenca-implementation-design-patterns
Recommend
/api/registry/recommend?task=Use%20implementation-design-patterns%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Browser automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO202 GitHub stars
Stars/forks activity
CHECK202 stars, 17 forks; issue activity unavailable in current metadata
Recent maintenance
PASS21d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: implementation-design-patterns description: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. ---
# TypeScript Design Patterns Best Practices (Refactoring Guru)
Implementation reference for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Each of the **22 pattern files across 3 categories** captures intent, problem, solution, applicability, a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns.
The patterns are a *vocabulary for structural decisions*, not a prescription. Reach for a pattern only when its applicability criteria match the problem at hand — every pattern entry includes a **When NOT to Use** section to guard against over-engineering.
## When to Apply
- Refactoring a class that has grown unwieldy via inheritance — combinatorial subclasses, conditional branching on type, or a "god class" with many responsibilities - Designing a new module whose collaborators are not yet fixed — you want to keep the interface stable while implementations vary - Integrating an incompatible third-party API, library, or legacy class into existing code - Modeling a tree-shaped domain (file systems, organization charts, expression ASTs, UI component trees) where leaves and branches must be treated uniformly - Adding cross-cutting behavior at runtime — logging, caching, access control, decoration — without subclassing - Selecting an algorithm or behavior variant at runtime based on configuration, user input, or environmental conditions - Implementing undo/redo, history snapshots, transactional rollback, or scheduling/queueing of operations - Coordinating many objects whose direct mutual references have become tangled — a hub that brokers communication - Notifying many subscribers when something changes — event systems, reactive data flows - Reviewing code that smells like a pattern is implicit (large switch on `kind`, parallel class hierarchies, identical algorithm skeletons across siblings) — make it explicit
## Rule Categories
| # | Category | Impact | Patterns | When to reach for this group | |---|----------|--------|----------|------------------------------| | 1 | **Creational** | HIGH | 5 | Object construction is non-trivial, varies by configuration, or risks tight coupling to concrete classes | | 2 | **Structural** | HIGH | 7 | Composing classes/objects into larger structures while keeping parts substitutable | | 3 | **Behavioral** | HIGH | 10 | Distributing responsibility and defining how objects collaborate at runtime |
## How to Use
1. **Recognize the shape.** Read the **Quick Reference** below and identify which pattern's intent matches your problem. Most pattern-shaped problems sound like one of the listed phrases. 2. **Read the pattern reference.** Open `references/{category}-{pattern}.md`. Confirm intent, then read **Applicability** and **When NOT to Use** before adopting. 3. **Adapt the example.** The TypeScript example uses pedagogical names (`ConcreteStrategyA`, `Receiver`). Rename to domain terms before merging. 4. **Check the relations.** Each entry ends with **Related Patterns** — siblings worth considering for the same problem.
## Quick Reference
### 1. Creational Patterns (object instantiation)
- [`creational-factory-method`](references/creational-factory-method.md) — Subclasses decide which concrete product to create. *"I need to add new product types without touching the creator code."* — **HIGH** - [`creational-abstract-factory`](references/creational-abstract-factory.md) — Produce families of related objects together. *"My code must work with multiple matching variants (chair+sofa+table) and shouldn't mix families."* — **MEDIUM-HIGH** - [`creational-builder`](references/creational-builder.md) — Construct complex objects step by step. *"My constructor has 10+ parameters or I have a telescoping-constructor smell."* — **HIGH** - [`creational-prototype`](references/creational-prototype.md) — Clone objects through their own `clone()` method. *"I need to copy objects without depending on their concrete class."* — **MEDIUM** - [`creational-singleton`](references/creational-singleton.md) — Guarantee a single shared instance with a global access point. *"I need exactly one instance of this class — config, registry, pool."* — **MEDIUM**
### 2. Structural Patterns (composition)
- [`structural-adapter`](references/structural-adapter.md) — Translate one interface to another. *"I need to use a library whose API doesn't match what my code expects."* — **HIGH** - [`structural-bridge`](references/structural-bridge.md) — Split abstraction from implementation so they can vary independently. *"I have two orthogonal dimensions and the subclass count is exploding."* — **MEDIUM** - [`structural-composite`](references/structural-composite.md) — Treat individual objects and compositions uniformly. *"I have a tree (folders/files, groups/items, components/children) and want one interface for leaves and branches."* — **HIGH** - [`structural-decorator`](references/structural-decorator.md) — Wrap an object to add behavior without subclassing. *"I want to layer behaviors (logging + caching + auth) on the same interface at runtime."* — **HIGH** - [`structural-facade`](references/structural-facade.md) — Expose a simple interface over a complex subsystem. *"My client code is tangled in initialization and orchestration of a third-party library."* — **HIGH** - [`structural-flyweight`](references/structural-flyweight.md) — Share common state across many objects to save memory. *"I'm spawning millions of similar objects and running out of RAM."* — **LOW-MEDIUM** - [`structural-proxy`](references/structural-proxy.md) — Substitute for another object to control access. *"I need lazy loading, access control, caching, or logging without touching the real subject."* — **MEDIUM-HIGH**
### 3. Behavioral Patterns (collaboration)
- [`behavioral-chain-of-responsibility`](references/behavioral-chain-of-responsibility.md) — Pass a request along a chain of handlers. *"I have a pipeline of validation / auth / parsing checks and want to add or reorder them dynamically."* — **MEDIUM-HIGH** - [`behavioral-command`](references/behavioral-command.md) — Turn a request into a stand-alone object. *"I need undo/redo, queueing, scheduling, macro recording, or to decouple invoker from receiver."* — **HIGH** - [`behavioral-iterator`](references/behavioral-iterator.md) — Traverse a collection without exposing its representation. *"I want clients to walk a structure without knowing if it's a list, tree, or graph."* — **HIGH** - [`behavioral-mediator`](references/behavioral-mediator.md) — Centralize communication among components in a single hub. *"My form fields all reference each other directly and the coupling is unmanageable."* — **MEDIUM** - [`behavioral-memento`](references/behavioral-memento.md) — Capture and restore an object's state without breaking encapsulation. *"I need snapshots for undo/redo or transactional rollback."* — **LOW-MEDIUM** - [`behavioral-observer`](references/behavioral-observer.md) — Notify dependent objects when state changes. *"Many objects need to react when one object changes — events, reactive UI, pub/sub."* — **CRITICAL** - [`behavioral-state`](references/behavioral-state.md) — Alter behavior when internal state changes. *"My class is a state machine with massive conditionals branching on a `status` field."* — **MEDIUM-HIGH** - [`behavioral-strategy`](references/behavioral-strategy.md) — Make algorithms interchangeable at runtime. *"I have multiple algorithms (sort, route, pay, compress) and want to pick one without conditionals."* — **HIGH** - [`behavioral-template-method`](references/behavioral-template-method.md) — Fix an algorithm's skeleton in a base class; subclasses override steps. *"Several classes share the same algorithm structure with minor step differences."* — **MEDIUM** - [`behavioral-visitor`](references/behavioral-visitor.md) — Add operations to an object structure without modifying the classes. *"I'd need to add 5 unrelated operations across an AST but I can't touch the node classes."* — **LOW-MEDIUM**
## How to Choose Between Similar Patterns
Several patterns share a structural shape but solve different problems. Read each pattern's **Related Patterns** section, then apply these distinctions:
- **Adapter vs. Facade vs. Proxy vs. Decorator** — all four wrap a target. *Adapter* changes the interface. *Facade* simplifies a subsystem. *Proxy* keeps the interface and controls access/lifecycle. *Decorator* keeps the interface and adds behavior recursively. - **Strategy vs. State** — both swap a delegated object. *Strategy* objects are independent; the client picks one. *State* objects know each other and trigger transitions on the context. - **Strategy vs. Template Method** — both vary parts of an algorithm. *Strategy* uses composition (swap at runtime). *Template Method* uses inheritance (fixed at compile time). - **Factory Method vs. Abstract Factory vs. Builder** — *Factory Method* returns one product through a single method. *Abstract Factory* returns a family of related products through several methods. *Builder* assembles one complex product step by step. - **Composite vs. Decorator** — both wrap children recursively. *Composite* sums or aggregates child results. *Decorator* adds responsibilities and passes through. - **Chain of Responsibility vs. Command vs. Mediator vs. Observer** — all connect senders and receivers. *CoR* passes a request along a chain. *Command* makes the request a first-class object. *Mediator* centralizes mutual communication. *Observer* establishes one-publisher-to-many-subscribers notification.
## Related Skills
- **[`implementation-functional-patterns`](../implementation-functional-patterns/SKILL.md)** — TypeScript's functional answer (HOFs, lambdas, pipelines, streams, composition) for problems where this catalog reaches for a class. Most Strategy / Iterator / Command / Chain-of-Responsibility / Decorator / Template-Method shapes have a lighter functional form in idiomatic TS; consult it before introducing a new class hierarchy.
## References
1. [Refactoring Guru — Design Patterns Catalog](https://refactoring.guru/design-patterns/catalog) 2. [Refactoring Guru — TypeScript Examples](https://refactoring.guru/design-patterns/typescript) 3. [Refactoring Guru — Creational Patterns](https://refactoring.guru/design-patterns/creational-patterns) 4. [Refactoring Guru — Structural Patterns](https://refactoring.guru/design-patterns/structural-patterns) 5. [Refactoring Guru — Behavioral Patterns](https://refactoring.guru/design-patterns/behavioral-patterns)
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implementation-design-patterns, ready for a manual X post.
implementation-design-patterns: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from re... 202 stars https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x
Listing + install path for implementation-design-patterns: https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x Install: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to pproenca but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns/audit)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)pproenca
@pproenca
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "implementation-design-patterns" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.curated/implementation-design-patterns. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"pproenca-implementation-design-patterns","task":"Install implementation-design-patterns","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Maintenance
fresh
21d since push
Risk
Risky
Permission surface may require sandboxing
GitHub quality
202
70/100 Quality · 74/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
202 GitHub stars
Repo activity
202 stars, 17 forks
Maintenance
21d since push
License
MIT
Install
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add pproenca/dot-skills --skill implementation-design-patternsDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
Agent should check
Copy prompt
Task: Use implementation-design-patterns in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install
Install command: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
LLM text format
/api/skills/pproenca-implementation-design-patterns/install?format=text
Find alternatives
/api/skills/search?q=implementation-design-patterns&limit=3
Agent prompt
Use implementation-design-patterns for this task. Review https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install, then install with: npx skills add pproenca/dot-skills --skill implementation-design-patternsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/pproenca-implementation-design-patterns
LLM text
/api/registry/manifest/pproenca-implementation-design-patterns?format=text
Install alias
/api/registry/install/pproenca-implementation-design-patterns
Recommend
/api/registry/recommend?task=Use%20implementation-design-patterns%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Browser automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO202 GitHub stars
Stars/forks activity
CHECK202 stars, 17 forks; issue activity unavailable in current metadata
Recent maintenance
PASS21d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: implementation-design-patterns description: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. ---
# TypeScript Design Patterns Best Practices (Refactoring Guru)
Implementation reference for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Each of the **22 pattern files across 3 categories** captures intent, problem, solution, applicability, a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns.
The patterns are a *vocabulary for structural decisions*, not a prescription. Reach for a pattern only when its applicability criteria match the problem at hand — every pattern entry includes a **When NOT to Use** section to guard against over-engineering.
## When to Apply
- Refactoring a class that has grown unwieldy via inheritance — combinatorial subclasses, conditional branching on type, or a "god class" with many responsibilities - Designing a new module whose collaborators are not yet fixed — you want to keep the interface stable while implementations vary - Integrating an incompatible third-party API, library, or legacy class into existing code - Modeling a tree-shaped domain (file systems, organization charts, expression ASTs, UI component trees) where leaves and branches must be treated uniformly - Adding cross-cutting behavior at runtime — logging, caching, access control, decoration — without subclassing - Selecting an algorithm or behavior variant at runtime based on configuration, user input, or environmental conditions - Implementing undo/redo, history snapshots, transactional rollback, or scheduling/queueing of operations - Coordinating many objects whose direct mutual references have become tangled — a hub that brokers communication - Notifying many subscribers when something changes — event systems, reactive data flows - Reviewing code that smells like a pattern is implicit (large switch on `kind`, parallel class hierarchies, identical algorithm skeletons across siblings) — make it explicit
## Rule Categories
| # | Category | Impact | Patterns | When to reach for this group | |---|----------|--------|----------|------------------------------| | 1 | **Creational** | HIGH | 5 | Object construction is non-trivial, varies by configuration, or risks tight coupling to concrete classes | | 2 | **Structural** | HIGH | 7 | Composing classes/objects into larger structures while keeping parts substitutable | | 3 | **Behavioral** | HIGH | 10 | Distributing responsibility and defining how objects collaborate at runtime |
## How to Use
1. **Recognize the shape.** Read the **Quick Reference** below and identify which pattern's intent matches your problem. Most pattern-shaped problems sound like one of the listed phrases. 2. **Read the pattern reference.** Open `references/{category}-{pattern}.md`. Confirm intent, then read **Applicability** and **When NOT to Use** before adopting. 3. **Adapt the example.** The TypeScript example uses pedagogical names (`ConcreteStrategyA`, `Receiver`). Rename to domain terms before merging. 4. **Check the relations.** Each entry ends with **Related Patterns** — siblings worth considering for the same problem.
## Quick Reference
### 1. Creational Patterns (object instantiation)
- [`creational-factory-method`](references/creational-factory-method.md) — Subclasses decide which concrete product to create. *"I need to add new product types without touching the creator code."* — **HIGH** - [`creational-abstract-factory`](references/creational-abstract-factory.md) — Produce families of related objects together. *"My code must work with multiple matching variants (chair+sofa+table) and shouldn't mix families."* — **MEDIUM-HIGH** - [`creational-builder`](references/creational-builder.md) — Construct complex objects step by step. *"My constructor has 10+ parameters or I have a telescoping-constructor smell."* — **HIGH** - [`creational-prototype`](references/creational-prototype.md) — Clone objects through their own `clone()` method. *"I need to copy objects without depending on their concrete class."* — **MEDIUM** - [`creational-singleton`](references/creational-singleton.md) — Guarantee a single shared instance with a global access point. *"I need exactly one instance of this class — config, registry, pool."* — **MEDIUM**
### 2. Structural Patterns (composition)
- [`structural-adapter`](references/structural-adapter.md) — Translate one interface to another. *"I need to use a library whose API doesn't match what my code expects."* — **HIGH** - [`structural-bridge`](references/structural-bridge.md) — Split abstraction from implementation so they can vary independently. *"I have two orthogonal dimensions and the subclass count is exploding."* — **MEDIUM** - [`structural-composite`](references/structural-composite.md) — Treat individual objects and compositions uniformly. *"I have a tree (folders/files, groups/items, components/children) and want one interface for leaves and branches."* — **HIGH** - [`structural-decorator`](references/structural-decorator.md) — Wrap an object to add behavior without subclassing. *"I want to layer behaviors (logging + caching + auth) on the same interface at runtime."* — **HIGH** - [`structural-facade`](references/structural-facade.md) — Expose a simple interface over a complex subsystem. *"My client code is tangled in initialization and orchestration of a third-party library."* — **HIGH** - [`structural-flyweight`](references/structural-flyweight.md) — Share common state across many objects to save memory. *"I'm spawning millions of similar objects and running out of RAM."* — **LOW-MEDIUM** - [`structural-proxy`](references/structural-proxy.md) — Substitute for another object to control access. *"I need lazy loading, access control, caching, or logging without touching the real subject."* — **MEDIUM-HIGH**
### 3. Behavioral Patterns (collaboration)
- [`behavioral-chain-of-responsibility`](references/behavioral-chain-of-responsibility.md) — Pass a request along a chain of handlers. *"I have a pipeline of validation / auth / parsing checks and want to add or reorder them dynamically."* — **MEDIUM-HIGH** - [`behavioral-command`](references/behavioral-command.md) — Turn a request into a stand-alone object. *"I need undo/redo, queueing, scheduling, macro recording, or to decouple invoker from receiver."* — **HIGH** - [`behavioral-iterator`](references/behavioral-iterator.md) — Traverse a collection without exposing its representation. *"I want clients to walk a structure without knowing if it's a list, tree, or graph."* — **HIGH** - [`behavioral-mediator`](references/behavioral-mediator.md) — Centralize communication among components in a single hub. *"My form fields all reference each other directly and the coupling is unmanageable."* — **MEDIUM** - [`behavioral-memento`](references/behavioral-memento.md) — Capture and restore an object's state without breaking encapsulation. *"I need snapshots for undo/redo or transactional rollback."* — **LOW-MEDIUM** - [`behavioral-observer`](references/behavioral-observer.md) — Notify dependent objects when state changes. *"Many objects need to react when one object changes — events, reactive UI, pub/sub."* — **CRITICAL** - [`behavioral-state`](references/behavioral-state.md) — Alter behavior when internal state changes. *"My class is a state machine with massive conditionals branching on a `status` field."* — **MEDIUM-HIGH** - [`behavioral-strategy`](references/behavioral-strategy.md) — Make algorithms interchangeable at runtime. *"I have multiple algorithms (sort, route, pay, compress) and want to pick one without conditionals."* — **HIGH** - [`behavioral-template-method`](references/behavioral-template-method.md) — Fix an algorithm's skeleton in a base class; subclasses override steps. *"Several classes share the same algorithm structure with minor step differences."* — **MEDIUM** - [`behavioral-visitor`](references/behavioral-visitor.md) — Add operations to an object structure without modifying the classes. *"I'd need to add 5 unrelated operations across an AST but I can't touch the node classes."* — **LOW-MEDIUM**
## How to Choose Between Similar Patterns
Several patterns share a structural shape but solve different problems. Read each pattern's **Related Patterns** section, then apply these distinctions:
- **Adapter vs. Facade vs. Proxy vs. Decorator** — all four wrap a target. *Adapter* changes the interface. *Facade* simplifies a subsystem. *Proxy* keeps the interface and controls access/lifecycle. *Decorator* keeps the interface and adds behavior recursively. - **Strategy vs. State** — both swap a delegated object. *Strategy* objects are independent; the client picks one. *State* objects know each other and trigger transitions on the context. - **Strategy vs. Template Method** — both vary parts of an algorithm. *Strategy* uses composition (swap at runtime). *Template Method* uses inheritance (fixed at compile time). - **Factory Method vs. Abstract Factory vs. Builder** — *Factory Method* returns one product through a single method. *Abstract Factory* returns a family of related products through several methods. *Builder* assembles one complex product step by step. - **Composite vs. Decorator** — both wrap children recursively. *Composite* sums or aggregates child results. *Decorator* adds responsibilities and passes through. - **Chain of Responsibility vs. Command vs. Mediator vs. Observer** — all connect senders and receivers. *CoR* passes a request along a chain. *Command* makes the request a first-class object. *Mediator* centralizes mutual communication. *Observer* establishes one-publisher-to-many-subscribers notification.
## Related Skills
- **[`implementation-functional-patterns`](../implementation-functional-patterns/SKILL.md)** — TypeScript's functional answer (HOFs, lambdas, pipelines, streams, composition) for problems where this catalog reaches for a class. Most Strategy / Iterator / Command / Chain-of-Responsibility / Decorator / Template-Method shapes have a lighter functional form in idiomatic TS; consult it before introducing a new class hierarchy.
## References
1. [Refactoring Guru — Design Patterns Catalog](https://refactoring.guru/design-patterns/catalog) 2. [Refactoring Guru — TypeScript Examples](https://refactoring.guru/design-patterns/typescript) 3. [Refactoring Guru — Creational Patterns](https://refactoring.guru/design-patterns/creational-patterns) 4. [Refactoring Guru — Structural Patterns](https://refactoring.guru/design-patterns/structural-patterns) 5. [Refactoring Guru — Behavioral Patterns](https://refactoring.guru/design-patterns/behavioral-patterns)
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implementation-design-patterns, ready for a manual X post.
implementation-design-patterns: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from re... 202 stars https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x
Listing + install path for implementation-design-patterns: https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x Install: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to pproenca but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns/audit)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)pproenca
@pproenca
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "implementation-design-patterns" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.curated/implementation-design-patterns. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"pproenca-implementation-design-patterns","task":"Install implementation-design-patterns","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Maintenance
fresh
21d since push
Risk
Risky
Permission surface may require sandboxing
GitHub quality
202
70/100 Quality · 74/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
202 GitHub stars
Repo activity
202 stars, 17 forks
Maintenance
21d since push
License
MIT
Install
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add pproenca/dot-skills --skill implementation-design-patternsDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
Agent should check
Copy prompt
Task: Use implementation-design-patterns in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install
Install command: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
LLM text format
/api/skills/pproenca-implementation-design-patterns/install?format=text
Find alternatives
/api/skills/search?q=implementation-design-patterns&limit=3
Agent prompt
Use implementation-design-patterns for this task. Review https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install, then install with: npx skills add pproenca/dot-skills --skill implementation-design-patternsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/pproenca-implementation-design-patterns
LLM text
/api/registry/manifest/pproenca-implementation-design-patterns?format=text
Install alias
/api/registry/install/pproenca-implementation-design-patterns
Recommend
/api/registry/recommend?task=Use%20implementation-design-patterns%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Browser automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO202 GitHub stars
Stars/forks activity
CHECK202 stars, 17 forks; issue activity unavailable in current metadata
Recent maintenance
PASS21d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: implementation-design-patterns description: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. ---
# TypeScript Design Patterns Best Practices (Refactoring Guru)
Implementation reference for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Each of the **22 pattern files across 3 categories** captures intent, problem, solution, applicability, a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns.
The patterns are a *vocabulary for structural decisions*, not a prescription. Reach for a pattern only when its applicability criteria match the problem at hand — every pattern entry includes a **When NOT to Use** section to guard against over-engineering.
## When to Apply
- Refactoring a class that has grown unwieldy via inheritance — combinatorial subclasses, conditional branching on type, or a "god class" with many responsibilities - Designing a new module whose collaborators are not yet fixed — you want to keep the interface stable while implementations vary - Integrating an incompatible third-party API, library, or legacy class into existing code - Modeling a tree-shaped domain (file systems, organization charts, expression ASTs, UI component trees) where leaves and branches must be treated uniformly - Adding cross-cutting behavior at runtime — logging, caching, access control, decoration — without subclassing - Selecting an algorithm or behavior variant at runtime based on configuration, user input, or environmental conditions - Implementing undo/redo, history snapshots, transactional rollback, or scheduling/queueing of operations - Coordinating many objects whose direct mutual references have become tangled — a hub that brokers communication - Notifying many subscribers when something changes — event systems, reactive data flows - Reviewing code that smells like a pattern is implicit (large switch on `kind`, parallel class hierarchies, identical algorithm skeletons across siblings) — make it explicit
## Rule Categories
| # | Category | Impact | Patterns | When to reach for this group | |---|----------|--------|----------|------------------------------| | 1 | **Creational** | HIGH | 5 | Object construction is non-trivial, varies by configuration, or risks tight coupling to concrete classes | | 2 | **Structural** | HIGH | 7 | Composing classes/objects into larger structures while keeping parts substitutable | | 3 | **Behavioral** | HIGH | 10 | Distributing responsibility and defining how objects collaborate at runtime |
## How to Use
1. **Recognize the shape.** Read the **Quick Reference** below and identify which pattern's intent matches your problem. Most pattern-shaped problems sound like one of the listed phrases. 2. **Read the pattern reference.** Open `references/{category}-{pattern}.md`. Confirm intent, then read **Applicability** and **When NOT to Use** before adopting. 3. **Adapt the example.** The TypeScript example uses pedagogical names (`ConcreteStrategyA`, `Receiver`). Rename to domain terms before merging. 4. **Check the relations.** Each entry ends with **Related Patterns** — siblings worth considering for the same problem.
## Quick Reference
### 1. Creational Patterns (object instantiation)
- [`creational-factory-method`](references/creational-factory-method.md) — Subclasses decide which concrete product to create. *"I need to add new product types without touching the creator code."* — **HIGH** - [`creational-abstract-factory`](references/creational-abstract-factory.md) — Produce families of related objects together. *"My code must work with multiple matching variants (chair+sofa+table) and shouldn't mix families."* — **MEDIUM-HIGH** - [`creational-builder`](references/creational-builder.md) — Construct complex objects step by step. *"My constructor has 10+ parameters or I have a telescoping-constructor smell."* — **HIGH** - [`creational-prototype`](references/creational-prototype.md) — Clone objects through their own `clone()` method. *"I need to copy objects without depending on their concrete class."* — **MEDIUM** - [`creational-singleton`](references/creational-singleton.md) — Guarantee a single shared instance with a global access point. *"I need exactly one instance of this class — config, registry, pool."* — **MEDIUM**
### 2. Structural Patterns (composition)
- [`structural-adapter`](references/structural-adapter.md) — Translate one interface to another. *"I need to use a library whose API doesn't match what my code expects."* — **HIGH** - [`structural-bridge`](references/structural-bridge.md) — Split abstraction from implementation so they can vary independently. *"I have two orthogonal dimensions and the subclass count is exploding."* — **MEDIUM** - [`structural-composite`](references/structural-composite.md) — Treat individual objects and compositions uniformly. *"I have a tree (folders/files, groups/items, components/children) and want one interface for leaves and branches."* — **HIGH** - [`structural-decorator`](references/structural-decorator.md) — Wrap an object to add behavior without subclassing. *"I want to layer behaviors (logging + caching + auth) on the same interface at runtime."* — **HIGH** - [`structural-facade`](references/structural-facade.md) — Expose a simple interface over a complex subsystem. *"My client code is tangled in initialization and orchestration of a third-party library."* — **HIGH** - [`structural-flyweight`](references/structural-flyweight.md) — Share common state across many objects to save memory. *"I'm spawning millions of similar objects and running out of RAM."* — **LOW-MEDIUM** - [`structural-proxy`](references/structural-proxy.md) — Substitute for another object to control access. *"I need lazy loading, access control, caching, or logging without touching the real subject."* — **MEDIUM-HIGH**
### 3. Behavioral Patterns (collaboration)
- [`behavioral-chain-of-responsibility`](references/behavioral-chain-of-responsibility.md) — Pass a request along a chain of handlers. *"I have a pipeline of validation / auth / parsing checks and want to add or reorder them dynamically."* — **MEDIUM-HIGH** - [`behavioral-command`](references/behavioral-command.md) — Turn a request into a stand-alone object. *"I need undo/redo, queueing, scheduling, macro recording, or to decouple invoker from receiver."* — **HIGH** - [`behavioral-iterator`](references/behavioral-iterator.md) — Traverse a collection without exposing its representation. *"I want clients to walk a structure without knowing if it's a list, tree, or graph."* — **HIGH** - [`behavioral-mediator`](references/behavioral-mediator.md) — Centralize communication among components in a single hub. *"My form fields all reference each other directly and the coupling is unmanageable."* — **MEDIUM** - [`behavioral-memento`](references/behavioral-memento.md) — Capture and restore an object's state without breaking encapsulation. *"I need snapshots for undo/redo or transactional rollback."* — **LOW-MEDIUM** - [`behavioral-observer`](references/behavioral-observer.md) — Notify dependent objects when state changes. *"Many objects need to react when one object changes — events, reactive UI, pub/sub."* — **CRITICAL** - [`behavioral-state`](references/behavioral-state.md) — Alter behavior when internal state changes. *"My class is a state machine with massive conditionals branching on a `status` field."* — **MEDIUM-HIGH** - [`behavioral-strategy`](references/behavioral-strategy.md) — Make algorithms interchangeable at runtime. *"I have multiple algorithms (sort, route, pay, compress) and want to pick one without conditionals."* — **HIGH** - [`behavioral-template-method`](references/behavioral-template-method.md) — Fix an algorithm's skeleton in a base class; subclasses override steps. *"Several classes share the same algorithm structure with minor step differences."* — **MEDIUM** - [`behavioral-visitor`](references/behavioral-visitor.md) — Add operations to an object structure without modifying the classes. *"I'd need to add 5 unrelated operations across an AST but I can't touch the node classes."* — **LOW-MEDIUM**
## How to Choose Between Similar Patterns
Several patterns share a structural shape but solve different problems. Read each pattern's **Related Patterns** section, then apply these distinctions:
- **Adapter vs. Facade vs. Proxy vs. Decorator** — all four wrap a target. *Adapter* changes the interface. *Facade* simplifies a subsystem. *Proxy* keeps the interface and controls access/lifecycle. *Decorator* keeps the interface and adds behavior recursively. - **Strategy vs. State** — both swap a delegated object. *Strategy* objects are independent; the client picks one. *State* objects know each other and trigger transitions on the context. - **Strategy vs. Template Method** — both vary parts of an algorithm. *Strategy* uses composition (swap at runtime). *Template Method* uses inheritance (fixed at compile time). - **Factory Method vs. Abstract Factory vs. Builder** — *Factory Method* returns one product through a single method. *Abstract Factory* returns a family of related products through several methods. *Builder* assembles one complex product step by step. - **Composite vs. Decorator** — both wrap children recursively. *Composite* sums or aggregates child results. *Decorator* adds responsibilities and passes through. - **Chain of Responsibility vs. Command vs. Mediator vs. Observer** — all connect senders and receivers. *CoR* passes a request along a chain. *Command* makes the request a first-class object. *Mediator* centralizes mutual communication. *Observer* establishes one-publisher-to-many-subscribers notification.
## Related Skills
- **[`implementation-functional-patterns`](../implementation-functional-patterns/SKILL.md)** — TypeScript's functional answer (HOFs, lambdas, pipelines, streams, composition) for problems where this catalog reaches for a class. Most Strategy / Iterator / Command / Chain-of-Responsibility / Decorator / Template-Method shapes have a lighter functional form in idiomatic TS; consult it before introducing a new class hierarchy.
## References
1. [Refactoring Guru — Design Patterns Catalog](https://refactoring.guru/design-patterns/catalog) 2. [Refactoring Guru — TypeScript Examples](https://refactoring.guru/design-patterns/typescript) 3. [Refactoring Guru — Creational Patterns](https://refactoring.guru/design-patterns/creational-patterns) 4. [Refactoring Guru — Structural Patterns](https://refactoring.guru/design-patterns/structural-patterns) 5. [Refactoring Guru — Behavioral Patterns](https://refactoring.guru/design-patterns/behavioral-patterns)
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implementation-design-patterns, ready for a manual X post.
implementation-design-patterns: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from re... 202 stars https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x
Listing + install path for implementation-design-patterns: https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x Install: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to pproenca but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns/audit)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)pproenca
@pproenca
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "implementation-design-patterns" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.curated/implementation-design-patterns. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"pproenca-implementation-design-patterns","task":"Install implementation-design-patterns","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Maintenance
fresh
21d since push
Risk
Risky
Permission surface may require sandboxing
GitHub quality
202
70/100 Quality · 74/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
202 GitHub stars
Repo activity
202 stars, 17 forks
Maintenance
21d since push
License
MIT
Install
npx skills add pproenca/dot-skills --skill implementation-design-patterns
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add pproenca/dot-skills --skill implementation-design-patternsDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
Agent should check
Copy prompt
Task: Use implementation-design-patterns in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implementation-design-patterns%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install
Install command: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/pproenca-implementation-design-patterns/install
LLM text format
/api/skills/pproenca-implementation-design-patterns/install?format=text
Find alternatives
/api/skills/search?q=implementation-design-patterns&limit=3
Agent prompt
Use implementation-design-patterns for this task. Review https://www.openagentskill.com/api/skills/pproenca-implementation-design-patterns/install, then install with: npx skills add pproenca/dot-skills --skill implementation-design-patternsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/pproenca-implementation-design-patterns
LLM text
/api/registry/manifest/pproenca-implementation-design-patterns?format=text
Install alias
/api/registry/install/pproenca-implementation-design-patterns
Recommend
/api/registry/recommend?task=Use%20implementation-design-patterns%20in%20an%20agent%20workflow&limit=3
Agent fit
Browser automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Browser automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO202 GitHub stars
Stars/forks activity
CHECK202 stars, 17 forks; issue activity unavailable in current metadata
Recent maintenance
PASS21d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: implementation-design-patterns description: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Use this skill when writing, refactoring, or reviewing TypeScript that exhibits a pattern-shaped problem — class-explosion from inheritance, conditionals switching on type, tight coupling to concrete classes, tree-shaped models, runtime algorithm selection, undo/redo, snapshot-and-restore, state-dependent behavior, subscriber notification, or hiding subsystem complexity. Each pattern entry includes intent, problem, solution, applicability (when to use AND when NOT to use), a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns. Trigger even when no pattern is named — cues like "class getting unwieldy," "giant switch," "swap implementations at runtime," "combinatorial subclasses," "need undo," or "traverse a tree" are pattern-shaped. Covers all 5 Creational, 7 Structural, and 10 Behavioral GoF patterns. ---
# TypeScript Design Patterns Best Practices (Refactoring Guru)
Implementation reference for the 22 Gang of Four design patterns in TypeScript, distilled from refactoring.guru. Each of the **22 pattern files across 3 categories** captures intent, problem, solution, applicability, a runnable TypeScript example, implementation steps, pros/cons, and relations to sibling patterns.
The patterns are a *vocabulary for structural decisions*, not a prescription. Reach for a pattern only when its applicability criteria match the problem at hand — every pattern entry includes a **When NOT to Use** section to guard against over-engineering.
## When to Apply
- Refactoring a class that has grown unwieldy via inheritance — combinatorial subclasses, conditional branching on type, or a "god class" with many responsibilities - Designing a new module whose collaborators are not yet fixed — you want to keep the interface stable while implementations vary - Integrating an incompatible third-party API, library, or legacy class into existing code - Modeling a tree-shaped domain (file systems, organization charts, expression ASTs, UI component trees) where leaves and branches must be treated uniformly - Adding cross-cutting behavior at runtime — logging, caching, access control, decoration — without subclassing - Selecting an algorithm or behavior variant at runtime based on configuration, user input, or environmental conditions - Implementing undo/redo, history snapshots, transactional rollback, or scheduling/queueing of operations - Coordinating many objects whose direct mutual references have become tangled — a hub that brokers communication - Notifying many subscribers when something changes — event systems, reactive data flows - Reviewing code that smells like a pattern is implicit (large switch on `kind`, parallel class hierarchies, identical algorithm skeletons across siblings) — make it explicit
## Rule Categories
| # | Category | Impact | Patterns | When to reach for this group | |---|----------|--------|----------|------------------------------| | 1 | **Creational** | HIGH | 5 | Object construction is non-trivial, varies by configuration, or risks tight coupling to concrete classes | | 2 | **Structural** | HIGH | 7 | Composing classes/objects into larger structures while keeping parts substitutable | | 3 | **Behavioral** | HIGH | 10 | Distributing responsibility and defining how objects collaborate at runtime |
## How to Use
1. **Recognize the shape.** Read the **Quick Reference** below and identify which pattern's intent matches your problem. Most pattern-shaped problems sound like one of the listed phrases. 2. **Read the pattern reference.** Open `references/{category}-{pattern}.md`. Confirm intent, then read **Applicability** and **When NOT to Use** before adopting. 3. **Adapt the example.** The TypeScript example uses pedagogical names (`ConcreteStrategyA`, `Receiver`). Rename to domain terms before merging. 4. **Check the relations.** Each entry ends with **Related Patterns** — siblings worth considering for the same problem.
## Quick Reference
### 1. Creational Patterns (object instantiation)
- [`creational-factory-method`](references/creational-factory-method.md) — Subclasses decide which concrete product to create. *"I need to add new product types without touching the creator code."* — **HIGH** - [`creational-abstract-factory`](references/creational-abstract-factory.md) — Produce families of related objects together. *"My code must work with multiple matching variants (chair+sofa+table) and shouldn't mix families."* — **MEDIUM-HIGH** - [`creational-builder`](references/creational-builder.md) — Construct complex objects step by step. *"My constructor has 10+ parameters or I have a telescoping-constructor smell."* — **HIGH** - [`creational-prototype`](references/creational-prototype.md) — Clone objects through their own `clone()` method. *"I need to copy objects without depending on their concrete class."* — **MEDIUM** - [`creational-singleton`](references/creational-singleton.md) — Guarantee a single shared instance with a global access point. *"I need exactly one instance of this class — config, registry, pool."* — **MEDIUM**
### 2. Structural Patterns (composition)
- [`structural-adapter`](references/structural-adapter.md) — Translate one interface to another. *"I need to use a library whose API doesn't match what my code expects."* — **HIGH** - [`structural-bridge`](references/structural-bridge.md) — Split abstraction from implementation so they can vary independently. *"I have two orthogonal dimensions and the subclass count is exploding."* — **MEDIUM** - [`structural-composite`](references/structural-composite.md) — Treat individual objects and compositions uniformly. *"I have a tree (folders/files, groups/items, components/children) and want one interface for leaves and branches."* — **HIGH** - [`structural-decorator`](references/structural-decorator.md) — Wrap an object to add behavior without subclassing. *"I want to layer behaviors (logging + caching + auth) on the same interface at runtime."* — **HIGH** - [`structural-facade`](references/structural-facade.md) — Expose a simple interface over a complex subsystem. *"My client code is tangled in initialization and orchestration of a third-party library."* — **HIGH** - [`structural-flyweight`](references/structural-flyweight.md) — Share common state across many objects to save memory. *"I'm spawning millions of similar objects and running out of RAM."* — **LOW-MEDIUM** - [`structural-proxy`](references/structural-proxy.md) — Substitute for another object to control access. *"I need lazy loading, access control, caching, or logging without touching the real subject."* — **MEDIUM-HIGH**
### 3. Behavioral Patterns (collaboration)
- [`behavioral-chain-of-responsibility`](references/behavioral-chain-of-responsibility.md) — Pass a request along a chain of handlers. *"I have a pipeline of validation / auth / parsing checks and want to add or reorder them dynamically."* — **MEDIUM-HIGH** - [`behavioral-command`](references/behavioral-command.md) — Turn a request into a stand-alone object. *"I need undo/redo, queueing, scheduling, macro recording, or to decouple invoker from receiver."* — **HIGH** - [`behavioral-iterator`](references/behavioral-iterator.md) — Traverse a collection without exposing its representation. *"I want clients to walk a structure without knowing if it's a list, tree, or graph."* — **HIGH** - [`behavioral-mediator`](references/behavioral-mediator.md) — Centralize communication among components in a single hub. *"My form fields all reference each other directly and the coupling is unmanageable."* — **MEDIUM** - [`behavioral-memento`](references/behavioral-memento.md) — Capture and restore an object's state without breaking encapsulation. *"I need snapshots for undo/redo or transactional rollback."* — **LOW-MEDIUM** - [`behavioral-observer`](references/behavioral-observer.md) — Notify dependent objects when state changes. *"Many objects need to react when one object changes — events, reactive UI, pub/sub."* — **CRITICAL** - [`behavioral-state`](references/behavioral-state.md) — Alter behavior when internal state changes. *"My class is a state machine with massive conditionals branching on a `status` field."* — **MEDIUM-HIGH** - [`behavioral-strategy`](references/behavioral-strategy.md) — Make algorithms interchangeable at runtime. *"I have multiple algorithms (sort, route, pay, compress) and want to pick one without conditionals."* — **HIGH** - [`behavioral-template-method`](references/behavioral-template-method.md) — Fix an algorithm's skeleton in a base class; subclasses override steps. *"Several classes share the same algorithm structure with minor step differences."* — **MEDIUM** - [`behavioral-visitor`](references/behavioral-visitor.md) — Add operations to an object structure without modifying the classes. *"I'd need to add 5 unrelated operations across an AST but I can't touch the node classes."* — **LOW-MEDIUM**
## How to Choose Between Similar Patterns
Several patterns share a structural shape but solve different problems. Read each pattern's **Related Patterns** section, then apply these distinctions:
- **Adapter vs. Facade vs. Proxy vs. Decorator** — all four wrap a target. *Adapter* changes the interface. *Facade* simplifies a subsystem. *Proxy* keeps the interface and controls access/lifecycle. *Decorator* keeps the interface and adds behavior recursively. - **Strategy vs. State** — both swap a delegated object. *Strategy* objects are independent; the client picks one. *State* objects know each other and trigger transitions on the context. - **Strategy vs. Template Method** — both vary parts of an algorithm. *Strategy* uses composition (swap at runtime). *Template Method* uses inheritance (fixed at compile time). - **Factory Method vs. Abstract Factory vs. Builder** — *Factory Method* returns one product through a single method. *Abstract Factory* returns a family of related products through several methods. *Builder* assembles one complex product step by step. - **Composite vs. Decorator** — both wrap children recursively. *Composite* sums or aggregates child results. *Decorator* adds responsibilities and passes through. - **Chain of Responsibility vs. Command vs. Mediator vs. Observer** — all connect senders and receivers. *CoR* passes a request along a chain. *Command* makes the request a first-class object. *Mediator* centralizes mutual communication. *Observer* establishes one-publisher-to-many-subscribers notification.
## Related Skills
- **[`implementation-functional-patterns`](../implementation-functional-patterns/SKILL.md)** — TypeScript's functional answer (HOFs, lambdas, pipelines, streams, composition) for problems where this catalog reaches for a class. Most Strategy / Iterator / Command / Chain-of-Responsibility / Decorator / Template-Method shapes have a lighter functional form in idiomatic TS; consult it before introducing a new class hierarchy.
## References
1. [Refactoring Guru — Design Patterns Catalog](https://refactoring.guru/design-patterns/catalog) 2. [Refactoring Guru — TypeScript Examples](https://refactoring.guru/design-patterns/typescript) 3. [Refactoring Guru — Creational Patterns](https://refactoring.guru/design-patterns/creational-patterns) 4. [Refactoring Guru — Structural Patterns](https://refactoring.guru/design-patterns/structural-patterns) 5. [Refactoring Guru — Behavioral Patterns](https://refactoring.guru/design-patterns/behavioral-patterns)
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implementation-design-patterns, ready for a manual X post.
implementation-design-patterns: Implementation guide for the 22 Gang of Four design patterns in TypeScript, distilled from re... 202 stars https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x
Listing + install path for implementation-design-patterns: https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=x Install: npx skills add pproenca/dot-skills --skill implementation-design-patterns
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to pproenca but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns/audit)
[](https://www.openagentskill.com/skills/pproenca-implementation-design-patterns?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)pproenca
@pproenca
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsPermission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness