Pular para o conteúdo
Kitbay
Skill

refactor

MITAtualizado em 3 de nov. de 202646.944Estrelas no GitHubInclui scripts

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.

O que a skill ensina

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.

O que faz

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