refactoring

リファクタリングのガイドラインと手順

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 29, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill provides a comprehensive framework for code refactoring, focusing on maintaining system stability and long-term maintainability. It establishes rigorous guidelines for impact analysis, backward compatibility, and principled abstraction, helping developers transform legacy code into scalable architectures while minimizing technical debt and deployment risks.

Use Cases

  • Legacy System Modernization: Safely restructuring old codebases by following step-by-step migration protocols and ensuring backward compatibility.
  • Technical Debt Reduction: Replacing temporary 'band-aid' fixes with fundamental abstractions and root-cause solutions to improve code health.
  • Risk-Managed Refactoring: Using impact identification and immediate rollback procedures to ensure that structural changes do not disrupt existing services.
  • Standardized Development Workflows: Implementing consistent commit messaging and troubleshooting standards across engineering teams to improve collaboration and code auditability.
namerefactoring
descriptionリファクタリングのガイドラインと手順

リファクタリングのコーディング規約

  • 影響範囲の特定: 影響範囲を明確化し、関連箇所を全て一貫して修正する。
  • 後方互換性: 既存機能を置き換える場合は、後方互換性を保ちながら段階的移行を行う。
  • コミットメッセージ: 変更の意図と結果を明確に記述し、あいまいなコミットメッセージを避ける。
  • トラブルシューティング:
    • 異常発生時は即座にロールバックを行い、原因究明は後で冷静に行う。
    • 原因が明確でなく問題の原因となる可能性だけが見つかった場合、即座にその可能性に対して改善するのではなく、ログを追加して原因を特定する。
  • 根本解決: 一時的な修正を避け、根本的な抽象化による解決を優先する。
  • 抽象化の原則: 抽象化レイヤーでは、インターフェース分離・設定駆動・段階的移行・障害隔離を原則とする。