code-simplifier

Simplify changed code in pull requests or branch diffs without altering behavior.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/kaiohenricunha/dotbabel --skill code-simplifier-kaiohenricunha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/kaiohenricunha/dotbabel/tree/main/plugins/dotbabel/templates/claude/skills/code-simplifier
Command: npx skills add https://github.com/kaiohenricunha/dotbabel --skill code-simplifier-kaiohenricunha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually refining code from pull requests or branch changes for clarity and consistency is time-consuming, risky, and often leads to accidental behavior changes or missed cleanup opportunities for redundant logic, dead code, and overly complex control flow.

Core Features & Use Cases

  • Scoped to changed code only: By default operates only on files modified in your current branch, specified PR, file glob, or base branch to avoid unintended edits to unrelated code.
  • Respects project standards: Reads your project's CLAUDE.md (if present) to align with existing coding conventions, naming rules, and exclusions for generated artifacts.
  • Safe, behavior-preserving cleanup: Applies proven simplification patterns like flattening nested logic, removing dead code, and eliminating redundancy without altering any existing functionality, outputs, or features.
  • Real-world use case: After finishing a feature PR with messy nested conditionals and unused imports, use this skill to automatically clean up the changed code to match your team's standards without risking regressions.

Quick Start

Ask the AI to simplify the code in your current pull request to improve readability while keeping all existing functionality intact.

Frequently Asked Questions about code-simplifier

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

FAQPage Schema
How do I simplify code in a pull request without breaking existing functionality?

Simplifying code in a pull request without breaking functionality requires applying safe cleanup rules like nesting reduction and redundancy elimination exclusively to modified files. This refines changed code for clarity while guaranteeing no alterations to existing outputs or feature behavior.

How does automated code cleanup handle project-specific coding standards?

Automated code cleanup handles project-specific coding standards by reading configuration files like CLAUDE.md when available. This aligns code simplification with your existing naming conventions, coding rules, and artifact exclusions defined within the project repository.

Can I target code simplification to only the files changed in a branch diff?

Yes, you can target code simplification to only the files changed in a branch diff. The cleanup process operates exclusively on modified code identified by a specified pull request, file glob, or base branch comparison to prevent unintended edits to unrelated code.

What is the best way to remove dead code and redundant logic from modified files?

The best way to remove dead code and redundant logic from modified files is using an automated simplification process that flattens nested conditionals and eliminates redundancy. This guarantees behavior preservation while reducing manual effort and regression risks.

Does behavior-preserving code cleanup work with git branch diffs?

Yes, behavior-preserving code cleanup works with git branch diffs by analyzing modified files within a specified base branch or pull request. It applies safe simplification rules to the extracted diff while guaranteeing no changes to existing feature behavior.

What are the limitations of automated code simplification for pull request review?

A key limitation of automated code simplification for pull request review is that it operates exclusively on modified code within specified file globs or branch diffs. It does not perform deep architectural refactoring or alter existing functionality and outputs.