refactor

Analyzes multi-language codebases to propose non-destructive refactoring opportunities.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/nexus-a1/claude-skills --skill refactor-nexus-a1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/nexus-a1/claude-skills/tree/main/skills/refactor
Command: npx skills add https://github.com/nexus-a1/claude-skills --skill refactor-nexus-a1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze code and suggest refactoring improvements with agent-driven analysis. Runs in the current working tree by default — set worktree.enabled: true in .claude/configuration.yml to isolate work in a git worktree.

Core Features & Use Cases

  • Agent orchestration: coordinates specialized sub-agents to explore context, analyze code, and propose safe refactorings.
  • Context-aware analysis: detects SRP violations, dependency inversion opportunities, and duplication across languages.
  • Non-destructive recommendations: prioritizes changes with low risk and preserves existing behavior.

Quick Start

Analyze the target project to surface high-impact refactoring opportunities while preserving functionality.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I find refactoring opportunities in a multi-language codebase?

This Skill analyzes your codebase using agent-driven analysis to identify refactoring opportunities across multi-language projects. It detects SRP violations, dependency inversion opportunities, and duplication while preserving existing behavior.

What is the best way to detect code smells without breaking existing functionality?

The best way to detect code smells without breaking functionality is using non-destructive refactoring recommendations. This Skill prioritizes low-risk changes and requires validated test coverage before applying any fixes to preserve behavior.

How does agent-driven static analysis identify dependency inversion opportunities?

Agent-driven static analysis identifies dependency inversion opportunities by orchestrating specialized sub-agents to explore context and analyze code structure across files. It surfaces architectural improvements through structured, non-destructive recommendations.

Can I analyze code for refactoring safely in an isolated git worktree?

Yes, you can safely isolate refactoring analysis in a git worktree by setting `worktree.enabled: true` in `.claude/configuration.yml`. This isolates proposed changes from your current working tree during analysis.

Does code refactoring require validated test coverage before applying changes?

Yes, this refactoring process requires validated test coverage before applying any fixes. It mandates non-destructive changes and validated tests to guarantee existing behavior is fully preserved during modifications.