code-refactor

Refactor codebases to improve readability and maintainability without altering behavior.

1|Updated Dec 14, 2014
One-click install
npx skills add https://github.com/goldeneggg/dotfiles --skill code-refactor-goldeneggg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactor
Source: https://github.com/goldeneggg/dotfiles/tree/main/claude-linux/.claude/skills/code-refactor
Command: npx skills add https://github.com/goldeneggg/dotfiles --skill code-refactor-goldeneggg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

コードの可読性と保守性を向上させたいときに、既存コードのリファクタリングを支援します。長期的な開発では、命名の改善、関数の分割、依存関係の整理が重要です。

Core Features & Use Cases

  • 可読性の向上と冗長なコードの削減
  • 機能の分割とモジュール化
  • リファクタリング後の動作が変わらないことの検証と説明

Quick Start

リファクタリングしたコードベースを提示して、振る舞いを保持しつつ可読性と設計を改善してください。

Frequently Asked Questions about code-refactor

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

FAQPage Schema
How do I refactor code to improve readability and maintainability without changing its behavior?

Refactoring code for readability and maintainability involves improving naming, splitting functions, and organizing dependencies while preserving the original behavior. This Skill takes your existing codebase, documents each change with rationale, and outputs a before/after comparison to verify behavior remains unchanged.

What is the best way to clean up a medium-sized codebase during feature addition?

Cleaning up a medium-sized codebase during feature addition is best handled by enforcing non-behavior-changing refactors. This process reduces redundant code, modularizes functions, and provides documented rationale for every modification to ensure long-term maintainability without breaking existing features.

Can I use this refactoring approach for large enterprise codebases?

This refactoring approach is applicable to small to medium codebases during maintenance, feature addition, or code cleanup tasks. It is not explicitly designed for large enterprise codebases, so results may vary depending on the scale and complexity of the project.

How does refactoring verify that code behavior does not change?

Refactoring verifies behavior remains unchanged by enforcing non-behavior-changing modifications and documenting changes with rationale. The Skill outputs a before/after comparison that allows you to visually confirm the external behavior is preserved while internal readability and structure are improved.

When do I need to refactor code for maintainability?

You need to refactor code for maintainability during long-term development when facing naming issues, large unsplit functions, or tangled dependencies. It is specifically useful during maintenance phases, feature additions, or general code cleanup tasks to reduce redundant logic and improve modular design.

Does code refactoring reduce redundant code and improve modularization?

Yes, code refactoring reduces redundant code and improves modularization by splitting large functions and organizing dependencies. This Skill enforces these structural improvements while documenting the rationale behind each change, resulting in a cleaner, more maintainable codebase with a before/after comparison.