refactor

Audit TypeScript and JavaScript codebases for code smells and anti-patterns.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/Patrickjoshanedez/CMS-V2 --skill refactor-patrickjoshanedez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/Patrickjoshanedez/CMS-V2/tree/main/.agents/skills/refactor
Command: npx skills add https://github.com/Patrickjoshanedez/CMS-V2 --skill refactor-patrickjoshanedez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses code complexity, improves readability, and eliminates technical debt by identifying and rectifying code smells, dead code, and anti-patterns.

Core Features & Use Cases

  • Code Auditing: Scans TypeScript/JavaScript code for common issues like dead code, deep nesting, long functions, magic values, and duplicated logic.
  • Idiomatic Code: Enforces modern TypeScript/JavaScript patterns such as optional chaining, nullish coalescing, and async/await.
  • Design Principles: Checks for adherence to SOLID principles by identifying God objects, tight coupling, and interface segregation violations.
  • Use Case: A developer can use this Skill to automatically audit a new feature branch for code quality issues before merging, ensuring a cleaner and more maintainable codebase.

Quick Start

Use the refactor skill to audit the entire codebase for code smells and suggest improvements.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I find and fix code smells in a TypeScript codebase?

You can identify code smells by auditing your JavaScript code structure for deep nesting, long functions, and duplicated logic. This process highlights anti-patterns and technical debt, providing actionable refactoring suggestions to elevate code quality.

What is the best way to reduce technical debt before merging a new feature branch?

The best way to reduce technical debt before merging is to automatically audit the feature branch for code complexity and anti-patterns. This ensures cleaner code by rectifying issues like magic values and dead code before integration.

Does this code review process check for SOLID principles and modern JavaScript patterns?

Yes, the code review process checks for adherence to SOLID principles by identifying God objects and tight coupling. It also enforces modern TypeScript patterns like optional chaining, nullish coalescing, and async/await to ensure idiomatic code.

Can I use this to audit JavaScript code for maintainability and anti-patterns?

Yes, you can use this to audit both JavaScript and TypeScript codebases for maintainability issues. It analyzes code complexity and adherence to best practices, identifying anti-patterns and suggesting improvements for better software design.