Refactor the selected code to improve its quality while maintaining the same functionality, providing the refactored code with explanations of the improvements made.
Steps
Code Quality Improvements
Extract reusable functions or components
Eliminate code duplication
Improve variable and function naming
Simplify complex logic and reduce nesting
Performance Optimizations
Identify and fix performance bottlenecks
Optimize algorithms and data structures
Reduce unnecessary computations
Improve memory usage
Maintainability
Make the code more readable and self-documenting
Add appropriate comments where needed
Follow SOLID principles and design patterns
Improve error handling and edge case coverage
Refactor Code Checklist
Extracted reusable functions or components
Eliminated code duplication
Improved variable and function naming
Simplified complex logic and reduced nesting
Identified and fixed performance bottlenecks
Optimized algorithms and data structures
Made code more readable and self-documenting
Followed SOLID principles and design patterns
Improved error handling and edge case coverage
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: gologo13-agent-skills-refactor-code3description: Refactor Code4---56# Refactor Code78## Overview910Refactor the selected code to improve its quality while maintaining the same functionality, providing the refactored code with explanations of the improvements made.1112## Steps13141. **Code Quality Improvements**15 - Extract reusable functions or components16 - Eliminate code duplication17 - Improve variable and function naming18 - Simplify complex logic and reduce nesting192. **Performance Optimizations**20 - Identify and fix performance bottlenecks21 - Optimize algorithms and data structures22 - Reduce unnecessary computations23 - Improve memory usage243. **Maintainability**25 - Make the code more readable and self-documenting26 - Add appropriate comments where needed27 - Follow SOLID principles and design patterns28 - Improve error handling and edge case coverage2930## Refactor Code Checklist3132- [ ] Extracted reusable functions or components33- [ ] Eliminated code duplication34- [ ] Improved variable and function naming35- [ ] Simplified complex logic and reduced nesting36- [ ] Identified and fixed performance bottlenecks37- [ ] Optimized algorithms and data structures38- [ ] Made code more readable and self-documenting39- [ ] Followed SOLID principles and design patterns40- [ ] Improved error handling and edge case coverage4142---43> Converted and distributed by [TomeVault](https://tomevault.io/claim/gologo13) — claim your Tome and manage your conversions.44<!-- tomevault:4.0:skill_md:2026-04-15 -->
Run npx skillmds@latest add tomevault-io/gologo13-agent-skills-refactor-code in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Refactor Code It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.