mp-code-clean

Remove duplicated logic and dead code from scoped codebase modules.

1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/MartinoPolo/mpx-claude-code --skill mp-code-clean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mp-code-clean
Source: https://github.com/MartinoPolo/mpx-claude-code/tree/main/skills/mp-code-clean
Command: npx skills add https://github.com/MartinoPolo/mpx-claude-code --skill mp-code-clean

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

mp-code-clean helps you quickly improve code quality by removing duplication, repetition, and dead or unused code without changing behavior.

Core Features & Use Cases

  • DRY-focused deduplication: Finds repeated logic and consolidates it to reduce copy-paste patterns.
  • Dead code cleanup: Removes unused exports, imports, helpers, and unreachable code safely.
  • Safe, scoped edits: Groups files into logical module boundaries, then applies low-risk fixes with targeted validation.

Quick Start

Ask it to clean a specific module: run mp-code-clean on the folder you want reviewed, for example "mp-code-clean ./src/dashboard".

Frequently Asked Questions about mp-code-clean

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

FAQPage Schema
How do I safely remove dead code and duplicated logic from a module without changing behavior?

You can clean up copy-paste patterns by applying DRY-focused deduplication to consolidate repeated logic into shared helpers. This process groups files into logical module boundaries, replacing duplicated code with unified functions to reduce repetition while preserving original behavior.

What is the best way to find and remove unused exports and unreachable code in a scoped codebase?

Code cleanup fits a feature folder or single-file input where edits must stay within logical boundaries. It works by scoping edits to a specific module directory, generating ranked low-risk plans, and validating only the touched files to ensure safe execution.

How do I consolidate repeated logic and copy-paste patterns in a feature folder?

You can clean up copy-paste patterns by applying DRY-focused deduplication to consolidate repeated logic into shared helpers. This process groups files into logical module boundaries, replacing duplicated code with unified functions to reduce repetition while preserving original behavior.

What scope or file structure do I need for targeted module refactor and dead code cleanup?

Code cleanup fits a feature folder or single-file input where edits must stay within logical boundaries. It works by scoping edits to a specific module directory, generating ranked low-risk plans, and validating only the touched files to ensure safe execution.

When should I not use automated code cleanup for dead code removal?

You should avoid automated code cleanup when your target files cross logical module boundaries or lack clear scoping, because this process requires feature-folder or single-file inputs to safely generate behavior-preserving changes and run targeted validation on touched files.