refactor-code

Analyze git diffs against refactoring principles and output suggestions with line references.

1|Updated Dec 30, 2024
One-click install
npx skills add https://github.com/FarzamMohammadi/dev-toolbox --skill refactor-code-farzammohammadi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-code
Source: https://github.com/FarzamMohammadi/dev-toolbox/tree/main/ai/claude-code/skills/refactor-code
Command: npx skills add https://github.com/FarzamMohammadi/dev-toolbox --skill refactor-code-farzammohammadi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill analyzes git diffs and assesses changes against a comprehensive refactoring framework to surface maintainability issues.

Core Features & Use Cases

  • Review diffs against SRP, cohesion, coupling, naming, and other design principles.
  • Generate actionable refactor suggestions with precise line references for modified files.
  • Integrate with code review workflows by producing a structured report that highlights risks and recommended changes.

Quick Start

Analyze the current git diff and output a concrete refactor plan for the changed files.

Frequently Asked Questions about refactor-code

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

FAQPage Schema
How do I review a git diff for code maintainability issues?

To review a git diff for maintainability, the skill analyzes modified files against design principles like Single Responsibility, High Cohesion, and Low Coupling, then outputs a structured report with actionable refactoring suggestions and line references.

What design principles are checked during an automated code refactor?

An automated code refactor checks changes against Single Responsibility, High Cohesion, Low Coupling, meaningful naming, and minimal surface area principles to surface maintainability risks in modified files.

Can I get actionable refactoring guidance with specific line references?

Yes, you can get actionable refactoring guidance with precise line references. The skill evaluates your git diff and generates concrete suggestions targeting maintainability issues in the changed code.

What is the best way to enforce software design principles in a pull request?

The best way to enforce software design principles in a pull request is to analyze the git diff against a refactoring framework, surfacing coupling and naming issues while generating a structured report of recommended changes.

Does this refactoring framework work without external dependencies?

Yes, the refactoring framework works without external dependencies. It internally evaluates git diffs against maintainability principles to produce refactor suggestions, requiring no additional components or libraries.