code-simplifier

Simplify recently modified JavaScript and TypeScript code while preserving behavior.

Updated Aug 30, 2025
One-click install
npx skills add https://github.com/vonomarap/kanokna --skill code-simplifier-vonomarap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/vonomarap/kanokna/tree/main/.agents/skills/code-simplifier
Command: npx skills add https://github.com/vonomarap/kanokna --skill code-simplifier-vonomarap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces cognitive overhead and maintenance cost by simplifying recently changed source code for clarity, consistency, and readability while guaranteeing no changes to observable behavior or public APIs.

Core Features & Use Cases

  • Behavior-preserving refactors: Apply clear, explicit transformations that do not alter outputs, side effects, or public interfaces.
  • Project-standard enforcement: Normalize imports, add explicit top-level return types, follow React component and Props patterns, and avoid nested ternaries in line with AGENTS.md conventions.
  • Scoped, pragmatic application: Focuses on recently modified files or PR-diff areas for targeted improvements; suitable for post-commit cleanup, PR polishing, and reviewer-assisted refactoring.

Quick Start

Ask the code-simplifier to refactor the recently modified file src/components/Button.tsx for clarity while preserving all behavior.

Frequently Asked Questions about code-simplifier

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

FAQPage Schema
How do I simplify JavaScript code while preserving its original behavior?

To simplify JavaScript code while preserving behavior, apply targeted refactors like sorting imports, adding explicit return types, and avoiding nested ternaries. This ensures clarity and readability without altering outputs, side effects, or public interfaces in your codebase.

How do I enforce code style conventions in a TypeScript React PR review?

Enforcing code style conventions during TypeScript React PR review involves normalizing imports, defining explicit top-level return types, and structuring React Props typing. This scoped cleanup targets recently modified files to improve maintainability without changing functionality.

What is behavior-preserving refactoring for recently modified source code?

Behavior-preserving refactoring for recently modified source code means applying clear, explicit transformations that improve readability without altering outputs or side effects. It focuses on normalizing syntax and enforcing conventions within PR diffs or post-commit changes.

Can I refactor nested ternaries in React components without changing the output?

Yes, you can refactor nested ternaries in React components without changing the output by replacing them with clearer conditional structures. This behavior-preserving transformation improves readability while ensuring the component's public interface and side effects remain identical.

Does this code simplification approach work with ES modules and TypeScript?

Yes, this code simplification approach works specifically with ES modules and TypeScript codebases. It enforces project conventions like sorted imports and explicit return types to reduce cognitive overhead and maintenance costs during immediate post-change cleanup.

When should I avoid limited-scope refactoring during post-commit cleanup?

You should avoid limited-scope refactoring during post-commit cleanup if your changes require expanding beyond recently modified files or PR-diff areas. Unless explicitly expanded, this approach remains strictly scoped to targeted improvements for safety and consistency.