awf-refactor

Refactor code by resolving long functions, deep nesting, and dead code.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/buiminhduc23011/awf-for-codex --skill awf-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: awf-refactor
Source: https://github.com/buiminhduc23011/awf-for-codex/tree/main/skills/awf-refactor
Command: npx skills add https://github.com/buiminhduc23011/awf-for-codex --skill awf-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the anxiety of refactoring legacy or messy code by providing a structured, safe, and non-destructive cleanup process that improves readability without altering business logic.

Core Features & Use Cases

  • Code Smell Detection: Identifies long functions, deep nesting, dead code, and naming inconsistencies.
  • Safe Refactoring: Provides a step-by-step workflow to extract functions, rename variables, and add documentation while ensuring the application remains functional.
  • Use Case: Use this when you have a complex, hard-to-read module that needs to be cleaned up for better maintainability without risking the introduction of new bugs.

Quick Start

Invoke the refactor workflow by typing awf-refactor to begin the guided cleanup process for your current project.

Frequently Asked Questions about awf-refactor

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

FAQPage Schema
How do I safely refactor legacy JavaScript code without changing business logic?

This approach detects code smells like long functions and deep nesting, then resolves them through systematic refactoring patterns. It ensures functional parity by verifying changes through testing after each modification.

What are common code smells in TypeScript that require refactoring?

Common TypeScript code smells requiring refactoring include long functions, deep nesting, dead code, and naming inconsistencies. Identifying these issues is the first step toward improving module maintainability and overall code cleanliness.

How do I clean up messy code modules for better maintainability?

Cleaning up messy code modules involves a structured refactoring process that targets specific files to improve maintainability. It systematically applies refactoring patterns while ensuring the application remains fully functional.

Does automated refactoring work on specific files or entire codebases?

Automated refactoring operates on specific files or modules rather than the entire codebase at once. This targeted approach allows for safe, non-destructive cleanup of complex, hard-to-read sections while maintaining functional parity.

Why does refactoring require verification through testing?

Refactoring requires verification through testing to ensure functional parity and prevent the introduction of new bugs. Testing validates that the safe code cleanup process has strictly preserved existing business logic without altering behavior.