polish

Detect code smells and refactor codebases with test verification.

23|4|Updated Sep 5, 2013
One-click install
npx skills add https://github.com/drn/dots --skill polish-drn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polish
Source: https://github.com/drn/dots/tree/main/agents/skills/polish
Command: npx skills add https://github.com/drn/dots --skill polish-drn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses code quality issues by systematically analyzing code for smells, design flaws, and anti-patterns, then refactoring it to improve maintainability and reduce technical debt.

Core Features & Use Cases

  • Code Smells Detection: Identifies issues like duplication, magic numbers, and vague naming.
  • Design Principle Enforcement: Checks for SOLID violations and coupling problems.
  • Refactoring Orchestration: Guides a phased approach to analysis, consolidation, and iterative refactoring with test verification.
  • Use Case: A team has a legacy codebase with declining quality. They use this Skill to audit the code, get a prioritized list of refactoring tasks, and systematically improve the codebase's health.

Quick Start

Use the polish skill to analyze and refactor the 'src/utils' directory.

Frequently Asked Questions about polish

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

FAQPage Schema
How do I detect and fix code smells in a legacy codebase?

To detect code smells, this skill systematically analyzes your codebase for duplication, magic numbers, and vague naming, then orchestrates iterative refactoring to improve maintainability and reduce technical debt.

What is the best way to enforce SOLID principles during refactoring?

Enforcing SOLID principles during refactoring involves checking for coupling problems and design flaws. This skill identifies these violations and prioritizes fixes to systematically elevate code quality and structural design.

How do I prioritize technical debt reduction across multiple directories?

Prioritizing technical debt reduction requires a phased analysis approach. This skill audits your codebase, identifies anti-patterns, and generates a prioritized list of refactoring tasks to tackle design flaws systematically.

Can I use automated code analysis for iterative refactoring with test verification?

Yes, you can use automated code analysis for iterative refactoring with test verification. This skill supports a phased approach to consolidation and refactoring, ensuring structural improvements do not break existing functionality.

Does code refactoring work with multiple programming languages?

Code refactoring with this skill works across multiple languages by addressing language-specific idioms, structural issues, and design flaws, ensuring the analysis and fixes are appropriate for your entire codebase.

When should I not use automated refactoring on my codebase?

You should avoid automated refactoring when lacking adequate test coverage for verification, as this skill relies on iterative test verification to safely consolidate and fix anti-patterns without introducing regressions.