code-simplifier

Simplifies recently modified code for readability while preserving exact behavior.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/TierOne-Studio/spa-velocity --skill code-simplifier-tierone-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-simplifier
Source: https://github.com/TierOne-Studio/spa-velocity/tree/main/.ruler/skills/code-simplifier
Command: npx skills add https://github.com/TierOne-Studio/spa-velocity --skill code-simplifier-tierone-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Freshly written or edited code often works but is harder to read than it needs to be, with redundant branching, awkward naming, nested ternaries, and unnecessary nesting that slow down future maintenance. ## Core Features & Use Cases - Behavior-Preserving Cleanup: Refactors only for clarity and consistency, never changing functionality, return values, or public contracts. - Scope-Limited Refinement: Focuses strictly on recently modified code or an explicitly requested diff, avoiding broad unrelated refactors. - Convention Alignment: Reads project instruction files such as AGENTS.md or CLAUDE.md before simplifying so changes follow repository standards. - Use Case: After implementing a feature, run a cleanup pass on the diff to flatten nested conditionals, rename unclear variables, and remove redundant checks before opening a pull request. ## Quick Start Ask the assistant to simplify the code you just changed in the current diff while keeping its behavior exactly the same.

Frequently Asked Questions about code-simplifier

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

FAQPage Schema
How do I clean up code after making changes without breaking it?

Run a simplification pass scoped to your current diff or changed files. The process preserves exact behavior, return values, and public contracts while improving naming, flattening nesting, and removing redundant condition checks.

How to refactor code for readability without changing functionality?

Apply the smallest set of edits that improve clarity: replace nested ternaries with if/else chains, use guard clauses to reduce nesting, rename unclear variables, and remove comments that only restate obvious code. Re-check types and tests afterward.

Does code simplification follow my project's style conventions?

Yes. Before simplifying, the workflow reads active repository instruction files such as AGENTS.md, CLAUDE.md, or generated workspace instructions, then aligns the cleanup with those standards and existing error-handling patterns.

When should I not use automated code simplification?

Avoid it when you need behavioral changes, broad cross-file refactors, or architectural redesign. The scope is deliberately limited to recently modified code, and it will not merge unrelated concerns or remove meaningful abstractions.

Why does simplification avoid nested ternary operators?

Nested ternaries compress multiple branching decisions into one expression, making logic hard to scan and debug. Explicit if/else chains or switch statements communicate multi-directional conditions more clearly to future maintainers.