code-simplifier

Simplify and refactor recently modified .NET C# code while preserving behavior.

13|6|Updated Feb 19, 2025
One-click install
npx skills add https://github.com/Tairitsua/Monica --skill code-simplifier-tairitsua
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/Tairitsua/Monica/tree/main/.claude/skills/code-simplifier
Command: npx skills add https://github.com/Tairitsua/Monica --skill code-simplifier-tairitsua

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Code Simplifier reduces complexity and incidental cognitive load in C# and .NET code by producing clearer, more consistent implementations without changing observable behavior, making code easier to read, review, and maintain.

Core Features & Use Cases

  • Behavior-preserving refactors: Produces edits that maintain exact outputs, exceptions, and side effects while improving structure and readability.
  • Context-aware scope selection: Focuses on recently modified code by default but can operate on files, modules, or whole services when requested.
  • Plan-first workflow: Analyzes design boundaries, proposes a concise refactoring plan, and then applies incremental, debuggable changes with explanations for reviewers.

Quick Start

Run the code-simplifier to analyze and simplify the recent .NET changes in the repository while preserving exact 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 C# code to improve maintainability without changing behavior?

To refactor C# code while preserving exact behavior, apply structural changes that improve clarity and consistency without altering outputs, exceptions, or side effects. This approach produces a concise refactoring plan and implements incremental, debuggable changes for easier code review.

What is the best way to simplify .NET code during a pull request cleanup?

The best way to simplify .NET code during a pull request is to focus on recently modified files, analyze design boundaries, and apply behavior-preserving structural edits. This reduces incidental cognitive load and makes the updated code easier to read and review.

Can I run a refactoring plan across an entire .NET module or service?

Yes, you can run a refactoring plan across an entire .NET module or service. While the process targets recently modified code by default, it can operate on broader areas like whole files or services when explicitly requested during targeted refactoring tasks.

Does C# code simplification preserve exact side effects and exceptions?

C# code simplification preserves exact side effects and exceptions by producing behavior-preserving edits. The refactoring process maintains exact outputs and side effects while improving code structure, ensuring the observable behavior of the application remains unchanged.

When should I document assumptions during a .NET refactoring task?

You should document assumptions during a .NET refactoring task when applying structural changes for reviewers. The refactoring workflow explicitly documents assumptions and rationale for each incremental change, ensuring reviewers understand the context and reasoning behind the modifications.

Why does refactoring .NET code reduce cognitive load for code reviewers?

Refactoring .NET code reduces cognitive load for reviewers by replacing complex implementations with clearer, more consistent alternatives. By producing concise refactoring plans and behavior-preserving changes, the codebase becomes easier to read, review, and maintain over time.