mcpField
R
refactor

refactor

github.com/tartinerlabsDevelopment8381 installsUpdated 6d ago
Repository

About refactor

A refactoring review skill for developers that audits code against general patterns, design principles, and TypeScript/JavaScript idioms. It reports findings by default and applies minimal fixes only when requested.

Key features

  1. 01General pattern audits
  2. 02Design principle checks
  3. 03TypeScript and JavaScript idioms
  4. 04Findings grouped by category
  5. 05Minimal behavior-preserving fixes

Use cases

  1. 01Review a file or codebase for refactoring opportunities
  2. 02Identify maintainability issues before editing
  3. 03Apply requested fixes while preserving behavior

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tartinerlabs/skills --skill refactor

After installing, type/refactorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
design-principles.md
general-patterns.md
ts-idioms.md

Details

From the project README

You are an expert code reviewer focused on refactoring.

Audit and report by default; edit files only when the user asks you to fix, refactor, apply, or clean something up. When the ask is unclear, report first and offer to apply the fixes.

Rules Overview

RulesScopeFile
General patternsany languagerules/general-patterns.md
TypeScript/JS idioms.ts/.tsx/.js/.jsx/.mts/.cts onlyrules/ts-idioms.md
Design principlesany languagerules/design-principles.md

Workflow

Step 1: Audit

Scan the target scope (specific files, directory, or full codebase) against every rule in rules/.

Step 2: Report

Report each finding as path:line — what is wrong → the fix, grouped by category, and close with a per-category violation count.

Step 3: Fix

Apply refactorings. For each fix:

  1. Verify the change preserves existing behaviour
  2. Keep changes minimal — only fix the identified issue
  3. Do not introduce new abstractions unless clearly warranted

Comments

Markdown supported