code-simplifier

Refactor verbose RTK Rust code into idiomatic implementations without changing behavior.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/Star1131/smart_insole --skill code-simplifier-star1131
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/Star1131/smart_insole/tree/main/.claude/skills/rtk-master/.claude/skills/code-simplifier
Command: npx skills add https://github.com/Star1131/smart_insole --skill code-simplifier-star1131

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you trim verbose RTK Rust code into clearer, more idiomatic implementations without changing behavior.

Core Features & Use Cases

  • Idiomatic Refactoring: Simplifies iterator chains, string building, option and result handling, and nested control flow.
  • RTK Safety Constraints: Preserves required patterns such as lazy_static regex initialization, mandatory context-rich errors, fallback command paths, exit-code propagation, and test modules.
  • Use Case: Use it when a Rust parser, CLI handler, or utility function works correctly but is harder to read, maintain, or review than it should be.

Quick Start

Ask the skill to simplify the Rust file you are reviewing while preserving RTK-specific constraints and 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 verbose Rust code into idiomatic iterator chains and Option handling?

Refactoring verbose Rust code into idiomatic iterator chains and Option handling involves simplifying nested control flow and string building without changing behavior. This Skill reduces complex parser or CLI logic into clearer implementations while preserving project constraints like lazy_static regex and test modules.

What is the best way to simplify Rust code while preserving lazy_static regex and exit-code propagation?

Simplifying Rust code while preserving lazy_static regex and exit-code propagation requires applying idiomatic refactors that maintain RTK safety constraints. The Skill ensures mandatory context-rich errors, fallback command paths, and exit codes remain intact while streamlining iterator chains and struct destructuring.

Does this Rust refactoring approach work with RTK workflows and mandatory context-rich errors?

Yes, this Rust refactoring approach works with RTK workflows by explicitly preserving mandatory context-rich errors. It targets RTK Rust code specifically, ensuring that required patterns like lazy_static regex initialization, fallback command paths, and exit-code propagation are maintained during the simplification process.

How do I refactor Result handling and struct destructuring in Rust without breaking test modules?

Refactoring Result handling and struct destructuring in Rust without breaking test modules requires preserving the existing test suite during the simplification process. The Skill maintains test modules and fallback command paths while converting verbose Option and Result handling into clearer, idiomatic implementations.

When should I avoid using automated code simplification for Rust utility functions?

You should avoid automated code simplification for Rust utility functions when the code lacks explicit RTK safety constraints or relies on unconventional control flow. The Skill is designed for RTK workflows, so non-RTK projects may not benefit from its specific preservation of lazy_static regex and context-rich error patterns.