simplify

Refactor recently modified code to improve readability without changing behavior.

1|1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/xianmingyao/openclaw-CaySon --skill simplify-xianmingyao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/xianmingyao/openclaw-CaySon/tree/main/skills/simplify
Command: npx skills add https://github.com/xianmingyao/openclaw-CaySon --skill simplify-xianmingyao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor code to make it easier to read, simpler to maintain, and more consistent with the surrounding codebase without changing what it does.

Core Features & Use Cases

  • Preserve functionality: Never change behavior, outputs, side effects, or public interfaces unless explicitly asked for.
  • Apply project standards: Match existing conventions, patterns, naming style, and architectural expectations of the codebase.
  • Reduce unnecessary complexity: Flatten avoidable nesting, remove redundant abstractions, and prefer the most direct implementation that remains clear.
  • Keep variables intentional: Avoid introducing extra state unless it materially improves readability or is reused enough to justify it.
  • Improve naming and structure: Use clear variable and function names, and group related logic to read straightforwardly.
  • Use case: When code is unclear, perform a readability pass that preserves behavior.

Quick Start

Ask the AI to simplify the most recently modified module to improve readability without changing behavior.

Frequently Asked Questions about simplify

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

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

Code refactoring for readability simplifies logic and reduces complexity while strictly preserving outputs, side effects, and public interfaces. This approach flattens nesting and removes redundant abstractions to make modules easier to maintain.

What is the best way to simplify complex code logic in recently modified files?

Simplifying complex logic in recently modified files involves applying project standards to flatten avoidable nesting and remove redundant abstractions. You get a more direct implementation that remains clear and matches existing codebase conventions.

Does a readability pass affect the functional outputs of a module?

A proper readability pass does not affect functional outputs. It explicitly preserves behavior, side effects, and public interfaces, ensuring the refactored code operates identically to the original while improving naming and structure.

How do I ensure a code refactor matches existing project conventions?

To ensure a code refactor matches existing conventions, apply project standards by aligning with the surrounding codebase's naming style, patterns, and architectural expectations. This prevents introducing new bugs during the simplification process.

When should I avoid introducing new variables during a code refactor?

You should avoid introducing new variables during a code refactor unless they materially improve readability or are reused enough to justify the extra state. Keeping variables intentional ensures the most direct and clear implementation.