code-simplifier

Refine recently modified JavaScript/TypeScript code for clarity and maintainability while preserving functionality.

Updated Aug 12, 2018
One-click install
npx skills add https://github.com/ivanov-i/dots --skill code-simplifier-ivanov-i
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/ivanov-i/dots/tree/main/codex/skills/code-simplifier
Command: npx skills add https://github.com/ivanov-i/dots --skill code-simplifier-ivanov-i

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.

Core Features & Use Cases

  • Preserves functionality while improving readability and structure.
  • Enforces project standards from AGENTS.md (e.g., ES module usage, explicit return types, clear control flow, and robust error handling).
  • Use Case: When you have recently modified code that has become hard to read, run the code-simplifier to produce a clearer, maintainable version without altering behavior.

Quick Start

Provide the most recently modified file and I will simplify it while preserving exact functionality.

Frequently Asked Questions about code-simplifier

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

FAQPage Schema
How do I refactor TypeScript code to improve readability without changing behavior?

Code refactoring to improve readability without changing behavior involves refining control flow, enforcing explicit return types, and standardizing import order. This process clarifies recently modified JavaScript or TypeScript files while preserving exact functionality and meeting project maintainability standards.

Can I simplify React components and utilities while preserving their original functionality?

Yes, you can simplify React components and utility scripts by restructuring them for clarity and consistency. The refactoring process focuses on explicit typing and clear control flow, ensuring the simplified component maintains its exact original behavior and robust error handling.

What is the best way to maintain ES module consistency in recently modified code?

The best way to maintain ES module consistency is by refactoring recently modified scripts to enforce explicit import order and clear control flow. This simplification process adheres to project standards, improving code maintainability without altering the module's functional output.

How do I clean up JavaScript code that has become hard to read after recent changes?

To clean up hard-to-read JavaScript code, run a simplification process on the recently modified file. This refines the code's structure, applies explicit typing, and improves control flow clarity, resulting in a maintainable version that preserves all original behavior.

Does code simplification work with existing project standards like AGENTS.md?

Yes, code simplification directly enforces existing project standards defined in AGENTS.md. The refactoring process adheres to specified requirements such as ES module usage, explicit return types, clear control flow, and robust error handling practices while refining the modified code.

When should I avoid refactoring code for maintainability?

You should avoid refactoring code for maintainability when the target file has not been recently modified or when you lack explicit functional requirements. Simplification focuses exclusively on recently touched code to ensure behavior preservation without introducing unintended functional changes.