code-simplifier

Refactors JavaScript/TypeScript code while preserving its behavior and improving readability.

Updated Mar 12, 2023
One-click install
npx skills add https://github.com/Bliz243/.dotfiles --skill code-simplifier-bliz243
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/Bliz243/.dotfiles/tree/main/.claude/skills/code-simplifier
Command: npx skills add https://github.com/Bliz243/.dotfiles --skill code-simplifier-bliz243

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies and refines code to improve clarity, consistency, and maintainability while preserving exact functionality. It prioritizes recently modified code unless directed otherwise.

Core Features & Use Cases

  • Code Refactoring & Clarification: Rename variables, extract functions, reduce nesting, and restructure logic without changing behavior.
  • Maintainability & Standards Compliance: Aligns with project-wide standards (e.g., explicit imports, function keyword usage, explicit return types, clear interfaces) to ensure long-term code health.
  • Use Case: In a PR with a complex utility, run the Skill to produce a clearer, maintainable version that preserves all outputs and side effects.

Quick Start

  • Provide the modified code snippet or diff to the Skill and request a maintainable rewrite that preserves 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 JavaScript code to improve readability without changing functionality?

You refactor JavaScript by providing modified code snippets or diffs to produce a clearer version that enforces standards like explicit imports, function-based syntax, and explicit return types while preserving all outputs and side effects.

What is the best way to simplify TypeScript code during a pull request review?

Simplifying TypeScript code during a PR review involves applying project-wide standards such as ES module imports, explicit return types, and clear naming conventions to recently changed files, ensuring long-term maintainability without breaking existing logic.

Can I use code simplification on React components and utility libraries?

Yes, code simplification can be applied to React components, utilities, and libraries. It refactors recently changed JavaScript and TypeScript files to ensure clear interfaces and robust error handling while maintaining exact functionality.

Does refactoring code for maintainability affect existing side effects and outputs?

Refactoring code for maintainability does not alter existing side effects and outputs. The process focuses on reducing nesting and clarifying logic while strictly preserving the exact behavior of the original code.

When do I need to enforce explicit return types and ES module imports in TypeScript?

You need to enforce explicit return types and ES module imports in TypeScript when aligning modified files with project-wide standards during code reviews, ensuring long-term code health, consistency, and clarity across your codebase.