refactor

Remove dead code, duplicates, and unused imports from codebases.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/Wondermove-Inc/calab-claude-plugin --skill refactor-wondermove-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/Wondermove-Inc/calab-claude-plugin/tree/main/plugins/calab-plugin/skills/refactor
Command: npx skills add https://github.com/Wondermove-Inc/calab-claude-plugin --skill refactor-wondermove-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor codebases by systematically removing dead code, eliminating duplicates, and pruning unused imports to improve maintainability and readability.

Core Features & Use Cases

  • Dead code removal: Detect and remove unreachable or unused functions and variables.
  • Duplicates extraction: Identify copy-paste patterns and extract common logic.
  • Imports cleanup: Remove unused or redundant imports and fix import paths.
  • Use Case: Large monorepos needing a baseline refactor pass to restore cohesion and reduce technical debt.

Quick Start

Run /refactor on a path or with specific flags to start a targeted cleanup. Example: /refactor --dead-code src/

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I remove dead code and unused imports from a large monorepo?

Automated refactoring removes dead code and unused imports across large monorepos by orchestrating targeted cleanup tasks. You can execute a baseline refactor pass on a specific path to restore codebase cohesion and reduce technical debt.

What is the best way to find and extract duplicate code patterns?

Refactoring identifies copy-paste duplicate patterns and extracts common logic to improve maintainability. It operates across single files and whole-project workflows, detecting redundant code blocks for systematic extraction.

Can I run a targeted code cleanup on just one file instead of the whole project?

Yes, code cleanup supports both single-file and whole-project refactoring workflows. You can run a targeted command on a specific directory path to clean up unreachable functions, variables, and redundant imports locally.

Does automated refactoring work for large repositories needing a baseline cleanup?

Automated refactoring handles large repositories by systematically removing dead code, duplicates, and unused imports. It orchestrates quality checks and artifact generation to execute a baseline refactor pass and restore maintainability.

How do I start a refactoring task to prune unreachable functions and variables?

Start a refactoring task by running a specific command on your target path with flags for dead-code or duplicates. The skill orchestrates the cleanup through predefined agents and hooks, generating quality-checked artifacts.