Skip to content
Agentmart
Submit a tool

design-patterns

Design patterns — KISS, YAGNI, DRY, SOLID, GoF, DDD reference.

Skill by Dev-Toolbelt

IndexedMIT★ 7
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dev-toolbelt-design-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Design patterns — KISS, YAGNI, DRY, SOLID, GoF, DDD reference.

Use cases: design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/design-patterns

What's inside

Skill name
design-patterns
Description
Design patterns — KISS, YAGNI, DRY, SOLID, GoF, DDD reference.
License
MIT
Instructions
149 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • composition-root.md · references/

SKILL.md (first lines)

# Design Patterns

## Pragmatic Engineering Principles

These principles apply at every layer of the stack, independent of language or framework.

| Principle | Rule | Violated when... |
|-----------|------|------------------|
| **KISS** — Keep It Simple | Prefer the simplest solution that correctly solves the problem | A simpler approach exists but a more complex one was chosen without justification |
| **YAGNI** — You Aren't Gonna Need It | Don't build features, abstractions, or generalization until they are actually needed | Code is written for a hypothetical future requirement that doesn't exist yet |
| **DRY** — Don't Repeat Yourself | Every piece of knowledge has a single, authoritative representation | Logic, validation rules, or configuration are duplicated across two or more places |

### KISS — Observable violations
- Multiple layers of indirection for a straight-line operation
- Abstract base classes or interfaces with a single implementation
- Configuration system for a value that never changes
- Helper utilities that wrap a single built-in function call

### YAGNI — Observable violations
- Methods, parameters, or flags added "for future use"
- Generic or pluggable architecture for a system with one known use case
- Premature abstraction before a second consumer exists
- Feature flags or extension points with no current users

### DRY — Observable violations
- Copy-pasted logic across two or more files
- Identical validation rules defined independently per endpoint or form
- Hardcoded values (strings, numbers, URLs) repeated in multiple places
- Parallel data structures that must be kept manually in sync

---

## SOLID Principles

| Principle | Rule |
|-----------|------|
| **S** — Single Responsibility | A class/module has one reason to change |
| **O** — Open/Closed | Open for extension, closed for modification |
| **L** — Liskov Substitution | Subtypes must be substitutable for their base types |
| **I** — Interface Segregation | Clients should not depend on interfaces they don't use |
| **D** — Dependency Inversion | Depend on abstractions, not concretions |

---

## Creational Patterns

### Factory Method
Creates objects without specifying the exact class. Use when the creation logic may vary or is complex.
```
Creator → factoryMethod() → Product
```

### Abstract Factory
Creates families of related objects. Use when the system needs to be independent of how products are created.

### Builder
Constructs complex objects step by step. Use when an object has many optional parameters or construction phases.

### Singleton
Ensures a class has only one instance. Use sparingly — prefer dependency injection. Avoid in testable code.

---

## Structural Patterns

### Adapter
Converts an interface into another that clients expect. Use for integrating incompatible interfaces (e.g., third-party SDKs).

### Decorator
Adds responsibilities to objects dynamically. Prefer over subclassing for feature composition.

### Facade
Provides a simplified interface to a complex subsystem. Use to hide complexity from callers.

### Repository
Abstracts data access behind an interface. Decouples business logic from persistence technology.

### Proxy
Controls access to an object (lazy loading, caching, access control, logging).

---

## Behavioral Patterns

### Strategy
Defines a family of algorithms and makes them interchangeable. Use when behavior varies and should be swappable at runtime.

### Observer
Defines a one-to-many dependency so that when one object changes state, its dependents are notified. Use for event-driven systems.

### Command
Encapsulates a request as an object. Enables undo, queuing, and logging of operations.

### Chain of Responsibility
Passes a request through a chain of handlers. Use for pipelines (middleware, validation chains).

### Template Method
Defines the skeleton of an algorithm, deferring steps to subclasses. Use when multiple implementations share a common process.

---

## Domain-Driven Patterns

### Value Object
Immutable object defined by its attributes, not identity. Use for things like Money, Email, Address.

### Entity
Object with a unique identity that persists over time. Has a lifecycle (create, update, delete).

### Aggregate
Cluster of entities and value objects treated as a unit. Defines a consistency boundary.

### Service
Stateless operation that doesn't naturally belong to an entity or value object.

### Repository (DDD)
Provides collection-like access to aggregates. Hides storage details.

---

From Dev-Toolbelt/dev-team-agents, MIT.

More from Dev-Toolbelt/dev-team-agents

Signals

Stars
7
Forks
0
Open issues
0
Last commit (this folder)
Oct 18, 2026 (10 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Dev-Toolbelt

Cite this page

design-patterns skill. Agent Mart. https://agentmart.dev/skills/dev-toolbelt-design-patterns (last updated 2026-10-24)