software-design-patterns-and-refactoring

Featured

Use when architecture or backend work needs pre-code structural guidance from design patterns, or post-code cleanup guidance from refactoring and code-smell-driven improvement.

Code & Development 32 stars 6 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
51
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Design Patterns and Refactoring ## Overview This skill captures one practical truth: design-pattern thinking is useful before coding, and refactoring thinking is useful after coding — but both can improve the structure of the system when used with restraint. Its purpose is not to dump a giant catalog of pattern names. Its purpose is to help decide: - when a structural problem exists before coding - which pattern family is worth considering - when code smells indicate refactoring pressure - how to improve structure without turning the code into abstraction theater Core principle: **patterns are design tools, refactoring is structure repair, and both should serve clarity of responsibility rather than decorative cleverness.** ## When to Use Use when: - the team is deciding a class/module collaboration structure before coding - code review reveals repeated structure problems or code smells - a change is easier to express as a structural pattern decision than as ad hoc branching - implementation is becoming hard to extend, test, or reason about - you need one practical bridge between pre-code design and post-code cleanup Do not use when: - the problem is fundamentally domain-boundary or system-architecture design - the task is a trivial code change with no structural pressure - the user only wants pattern definitions without design judgment - the code is so small that introducing indirection would only make it worse ## Two Main Uses ### 1. Before-code structural guidanc...

Details

Author
xiaohei-info
Repository
xiaohei-info/oh-my-multica
Created
2 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

code-design-patterns

Choose, apply, and critique software design patterns — GoF (Strategy, Factory, Observer, State, Decorator, Adapter, Command), architectural (dependency injection, repository, hexagonal/ports-and-adapters, CQRS, event sourcing), concurrency (worker pool, pipeline, fan-out/fan-in, actor), distributed resilience (circuit breaker, retry/backoff, bulkhead, saga, outbox, idempotency key, rate limiter), and frontend component patterns (compound components, hooks, providers). Use whenever the work involves object-oriented or component design, class modelling, low-level design (LLD) or machine-coding problems, "design a parking lot / elevator / rate limiter"-style tasks, refactoring toward SOLID, reviewing a class design, structuring a new module or service, or any question touching design patterns, code architecture, extensibility, coupling, or code smells — even when the user never says "design pattern". Also use it to grade a design against a rubric before presenting it.

0 Updated 1 months ago
00suryavanshi00
Code & Development Listed

patterns-and-refactoring

Use before designing or writing any non-trivial code, before any refactor, and when reviewing a design or pull request for structure. Triggers on designing a class, service, module or package; choosing an approach; "how should I structure this"; refactoring, cleaning up, "this code is messy"; legacy migration; adding a feature to tangled code; and reviewing someone else's abstractions. Covers GoF, refactoring techniques, code smells, PoEAA, architectural, DDD, distributed, messaging, concurrency, functional and frontend patterns, anti-patterns, testing shapes, and per-stack framework idioms.

4 Updated 1 weeks ago
christianpasinrey
Code & Development Listed

refactor-to-patterns

Plans refactoring as an ordered succession of named refactorings from Fowler's *Refactoring* and Kerievsky's *Refactoring to Patterns*, after first ruling out removing code rather than adding it, and presents the plan for approval before any edit. Use this whenever the user asks to refactor, restructure, clean up, simplify, deduplicate, decouple, generalize, or redesign existing code — including indirect phrasings like "this class is a mess", "too much duplication here", "untangle this", "reduce the branching", "this function is too long", or "make this extensible". Also use it when a feature request or bug fix cannot be done cleanly in the current structure — when the obvious implementation would mean copy-pasting logic, adding yet another branch to a conditional, or threading a parameter through several layers — because the restructuring needs to be planned, approved, and committed separately before the change itself.

0 Updated 4 days ago
dgutson