About this skill
A reusable Coding skill centered on Legacy Code Refactor to Modern Design Patterns. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.
Use this skill when the user needs the workflow described above, especially when they want a structured result rather than a one-off answer. A reusable Coding skill centered on Legacy Code Refactor to Modern Design Patterns. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.
Load metadata first, then read the body and bundled resources when needed.
Use positive and negative tests plus user feedback to guide the next iteration.
Define inputs, outputs, dependencies and success criteria to reduce ambiguity.
Skill files
Analyze the following legacy code snippet: {{code}}.
1. Identify the primary architectural flaws (e.g., deep nesting, violation of Single Responsibility Principle, hard-coded dependencies).
2. Select the most appropriate modern design pattern (e.g., Strategy, Adapter, Decorator, or Repository) to resolve these issues.
3. Provide the refactored code implementation in {{language}}, ensuring strict adherence to SOLID principles.
4. Create a 'Mapping Table' showing which old functions/blocks were replaced by which new components.
5. Explain why this specific pattern was chosen over alternatives to improve scalability and testability.nameLegacy Code Refactor to Modern Design PatternsdescriptionUse this skill when the user needs the workflow described above, especially when they want a structured result rather than a one-off answer. A reusable Coding skill centered on Legacy Code Refactor to Modern Design Patterns. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.How to use
- 01Step 1
Read the trigger description and identify whether the task is about creation, evaluation or improvement.
- 02Step 2
Open SKILL.md and confirm the input, output and bundled resource requirements.
- 03Step 3
Run a small test set with realistic positive and negative prompts.
- 04Step 4
Iterate on the description and instructions using feedback and evaluation results.
Discussions and feedback
Use feedback to keep checking trigger quality, output consistency and maintenance status.