refactor

Audit TypeScript/JavaScript codebases for dead code, deep nesting, and design smells.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactoring and code maintenance are time-consuming when teams struggle with dead code, deep nesting, and scattered patterns across large codebases.

Core Features & Use Cases

  • Audit and identify dead code, deep nesting, and design smells in TypeScript/JavaScript projects.
  • Provide actionable guidance with concrete refactor steps and examples to improve readability and maintainability.
  • Use case: when aging codebases accumulate complexity, run the refactor workflow to produce a focused plan and conservative fixes.

Quick Start

Run an audit on the target codebase to identify dead code and deep nesting, then apply focused, incremental refactors.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I identify dead code and deep nesting in a TypeScript codebase?

To identify dead code and deep nesting in a TypeScript codebase, run an audit workflow that scans modules to detect unused exports, unreachable branches, and complex nested structures. It then reports these design smells for targeted improvements.

What is the best way to refactor aging JavaScript modules safely?

The best way to refactor aging JavaScript modules safely is through an incremental workflow that audits design smells, generates a focused improvement plan, and applies conservative pattern fixes. This ensures readability improvements without risking large rewrites.

Can I use automated refactoring to fix design smells across multiple services?

Yes, you can use automated refactoring to fix design smells across multiple services. The workflow enforces TypeScript and JavaScript idioms to guide pattern fixes and safe rewrites consistently across scattered modules in large projects.

How does a code quality audit handle scattered design patterns in JavaScript?

A code quality audit handles scattered design patterns in JavaScript by enforcing rules for general patterns and language idioms. It scans the codebase to detect inconsistencies, then provides concrete refactor steps and examples for incremental alignment.

When should I avoid applying incremental refactoring fixes to a codebase?

You should avoid applying incremental refactoring fixes when a full module rewrite is safer than conservative adjustments, or when the audit cannot identify clear design smells. It targets specific complexity issues rather than architectural overhauls.