refine

Simplify complexity and clean formatting in uncommitted code changes.

4|3|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/luan/dot-claude --skill refine-luan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refine
Source: https://github.com/luan/dot-claude/tree/main/skills/refine
Command: npx skills add https://github.com/luan/dot-claude --skill refine-luan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill cleans up uncommitted code changes by simplifying complexity, removing low-value comments, and fixing minor formatting issues, ensuring a cleaner commit history without altering functionality.

Core Features & Use Cases

  • Code Simplification: Reduces nested structures and redundant code.
  • Comment Cleanup: Removes comments that merely restate code or lack context.
  • Formatting Fixes: Ensures consistent code style within the changed files.
  • Use Case: After implementing a new feature, run this Skill to tidy up the code, making it more readable and maintainable before creating a pull request.

Quick Start

Run the refine skill to polish all uncommitted code changes.

Frequently Asked Questions about refine

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

FAQPage Schema
How do I clean up uncommitted code changes before committing?

To clean up uncommitted code changes, run a refinement process that simplifies complex structures, removes low-value comments, and fixes formatting. This polishes the code to make it more readable and maintainable before committing.

What is the best way to simplify code complexity before a pull request?

The best way to simplify code complexity before a pull request is to reduce nested structures and redundant logic. Refining the code at this stage ensures it remains readable and maintainable without changing its behavior.

Does code refactoring for commit preparation preserve existing code patterns?

Yes, code refactoring for commit preparation preserves existing patterns and code behavior. It focuses on simplifying complexity and cleaning up formatting while strictly maintaining the original functionality of the modified files.

Can I automatically remove low-value comments from modified files?

Yes, you can automatically remove low-value comments from modified files during code cleanup. This process targets comments that merely restate the code or lack context, ensuring the final commit is tidy and readable.

How do I fix code formatting issues across all modified files?

To fix code formatting issues across all modified files, run a cleanup process that ensures consistent code style within the changed files. This operates on specified file patterns or all modified files to prepare them for committing.

When should I not use automated code simplification on my changes?

You should not use automated code simplification if your changes rely on complex nested structures for specific performance reasons or if your comments contain critical context. The cleanup process is designed to preserve behavior but removes comments it identifies as low-value.