apply-patterns

Map GoF design-pattern smells to concrete before/after structural solutions.

11|2|Updated Apr 7, 2022
One-click install
npx skills add https://github.com/nullhack/temple8 --skill apply-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apply-patterns
Source: https://github.com/nullhack/temple8/tree/main/.opencode/skills/apply-patterns
Command: npx skills add https://github.com/nullhack/temple8 --skill apply-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translating GoF design-pattern smells into concrete, actionable structural solutions to guide safe, maintainable refactoring.

Core Features & Use Cases

  • Pattern catalog reference: Creational, Structural, and Behavioral GoF patterns with concise intent and examples.
  • Smell-to-pattern mapping: Translate common code smells into recommended GoF patterns and concrete implementation steps.
  • Before/after guidance: Provide explicit structural changes and rationale to enable predictable, auditable refactors.
  • Authoritative sources: Cites Gamma et al. and Refactoring.Guru for evidence-based decision making.

Quick Start

Load this skill when a refactor smell points to a GoF pattern to receive a structured, pattern-driven refactor plan.

Frequently Asked Questions about apply-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map code smells to GoF design patterns for refactoring?

To map code smells to GoF design patterns, you identify structural issues in your code and match them to pattern categories like creational, structural, or behavioral. This skill provides explicit before and after structural changes with rationale for predictable refactors.

What is the best way to apply GoF creational and structural patterns during a refactor?

The best way to apply GoF creational and structural patterns is by using a smell-to-pattern mapping table that points to precise implementation steps. This provides explicit structural changes and rationale to enable predictable, auditable refactors based on authoritative sources.

When do I need to use design patterns for code refactoring?

You need to use design patterns for code refactoring when specific code smells indicate underlying structural deficiencies. When a smell table points to a GoF pattern, translating it into a concrete structural solution helps guide safe, maintainable refactoring with clear before and after states.

How do I get before and after implementation guidance for a GoF pattern?

To get before and after implementation guidance for a GoF pattern, you reference a pattern catalog that provides explicit structural changes and rationale. This skill translates pattern smells into actionable structural solutions, citing Gamma et al. and Refactoring.Guru for evidence.

Do I need a specific code smell table to refactor using GoF patterns?

Yes, you need a smell table pointing to a GoF pattern to receive a structured, pattern-driven refactor plan. This skill applies to refactoring tasks where identified code smells are matched with creational, structural, and behavioral pattern categories for concrete implementation.

Why use GoF patterns instead of other refactoring approaches for structural code smells?

GoF patterns offer standardized, authoritative structural solutions compared to ad-hoc refactoring approaches. Citing sources like Gamma et al. and Refactoring.Guru, this method ensures evidence-based decision making and produces auditable, maintainable structural changes across all pattern categories.