refactor

Invoke a Python script to orchestrate refactoring analysis workflows.

42|3|Updated Mar 5, 2021
One-click install
npx skills add https://github.com/fmoda3/nix-configs --skill refactor-fmoda3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/fmoda3/nix-configs/tree/main/home/claude-code/config/skills/refactor
Command: npx skills add https://github.com/fmoda3/nix-configs --skill refactor-fmoda3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill immediately orchestrates a refactoring analysis workflow by invoking a Python script when a user requests refactoring analysis, technical debt review, or code quality improvement, eliminating the need to manually start the exploration process.

Core Features & Use Cases

  • Immediate orchestration of the refactor workflow: Dispatching domain context, principle extraction, pattern generation, search, synthesis, and output of actionable work items.
  • Supports multi-category analysis for larger codebases and iterative triage and clustering to prioritize changes.
  • Use Case: A developer wants to quickly generate a prioritized set of concrete refactor tasks for a sprawling module without manually coordinating steps.

Quick Start

Invoke the refactor workflow immediately using the provided script: <invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.refactor.refactor --step 1 --n 10" /> Use the --step and --n parameters to adjust the scope if needed (e.g., --step 2 --n 5 for a smaller pass).

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I automate a code refactor analysis workflow for a large module?

You can automate refactor analysis by invoking a Python script that orchestrates domain context dispatch, principle extraction, pattern generation, and prioritized work item output. This workflow supports multi-category analysis and iterative triage for large codebases without manual coordination.

What is the best way to generate a prioritized technical debt review for a software project?

A prioritized technical debt review is generated by running an automated refactor workflow that performs multi-category analysis and iterative clustering. The script produces a structured, actionable set of refactor tasks, eliminating the need to manually initiate the exploration process.

Do I need Python to run the automated code quality assessment workflow?

Yes, you need a Python runtime installed to execute the refactor analysis script. The workflow is triggered by invoking a Python module located under the .claude/skills/scripts directory, using optional parameters to control the analysis scope.

How do I control the scope of an automated refactor exploration pass?

You control the refactor exploration scope by passing optional parameters --step and --n to the Python script. For example, using --step 2 --n 5 executes a smaller analysis pass, while --step 1 --n 10 processes a larger set of items for code-quality review.

Can I use this refactor analysis for codebases of varying sizes?

Yes, the refactor workflow applies to software projects of varying sizes and supports multi-category analysis for larger codebases. It handles iterative triage and clustering to prioritize changes, making it suitable for both small modules and sprawling project structures.