refactor-selected

Community

Improve selected code readability with early returns.

Authormutemoon
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Refactoring selected code to reduce nesting and improve readability, especially when control flow can exit early.

Core Features & Use Cases

  • Optimize selected code blocks: Refactors only the portion of code you choose, improving structure without changing broader behavior.
  • Reduce indentation via early returns: Encourages patterns like let-else return or if with return to avoid deep nesting.
  • Use case: When reviewing a Rust function with multiple nested conditionals, select the most nested section and refactor it so the function becomes easier to scan.

Quick Start

Apply the refactor-selected skill to your selected Rust code to reduce indentation by using early returns.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: refactor-selected
Download link: https://github.com/mutemoon/moon-lol/archive/main.zip#refactor-selected

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.