Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

design-patterns

A skills.sh skill that applies Gang-of-Four design patterns and clean-code principles to write well-structured, maintainable, best-practice object-oriented code.

Distilled from Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, Helm, Johnson, Vlissides) into a decision-first guide: pick the pattern from what you want to vary, apply the principles that prevent the coupling in the first place, and resist over-engineering.

What's inside

  • 5 governing principles — program to an interface, favor composition over inheritance, encapsulate what varies, single responsibility, decouple the caller.
  • The selection table — "what you want to vary → which pattern" (the fastest picker).
  • Full catalog of all 23 GoF patterns — intent, when to apply, participants, and consequences/trade-offs.
  • Clean-code rules and a project-refactor sub-workflow for safely refactoring a whole project into design-pattern-rich code without breaking it.

Install

Install into all your agents (Claude Code, Codex, Cursor, OpenCode, and 70+ more):

npx skills add MamounHisham1/design-patterns

Install into a specific agent only:

npx skills add MamounHisham1/design-patterns -a claude-code

Install globally (available across all projects):

npx skills add MamounHisham1/design-patterns -g

Use it once without installing:

npx skills use MamounHisham1/design-patterns

Usage

Once installed, the skill is auto-discovered. Ask your agent things like:

  • "Design a notification system that decouples senders from handlers"
  • "This module is tangled — refactor it cleanly"
  • "Make this project design-pattern-rich / best practice" → triggers the project-refactor workflow

The project-refactor workflow runs a strict safety pipeline: scope → survey → inventory → plan → branch → (optionally parallelize) → execute → verify → summarize. It never breaks the project, always branches first (and asks before creating the branch), and asks before parallelizing with subagents.

License

MIT — see LICENSE.

About

skills.sh skill: GoF design patterns + clean-code principles + a safe whole-project refactor workflow (branch-first, never-breaks, opt-in parallelism)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors