simplify

Simplifies code for readability while preserving exact behavior and project conventions.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/voiddreamz/dotfiles --skill simplify-voiddreamz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/voiddreamz/dotfiles/tree/main/.config/opencode/skills/simplify
Command: npx skills add https://github.com/voiddreamz/dotfiles --skill simplify-voiddreamz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working code often accumulates unnecessary complexity—deep nesting, long functions, unclear names, and duplicated logic—that slows down maintenance and review. This Skill guides behavior-preserving refactoring so code becomes easier to read, understand, and modify without risking regressions. ## Core Features & Use Cases - Behavior-Preserving Refactoring: Every simplification must keep inputs, outputs, side effects, error behavior, and edge cases identical, verified through proportionate final-state checks. - Five Guiding Principles: Preserve behavior exactly, follow project conventions, prefer clarity over cleverness, maintain balance against over-simplification, and scope changes to what recently changed. - Structured Four-Step Process: Understand the code before touching it, identify simplification signals (nested ternaries, boolean flags, dead code, duplicated logic), apply changes incrementally, and verify the result. - Use Case: After a feature passes tests but the implementation feels heavy, use this Skill during code review to flatten nested conditionals, rename misleading variables, and remove dead code while keeping the diff clean and reviewable. ## Quick Start Ask the agent to simplify the recently modified function in your current file for readability without changing its behavior.

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I simplify code without changing its behavior?▼

Simplify code by first understanding its responsibility, callers, and edge cases, then applying one small change at a time. After each change, verify that outputs, error behavior, and side effects remain identical using tests or proportionate final-state checks.

What are the signs that code needs simplification?▼

Common signals include deep nesting, long functions with mixed responsibilities, nested ternaries, boolean flag arguments, repeated conditionals, misleading names, duplicated logic, dead code, and wrappers that add no value.

When should I not refactor code for readability?▼

Avoid simplifying code that is already clean, code you do not yet understand, performance-critical paths where the simpler version is measurably slower, or modules you are about to rewrite entirely.

How do I keep refactoring consistent with project conventions?▼

Read the project's AGENTS.md or convention docs and study how neighboring code handles similar patterns before editing. Match the existing style for imports, naming, function style, error handling, and type annotations.

Why does over-simplification hurt code quality?▼

Over-simplification removes names that carry meaning, merges unrelated logic, or strips abstractions needed for testability and extensibility. Optimizing for line count instead of comprehension makes code harder to understand and maintain.