本文へスキップ
Kitbay
スキル

refactor

MIT2026年11月3日 更新46,944GitHubスタースクリプトあり

An example skill from the claude-howto guide to Claude Code for refactoring code in phases, following Martin Fowler's approach of changing structure without changing behaviour.

スキルの内容

An example skill from the claude-howto guide to Claude Code for refactoring code in phases, following Martin Fowler's approach of changing structure without changing behaviour. The agent first clarifies scope and reads the code, then checks test coverage and offers to write tests before changing anything. It lists code smells, optionally with a bundled detection script, maps each to refactorings, and plans them in tiers from quick renames to structural and architectural changes, asking for approval at each phase. Changes are made one small step at a time, with tests run and a commit after each green step, and complexity is compared before and after. Reference files hold the smell and refactoring catalogues.

できること

  • Identify code smells with locations
  • Plan refactorings in risk tiers
  • Refactor in small tested commits
  • Compare complexity before and after