code-refactor-master

Apply incremental refactorings like Extract Method and Inline Method.

140|57|Updated Aug 21, 2016
One-click install
npx skills add https://github.com/yennanliu/CS_basics --skill code-refactor-master-yennanliu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactor-master
Source: https://github.com/yennanliu/CS_basics/tree/main/.claude/skills/code-refactor-master
Command: npx skills add https://github.com/yennanliu/CS_basics --skill code-refactor-master-yennanliu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams reduce code smells and technical debt by applying safe, incremental refactorings that preserve external behavior.

Core Features & Use Cases

  • Extract Method: Break down large methods into smaller, focused functions to improve readability.
  • Inline Method: Simplify code by removing unnecessary abstractions when a method is trivially delegating.
  • Replace Temp with Query: Improve readability by extracting computed values into descriptive methods.
  • Refactoring Workflow: Plan, implement, and test changes incrementally to maintain backwards compatibility.

Quick Start

Start with a small, well-tested module. Identify a long method, extract a named helper, then run the test suite to ensure behavior remains unchanged.