code-simplifier

Refactor TypeScript and JavaScript code with modern patterns while preserving behavior.

132|22|Updated May 24, 2025
One-click install
npx skills add https://github.com/cyanheads/pubmed-mcp-server --skill code-simplifier-cyanheads
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/cyanheads/pubmed-mcp-server/tree/main/.agents/skills/code-simplifier
Command: npx skills add https://github.com/cyanheads/pubmed-mcp-server --skill code-simplifier-cyanheads

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codebases often accumulate technical debt as patterns grow stale, making maintenance costly and error-prone. This Skill automatically simplifies and refactors code to improve readability while preserving exact functionality. It helps teams keep code clean as it evolves, reducing review time and risk of regressions.

Core Features & Use Cases

  • Automatic modernization of TypeScript/JavaScript syntax to idiomatic patterns.
  • Elimination of unnecessary nesting and verbose constructs while preserving behavior.
  • Readability-focused refactors that are safe for production code and review-ready.

Quick Start

Refactor the most recently touched TypeScript/JavaScript files to modern idioms while preserving behavior.

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 functionality?

No, the refactoring process explicitly preserves exact functionality and public APIs. It focuses solely on improving code clarity, performance, and consistency without introducing behavioral changes.

Can I modernize JavaScript syntax to idiomatic patterns without breaking existing behavior?

Yes, you can safely modernize JavaScript syntax by applying idiomatic patterns that eliminate verbose constructs and unnecessary nesting. The refactoring process preserves exact behavior and public APIs while making the codebase cleaner.

What project standards should I apply when refactoring TypeScript for maintainability?

When refactoring TypeScript, you should satisfy project standards by enforcing import ordering, adding explicit return types, and implementing guarded error handling. This ensures consistency across the recently changed files.

Which parts of a codebase should I target for readability refactors?

You should apply readability refactors to codebases with recent changes, specifically targeting methods, classes, and modules. Focusing on recently touched areas reduces review time and mitigates the risk of regressions.

Why should I refactor code for maintainability as a project evolves?

Refactoring for maintainability helps reduce accumulated technical debt by modernizing stale patterns. This makes ongoing maintenance less costly and error-prone while keeping the code clean as it evolves.

Does refactoring code for clarity alter the public API or existing functionality?

No, the refactoring process explicitly preserves exact functionality and public APIs. It focuses solely on improving code clarity, performance, and consistency without introducing behavioral changes.