Skip to content
Back to skills

Design Pattern Implementer

ASecurity

Refactor code to apply object-oriented design patterns (Factory, Strategy, Observer, Decorator, Adapter) cleanly.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 27, 2026
developmenttypescriptpythongonoderefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add RMAzrim/opencode-artes --skill design-pattern-implementer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Pattern Implementer?

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

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

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

Download with Pro
SKILL.md
---
name: Design Pattern Implementer
description: Refactor code to apply object-oriented design patterns (Factory, Strategy, Observer, Decorator, Adapter) cleanly.
metadata:
  source: skills/design-pattern-implementer/design-pattern-implementer.md
---

# Design Pattern Implementer

## Prerequisites & Dependencies
- Node.js 18+ or Python 3.10+ with refactoring tools enabled
- IDE support (VS Code, IntelliJ) for pattern detection
- Working knowledge of OOP principles and UML diagrams

## Execution Steps
1. Survey the codebase and identify areas suffering from tight coupling or rigid structure
2. Select the appropriate pattern (Factory for object creation, Strategy for interchangeable algorithms, Observer for event handling, Decorator for adding responsibilities, Adapter for interface compatibility)
3. Apply the pattern by extracting interfaces, creating wrapper classes, or restructuring method calls, preserving external API contracts
4. Run existing tests to verify behavioral parity and ensure no regressions
5. Document the pattern choice and rationale in the project's architecture guide

```typescript
// Factory pattern example in TypeScript
interface Product {
  id: string;
  name: string;
  price: number;
}

class ConcreteProductA implements Product {
  id = 'a'; name = 'Alpha'; price = 10;
}
class ConcreteProductB implements Product {
  id = 'b'; name = 'Beta'; price = 20;
}

class Factory {
  static create(type: string): Product {
    switch (type) {
      case 'a': return new ConcreteProductA();
      case 'b': return new ConcreteProductB();
      default: throw new Error('Unknown product type');
    }
  }
}

const p = Factory.create('a');
console.log(p); // { id: 'a', name: 'Alpha', price: 10 }
```

Attribution

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

Comments

Loading comments…

Newsletter

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