simplify

Refactor recently modified JavaScript/TypeScript code for readability without changing behavior.

Updated Mar 17, 2017
One-click install
npx skills add https://github.com/dfmonaco/dotfiles --skill simplify-dfmonaco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/dfmonaco/dotfiles/tree/main/archive/agents-skills/simplify
Command: npx skills add https://github.com/dfmonaco/dotfiles --skill simplify-dfmonaco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplify and refine recently modified code for clarity and consistency. Use after writing code to improve readability without changing functionality.

Core Features & Use Cases

  • Preserve Functionality: Refactors for readability without altering behavior.
  • Apply Project Standards: Enforces project-specific guidelines from CLAUDE.md, including consistent import sorting, explicit typings, and robust error handling.
  • Improve Clarity: Simplifies structure, reduces nesting, and enforces explicit naming for maintainability.

Quick Start

Analyze the most recently touched codebase segment and apply the standards to improve readability.

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I refactor JavaScript code for readability without changing its behavior?

To refactor JavaScript code for readability without altering behavior, the Skill analyzes recently modified segments to reduce nesting, enforce explicit naming, and eliminate nested ternaries. It preserves exact functionality while simplifying the structure for easier maintenance.

Can I enforce project-specific TypeScript coding standards during a refactor?

Yes, you can enforce project-specific TypeScript coding standards during a refactor by applying guidelines defined in your CLAUDE.md file. The Skill automatically enforces explicit typings, modular imports, and robust error handling across your codebase.

What is the best way to simplify nested ternaries in React components?

The best way to simplify nested ternaries in React components is to apply modular patterns and reduce structural nesting. The Skill identifies these readability issues in recently modified code and refactors them into clearer, more maintainable conditional logic.

How does code refactoring handle error handling and import sorting?

Code refactoring handles error handling and import sorting by enforcing robust error catching and applying consistent modular import sorting based on project standards. This process improves code clarity and maintainability without modifying the original runtime functionality.

Does this refactoring approach work on recently modified code segments?

Yes, this refactoring approach specifically targets recently modified code segments. It analyzes the most recently touched parts of your JavaScript or TypeScript codebase and applies in-code standards to improve readability for review tasks.