software-design-patterns-and-refactoring
FeaturedUse 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.
Install
Quality Score: 88/100
Skill Content
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
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.
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.
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.