refactor-patterns

Rename functions and variables across a codebase with boundary checks.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/twlines/maslow --skill refactor-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-patterns
Source: https://github.com/twlines/maslow/tree/main/skills/refactor-patterns
Command: npx skills add https://github.com/twlines/maslow --skill refactor-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides structured, safe, and repeatable patterns for common code refactoring tasks, minimizing the risk of introducing bugs or breaking existing functionality.

Core Features & Use Cases

  • Renaming: Safely rename functions and variables across an entire codebase.
  • Moving: Efficiently move functions between files while updating all references.
  • Extracting Services: Guidance on splitting large services into smaller, manageable units.
  • Use Case: When a function name is no longer descriptive, use this Skill's renaming pattern to ensure all its uses are updated consistently, preventing compilation errors and improving code clarity.

Quick Start

Follow the refactor patterns to rename the 'process_data' function to 'transform_data' across the project.

Frequently Asked Questions about refactor-patterns

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

FAQPage Schema
How do I safely rename functions and variables across an entire codebase?

To safely rename functions and variables across a codebase, apply structured refactoring patterns that ensure all references are updated consistently, perform boundary checks, and prevent compilation errors. This minimizes the risk of breaking existing functionality.

What is the best way to move functions between files without breaking imports?

The best way to move functions between files is using systematic refactoring patterns that update all references and verify import path correctness. This prevents circular imports and ensures boundary checks maintain existing software functionality.

How do I split large services into smaller, manageable units during code maintenance?

To split large services during code maintenance, use refactoring patterns for extracting services. This provides structured guidance on dividing code into smaller units while ensuring import path correctness and preventing circular imports.

When do I need to use structured refactoring patterns for code evolution?

You need structured refactoring patterns for code evolution when performing systematic code maintenance like renaming or moving functions. These patterns ensure safe, repeatable processes by enforcing boundary checks and import path correctness to minimize bug introduction.

Can I use these refactoring patterns for code maintenance in any software development project?

Yes, you can use these refactoring patterns for code maintenance in any software development project. They provide a systematic approach to safely renaming variables, moving functions, and extracting services regardless of the specific platform.

What are the limitations of using standard refactoring patterns for code maintenance?

Limitations of using standard refactoring patterns include the need to manually ensure boundary checks and import path correctness. While they minimize bug risks, developers must still verify prevention of circular imports when extracting or moving services.